Imported Upstream version 1.3.5
authorJohn Goerzen <jgoerzen@complete.org>
Wed, 16 Jul 2008 18:03:39 +0000 (13:03 -0500)
committerJohn Goerzen <jgoerzen@complete.org>
Wed, 16 Jul 2008 18:03:39 +0000 (13:03 -0500)
258 files changed:
.cvsignore
.hgignore [deleted file]
.hgtags [deleted file]
AUTHORS
Makefile.in
an1.c
avltree.c [new file with mode: 0644]
avltree.h [new file with mode: 0644]
axim_gpb.c
bcr.c
cet_util.c
cetus.c
chkdoc
config.h.in
configure
configure.in
csv_util.c
csv_util.h
defs.h
delgpl.c
destinator.c [new file with mode: 0644]
dg-100.c [new file with mode: 0644]
discard.c
dmtlog.c
exif.c [new file with mode: 0644]
filter_vecs.c
garmin.c
garmin_fs.c
garmin_gpi.c
garmin_tables.c
garmin_txt.c
gbfile.c
gbfile.h
gbser_posix.c
gbversion.h
gbversion.h.in
gdb.c
google.c
gpsbabel.html
gpssim.c
gpx.c
gtrnctr.c
holux.c
ik3d.c [new file with mode: 0644]
internal_styles.c
jeeps/gpsapp.c
jeeps/gpsdatum.h
jeeps/gpsinput.c
jeeps/gpsmath.c
jeeps/gpsmath.h
kml.c
lmx.c [new file with mode: 0644]
lowranceusr.c
mac/dmg-contents/COPYING [new file with mode: 0644]
mac/dmg-contents/Credits.rtf [new file with mode: 0644]
mac/dmg-contents/GPSBabel+.app [new file with mode: 0755]
mac/dmg-contents/README.rtf [new file with mode: 0644]
mac/include/expat.h [new file with mode: 0644]
mac/lib/libexpat.a [new file with mode: 0644]
macgpsbabel/MacGPSBabel.xcodeproj/project.pbxproj
maggeo.c
magproto.c
main.c
mapsend.c
mapsource.c
mingw/includew/expat.h [new file with mode: 0644]
mingw/includew/expat_external.h [new file with mode: 0644]
msroute.c
msvc/Expat/expat.h
msvc/GPSBabel-msvc7.vcproj
msvc/GPSBabel.vcproj
msvc/config.h
mtk_logger.c [new file with mode: 0644]
navilink.c [new file with mode: 0644]
nmea.c
osm.c [new file with mode: 0644]
overlay.c
ozi.c
parse.c [new file with mode: 0644]
pcx.c
pdbfile.c
pdbfile.h
psp.c
random.c [new file with mode: 0644]
reference/IMG_2065.JPG [new file with mode: 0644]
reference/destinator_poi.dat [new file with mode: 0644]
reference/destinator_poi.txt [new file with mode: 0644]
reference/earth-expertgps.kml
reference/earth-gc.kml
reference/exif-dat.csv [new file with mode: 0644]
reference/expertgps-g7t.txt
reference/garmin_txt.txt
reference/geocaching.gpx [new file with mode: 0644]
reference/ik3d-sample.gpx [new file with mode: 0644]
reference/ik3d-sample.ikt [new file with mode: 0644]
reference/lowrance.usr
reference/navilink_tracks.gpx [new file with mode: 0644]
reference/navilink_tracks.trk [new file with mode: 0755]
reference/navilink_tracks_gpx.trk [new file with mode: 0755]
reference/navilink_waypoints.gpx [new file with mode: 0644]
reference/navilink_waypoints.wpt [new file with mode: 0755]
reference/navilink_waypoints_gpx.wpt [new file with mode: 0644]
reference/nokia.lmx [new file with mode: 0644]
reference/osm-data.gpx [new file with mode: 0644]
reference/osm-data.xml [new file with mode: 0644]
reference/ozi.wpt
reference/route/destinator_itn.dat [new file with mode: 0644]
reference/route/destinator_itn.txt [new file with mode: 0644]
reference/stmsdf.txt
reference/track/destinator_trl.dat [new file with mode: 0644]
reference/track/destinator_trl.txt [new file with mode: 0644]
reference/track/mtk_logger.bin [new file with mode: 0644]
reference/track/mtk_logger.csv [new file with mode: 0644]
reference/track/mtk_logger.gpx [new file with mode: 0644]
reference/track/nmea+ms.gpx [new file with mode: 0644]
reference/track/nmea+ms.txt [new file with mode: 0644]
reference/track/nmea.gpx
reference/track/stmsdf-track.sdf
reference/track/vidaone.csv [new file with mode: 0644]
reference/track/vidaone.gpb [new file with mode: 0644]
reference/xol-sample-gpx.xol [new file with mode: 0644]
reference/xol-sample.gpx [new file with mode: 0644]
reference/xol-sample.xol [new file with mode: 0644]
saroute.c
stmsdf.c
style/ktf2.style
style/s_and_t.style
style/sportsim.style
style/tomtom_itn.style
test-all
testo
tomtom.c
tools/mac-config [new file with mode: 0755]
tools/mkcapabilities.in
tools/mkdmg [new file with mode: 0755]
tpg.c
tpo.c
unicsv.c
util.c
vcf.c
vecs.c
vidaone.c [new file with mode: 0644]
vitosmt.c
waypt.c
win32/GPSBabelGUI.exe
win32/gpsbabel.rc.in
win32/gui-2/GPSBabelGUI.cfg
win32/gui-2/GPSBabelGUI.dof
win32/gui-2/GPSBabelGUI.dpr
win32/gui-2/GPSBabelGUI.res
win32/gui-2/Makefile
win32/gui-2/about.dfm
win32/gui-2/about.pas
win32/gui-2/common.pas
win32/gui-2/filter.dfm
win32/gui-2/filter.pas
win32/gui-2/gpsbabel.iss
win32/gui-2/gpsbabel.po
win32/gui-2/locale/de/LC_MESSAGES/gpsbabel.po
win32/gui-2/locale/es/LC_MESSAGES/gpsbabel.po
win32/gui-2/locale/fr/LC_MESSAGES/gpsbabel.po
win32/gui-2/locale/hu/LC_MESSAGES/gpsbabel.po
win32/gui-2/main.dfm
win32/gui-2/main.pas
win32/gui-2/options.dfm
win32/gui-2/options.pas
win32/gui-2/readme.pas
win32/gui-2/select.pas
win32/gui-2/utils.pas
xcsv.c
xcsv_tokens.gperf [new file with mode: 0644]
xcsv_tokens.in [new file with mode: 0644]
xmldoc/chapters/build.xml
xmldoc/chapters/preface.xml
xmldoc/chapters/styles.xml
xmldoc/chapters/use.xml
xmldoc/filters/discard.xml
xmldoc/filters/options/discard-sat.xml [new file with mode: 0644]
xmldoc/formats/csv.xml
xmldoc/formats/destinator_itn.xml [new file with mode: 0644]
xmldoc/formats/destinator_poi.xml [new file with mode: 0644]
xmldoc/formats/destinator_trl.xml [new file with mode: 0644]
xmldoc/formats/dg-100.xml [new file with mode: 0644]
xmldoc/formats/exif.xml [new file with mode: 0644]
xmldoc/formats/g7towin.xml
xmldoc/formats/garmin.xml
xmldoc/formats/garmin_gpi.xml
xmldoc/formats/ggv_log.xml
xmldoc/formats/google.xml
xmldoc/formats/gpsdrive.xml
xmldoc/formats/gpx.xml
xmldoc/formats/ik3d.xml [new file with mode: 0644]
xmldoc/formats/kml.xml
xmldoc/formats/ktf2.xml
xmldoc/formats/lmx.xml [new file with mode: 0644]
xmldoc/formats/magellan1.xml
xmldoc/formats/msroute.xml
xmldoc/formats/msroute1.xml
xmldoc/formats/mtk-bin.xml [new file with mode: 0644]
xmldoc/formats/mtk.xml [new file with mode: 0644]
xmldoc/formats/navilink.xml [new file with mode: 0644]
xmldoc/formats/options/dg-100-erase.xml [new file with mode: 0644]
xmldoc/formats/options/exif-filename.xml [new file with mode: 0644]
xmldoc/formats/options/garmin-bitscategory.xml [new file with mode: 0644]
xmldoc/formats/options/garmin-resettime.xml [new file with mode: 0644]
xmldoc/formats/options/garmin_gpi-alerts.xml [new file with mode: 0644]
xmldoc/formats/options/garmin_gpi-proximity.xml [new file with mode: 0644]
xmldoc/formats/options/garmin_gpi-sleep.xml [new file with mode: 0644]
xmldoc/formats/options/garmin_gpi-speed.xml [new file with mode: 0644]
xmldoc/formats/options/garmin_gpi-unique.xml [new file with mode: 0644]
xmldoc/formats/options/garmin_gpi-units.xml [new file with mode: 0644]
xmldoc/formats/options/garmin_txt-grid.xml
xmldoc/formats/options/gdb-bitscategory.xml [new file with mode: 0644]
xmldoc/formats/options/gdb-roadbook.xml
xmldoc/formats/options/gpx-logpoint.xml
xmldoc/formats/options/gpx-snlen.xml
xmldoc/formats/options/gpx-suppresswhite.xml
xmldoc/formats/options/gpx-urlbase.xml
xmldoc/formats/options/kml-trackdirection.xml [new file with mode: 0644]
xmldoc/formats/options/magellan-deficon.xml
xmldoc/formats/options/magellanx-deficon.xml
xmldoc/formats/options/mtk-bin-csv.xml [new file with mode: 0644]
xmldoc/formats/options/mtk-csv.xml [new file with mode: 0644]
xmldoc/formats/options/mtk-erase.xml [new file with mode: 0644]
xmldoc/formats/options/navicache-noretired.xml
xmldoc/formats/options/navilink-nukerte.xml [new file with mode: 0644]
xmldoc/formats/options/navilink-nuketrk.xml [new file with mode: 0644]
xmldoc/formats/options/navilink-nukewpt.xml [new file with mode: 0644]
xmldoc/formats/options/navilink-power_off.xml [new file with mode: 0644]
xmldoc/formats/options/nmea-gisteq.xml [new file with mode: 0644]
xmldoc/formats/options/osm-tag.xml [new file with mode: 0644]
xmldoc/formats/options/osm-tagnd.xml [new file with mode: 0644]
xmldoc/formats/options/ozi-proximity.xml [new file with mode: 0644]
xmldoc/formats/options/ozi-snlen.xml
xmldoc/formats/options/ozi-snunique.xml
xmldoc/formats/options/ozi-snupper.xml
xmldoc/formats/options/ozi-snwhite.xml
xmldoc/formats/options/ozi-wptbgcolor.xml
xmldoc/formats/options/ozi-wptfgcolor.xml
xmldoc/formats/options/pathaway-deficon.xml
xmldoc/formats/options/pathaway-snlen.xml
xmldoc/formats/options/pcx-cartoexploreur.xml
xmldoc/formats/options/pcx-deficon.xml
xmldoc/formats/options/unicsv-utc.xml [new file with mode: 0644]
xmldoc/formats/options/wfff-ahcicon.xml
xmldoc/formats/options/wfff-ahoicon.xml
xmldoc/formats/options/wfff-aicicon.xml
xmldoc/formats/options/wfff-aioicon.xml
xmldoc/formats/options/wfff-snmac.xml
xmldoc/formats/osm.xml [new file with mode: 0644]
xmldoc/formats/s_and_t.xml
xmldoc/formats/unicsv.xml
xmldoc/formats/vidaone.xml [new file with mode: 0644]
xmldoc/formats/wbt-bin.xml
xmldoc/formats/wbt.xml
xmldoc/formats/wfff.xml
xmldoc/formats/xol.xml [new file with mode: 0644]
xol.c [new file with mode: 0644]

index 45d939897d5ab97ddaac8611fa72520b301fb339..1ead503aa65fa73350dbafe873f6c50c221299b9 100644 (file)
@@ -18,5 +18,6 @@ config.status
 
 CHANGELOG
 
+autom4te.cache
 coldsync
 pilot-link
diff --git a/.hgignore b/.hgignore
deleted file mode 100644 (file)
index ca0a927..0000000
--- a/.hgignore
+++ /dev/null
@@ -1,6 +0,0 @@
-(^|/)\_darcs($|/)
-(^|/)\.hg($|/)
-(^|/)\.hgtags($|/)
-^state$
-^state.old$
-^state.journal$
diff --git a/.hgtags b/.hgtags
deleted file mode 100644 (file)
index c94b23e..0000000
--- a/.hgtags
+++ /dev/null
@@ -1,6 +0,0 @@
-10ec18aa4b5b46d86a25c7f0090269d855ad30ee UPSTREAM_gpsbabel_1.2.4
-2c162c23811cef770de7137b8c7df6466f18c95f UPSTREAM_gpsbabel_1.3.2
-1f8aaa3ac6d400efcf6c570f63fa2f09e048d478 UPSTREAM_gpsbabel_1.3.3
-7fff9b65563522c02364ba8d246477a466818c9a UPSTREAM_gpsbabel_1.3.3_TAG
-cd74b2ab291a6fa2abea2d9c2bad735a728c5325 UPSTREAM_gpsbabel_1.3.4
-0ee1b52bc35ec5674d7b9910a755a79323f72f54 UPSTREAM_gpsbabel_1.3.4_TAG
diff --git a/AUTHORS b/AUTHORS
index 3e09d772a3b44358a30bde84b4bb911fe09d31d1..be7d14f4cdd32b8f993d3020bbf4b79417fa7aa4 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,6 +13,7 @@ Major contributors:
 Other contributors and helpers:
 
 * Alan Bleasby
+* Alan Porter
 * Andrew Arensburger
 * Andrew Kirmse
 * Andy Armstrong
@@ -28,6 +29,7 @@ Other contributors and helpers:
 * Frank Warmerdam
 * Fredie Kern <f.kern@xdesy.de>
 * Gary Paulson
+* Gerhard Olsson
 * Gunar Megger
 * Gustavo Niemeyer <gustavo@niemeyer.net>
 * Harald Nordius
@@ -44,7 +46,9 @@ Other contributors and helpers:
 * Justin Broughton <justinbr@earthlink.net>
 * Kjeld Jensen
 * Lilian Morinon
+* Ling Nero
 * Mark Bradley <mrcb.sf.gpsb@osps.net>
+* Mirko Parthey
 * Oyvind Kaurstad
 * P. Rosen
 * Pasha Phares
@@ -52,6 +56,7 @@ Other contributors and helpers:
 * Paul Fox
 * Paul Merchant
 * Paul Tomblin <ptomblin@xcski.com>
+* Per Borgentun
 * Richard Messeder
 * Rick Richardson <rickr@mn.rr.com>
 * Robert Shaw
@@ -61,4 +66,5 @@ Other contributors and helpers:
 * Sven Dovideit
 * Tim Zickus
 * Tobias Minich
+* Tom Hughes
 * Vladimir Nadvornik
index 4366b462e1ef83b5078a60d7e32874fa6ebbb178..7da093f414d4c8b8047181379380987d35d458f3 100644 (file)
@@ -9,7 +9,7 @@ RELEASE=@PACKAGE_RELEASE@
 VERSIOND=$(VERSD)$(RELEASE)
 VERSIONU=$(VERSU)$(RELEASE)
 
-DOCVERSION=@PACKAGE_VERSION@
+DOCVERSION=@DOCVERSION@
 # DOCVERSION=development
 
 CC=@CC@
@@ -42,20 +42,25 @@ INSTALL_DIR=$(DESTDIR)/$(PREFIX)
 # OTHER_ROOT=/opt/local        # For DarwinPorts on OSX
 # OTHER_ROOT=/sw               # Uncomment For Fink on OS X.
 
-FMTS=magproto.o gpx.o geo.o mapsend.o mapsource.o garmin_tables.o \
-       gtm.o \
-       gpsutil.o pcx.o cetus.o copilot.o gpspilot.o magnav.o \
-       psp.o holux.o garmin.o tmpro.o tpg.o tpo.o \
-       xcsv.o gcdb.o tiger.o internal_styles.o easygps.o quovadis.o \
+MINIMAL_FMTS=magproto.o gpx.o geo.o mapsend.o mapsource.o garmin.o \
+       garmin_tables.o internal_styles.o nmea.o kml.o
+
+ALL_FMTS=$(MINIMAL_FMTS) gtm.o gpsutil.o pcx.o cetus.o copilot.o \
+       gpspilot.o magnav.o \
+       psp.o holux.o tmpro.o tpg.o tpo.o \
+       xcsv.o gcdb.o tiger.o easygps.o quovadis.o \
        gpilots.o saroute.o navicache.o psitrex.o geoniche.o delgpl.o \
-       ozi.o nmea.o text.o html.o palmdoc.o netstumbler.o hsa_ndv.o \
+       ozi.o text.o html.o palmdoc.o netstumbler.o hsa_ndv.o \
        igc.o brauniger_iq.o shape.o hiketech.o glogbook.o coastexp.o \
-       vcf.o overlay.o kml.o google.o lowranceusr.o an1.o tomtom.o \
+       vcf.o overlay.o google.o xhtmlent.o lowranceusr.o an1.o tomtom.o \
        tef_xml.o maggeo.o pathaway.o vitosmt.o gdb.o bcr.o coto.o \
        ignrando.o stmwpp.o msroute.o cst.o nmn4.o mag_pdb.o compegps.o \
        yahoo.o unicsv.o wfff_xml.o garmin_txt.o axim_gpb.o gpssim.o \
        wbt-200.o stmsdf.o gtrnctr.o dmtlog.o raymarine.o alan.o vitovtt.o \
-       ggv_log.o g7towin.o garmin_gpi.o
+       ggv_log.o g7towin.o garmin_gpi.o lmx.o random.o xol.o dg-100.o \
+       navilink.o mtk_logger.o ik3d.o osm.o destinator.o exif.o vidaone.o
+
+FMTS=@FMTS@
 
 FILTERS=position.o radius.o duplicate.o arcdist.o polygon.o smplrout.o \
        reverse_route.o sort.o stackfilter.o trackfilter.o discard.o \
@@ -84,8 +89,8 @@ ZLIB=zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/inffast.o \
 LIBOBJS = queue.o route.o waypt.o filter_vecs.o util.o vecs.o mkshort.o \
           csv_util.o strptime.o grtcirc.o vmem.o util_crc.o xmlgeneric.o \
           uuid.o formspec.o xmltag.o cet.o cet_util.o fatal.o rgbcolors.o \
-         xhtmlent.o inifile.o garmin_fs.o gbsleep.o units.o @GBSER@ gbser.o \
-         gbfile.o \
+         inifile.o garmin_fs.o gbsleep.o units.o @GBSER@ gbser.o \
+         gbfile.o parse.o avltree.o \
        $(PALM_DB) $(GARMIN) $(JEEPS) $(SHAPE) @ZLIB@ $(FMTS) $(FILTERS)
 OBJS = main.o globals.o $(LIBOBJS) @FILEINFO@
 
@@ -109,6 +114,9 @@ gpsbabel-debug: $(OBJS)
 Makefile gbversion.h: Makefile.in config.status xmldoc/makedoc.in gbversion.h.in
        CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 
 
+xcsv_tokens.gperf: xcsv_tokens.in
+       gperf -L ANSI-C -D -t $? > $@
+
 config.status: configure 
        $(SHELL) config.status --recheck
 
@@ -301,8 +309,11 @@ release-upload:  /tmp/gpsbabel-$(VERSIOND).tar.gz  /tmp/gpsbabel-$(VERSIOND).zip
        @(. tools/functions && ask "Type 'yes' if you want to do the upload now" "yes" )
        curl -u anonymous:anonymous --upload-file /tmp/gpsbabel-$(VERSIOND).tar.gz ftp://upload.sf.net/incoming/
        curl -u anonymous:anonymous --upload-file /tmp/gpsbabel-$(VERSIOND).zip ftp://upload.sf.net/incoming/
-       curl -u anonymous:anonymous --upload-file /tmp/dist/SRPMS/gpsbabel-$(VERSIOND)-0.src.rpm  ftp://upload.sf.net/incoming/ 
-       curl -u anonymous:anonymous --upload-file /tmp/dist/RPMS/i386/gpsbabel-$(VERSIOND)-0.i386.rpm  ftp://upload.sf.net/incoming/ 
+       curl -u anonymous:anonymous --upload-file /tmp/dist/SRPMS/gpsbabel-$(VERSIOND).src.rpm  ftp://upload.sf.net/incoming/ 
+       curl -u anonymous:anonymous --upload-file /tmp/dist/RPMS/i386/gpsbabel-$(VERSIOND).i386.rpm  ftp://upload.sf.net/incoming/ 
+
+mac-upload:
+       curl -u anonymous:anonymous --upload-file GPSBabel+-$(VERSIOND).dmg  ftp://upload.sf.net/incoming/
 
 release: release-sourcecheck  release-tarball release-winbuild release-rpm release-upload
 
@@ -321,6 +332,12 @@ msvc-build:
        echo $(OBJS) > objs.lst
        LINK.EXE /NOLOGO @objs.lst ./msvc/expat/libexpat.lib /out:gpsbabel.exe 
 
+# release check using CVS tree
+test-release: doc gpsbabel.html
+       cvs export -r HEAD -d gpsbabel-$(VERSIOND) gpsbabel
+       rm -f gpsbabel-$(VERSIOND)/internal_styles.c
+       make release-tarball release-winbuild release-rpm
+
 # Machine generated from here down. 
 alan.o: alan.c defs.h config.h queue.h gbtypes.h zlib/zlib.h zlib/zconf.h \
   gbfile.h cet.h cet_util.h inifile.h
@@ -328,6 +345,7 @@ an1.o: an1.c defs.h config.h queue.h gbtypes.h zlib/zlib.h zlib/zconf.h \
   gbfile.h cet.h cet_util.h inifile.h an1sym.h
 arcdist.o: arcdist.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h filterdefs.h grtcirc.h
+avltree.o: avltree.h avltree.c defs.h gbtypes.h config.h
 axim_gpb.o: axim_gpb.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h
 bcr.o: bcr.c defs.h config.h queue.h gbtypes.h zlib/zlib.h zlib/zconf.h \
@@ -370,7 +388,7 @@ csv_util.o: csv_util.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \
   jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \
   jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \
-  jeeps/gpsproj.h xmlgeneric.h
+  jeeps/gpsproj.h xmlgeneric.h xcsv_tokens.gperf garmin_fs.h
 delgpl.o: delgpl.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h
 discard.o: discard.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
@@ -386,6 +404,9 @@ duplicate.o: duplicate.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h filterdefs.h
 easygps.o: easygps.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h
+exif.o: exif.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
+  zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h garmin_tables.h \
+  strptime.h
 fatal.o: fatal.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h
 filter_vecs.o: filter_vecs.c defs.h config.h queue.h gbtypes.h \
@@ -517,6 +538,8 @@ igc.o: igc.c defs.h config.h queue.h gbtypes.h zlib/zlib.h zlib/zconf.h \
   gbfile.h cet.h cet_util.h inifile.h
 ignrando.o: ignrando.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h xmlgeneric.h
+ik3d.o: ik3d.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
+  zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h xmlgeneric.h
 inifile.o: inifile.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h
 internal_styles.o: internal_styles.c defs.h config.h queue.h gbtypes.h \
@@ -561,6 +584,8 @@ msroute.o: msroute.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h \
   jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h \
   jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h
+mtk_logger.o: mtk_logger.c defs.h config.h queue.h gbtypes.h \
+   gbfile.h cet.h cet_util.h inifile.h gbser.h
 navicache.o: navicache.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h
 netstumbler.o: netstumbler.c defs.h config.h queue.h gbtypes.h \
@@ -575,6 +600,9 @@ nmn4.o: nmn4.c defs.h config.h queue.h gbtypes.h zlib/zlib.h zlib/zconf.h \
   gbfile.h cet.h cet_util.h inifile.h csv_util.h
 nukedata.o: nukedata.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h filterdefs.h
+osm.o: osm.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
+  zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h xmlgeneric.h \
+  avltree.h
 overlay.o: overlay.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h grtcirc.h
 ozi.o: ozi.c defs.h config.h queue.h gbtypes.h zlib/zlib.h zlib/zconf.h \
@@ -586,6 +614,7 @@ palmdoc.o: palmdoc.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h \
   jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h \
   pdbfile.h
+parse.o: parse.c defs.h config.h queue.h gbtypes.h jeeps/gpsmath.h
 pathaway.o: pathaway.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h csv_util.h strptime.h \
   pdbfile.h
@@ -606,6 +635,9 @@ quovadis.o: quovadis.c quovadis.h defs.h config.h queue.h gbtypes.h \
   pdbfile.h
 radius.o: radius.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h filterdefs.h grtcirc.h
+random.o: random.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
+  zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h filterdefs.h grtcirc.h \
+  jeeps/gpsmath.h
 raymarine.o: raymarine.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h csv_util.h
 reverse_route.o: reverse_route.c defs.h config.h queue.h gbtypes.h \
@@ -692,6 +724,8 @@ vcf.o: vcf.c defs.h config.h queue.h gbtypes.h zlib/zlib.h zlib/zconf.h \
   jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h
 vecs.o: vecs.c defs.h config.h queue.h gbtypes.h zlib/zlib.h zlib/zconf.h \
   gbfile.h cet.h cet_util.h inifile.h csv_util.h
+vidaone.o: vidaone.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
+  zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h
 vitosmt.o: vitosmt.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h grtcirc.h
 vitovtt.o: vitovtt.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
@@ -715,6 +749,9 @@ xmlgeneric.o: xmlgeneric.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h xmlgeneric.h
 xmltag.o: xmltag.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h
+xol.o:xol.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
+  zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h xmlgeneric.h \
+  jeeps/gpsmath.h garmin_tables.h
 yahoo.o: yahoo.c defs.h config.h queue.h gbtypes.h zlib/zlib.h \
   zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h xmlgeneric.h
 jeeps/gpsapp.o: jeeps/gpsapp.c jeeps/gps.h jeeps/../defs.h \
diff --git a/an1.c b/an1.c
index e27603055e7384b87a96455f52d1590c9256500a..c499b12b49a64055d8d11293cba9d08a02549c69 100644 (file)
--- a/an1.c
+++ b/an1.c
@@ -27,8 +27,8 @@
 #define MYNAME "an1"
 #include "defs.h"
 
-static FILE *infile;
-static FILE *outfile;
+static gbfile *infile;
+static gbfile *outfile;
 
 static char *output_type = NULL;
 static char *road_changes = NULL;
@@ -89,94 +89,30 @@ typedef struct guid {
 
 #include "an1sym.h"
 
-static unsigned short
-ReadShort(FILE * f)
-{
-       gbuint16 result = 0;
-
-       fread(&result, sizeof (result), 1, f);
-       return le_read16(&result);
-}
-
-static void 
-WriteShort(FILE * f, unsigned short s)
-{
-       gbuint16 tmp = 0;
-        le_write16( &tmp, s );
-       fwrite( &tmp, sizeof(tmp), 1, f );
-}
-
-static unsigned long
-ReadLong(FILE * f)
-{
-       gbuint32 result = 0;
-
-       fread(&result, sizeof (result), 1, f);
-       return le_read32(&result);
-}
-
-static void 
-WriteLong(FILE * f, unsigned long l)
-{
-       gbuint32 tmp = 0;
-        le_write32( &tmp, l );
-       
-       fwrite( &tmp, sizeof(tmp), 1, f );
-}
-
-static double
-ReadDouble( FILE * f )
-{
-       double tmp = 0;
-       double result = 0;
-       fread(&tmp, sizeof(tmp),1,f);
-       result = le_read_double( &tmp );
-       return result;
-}
-
-static void 
-WriteDouble(FILE * f, double d)
-{
-       double tmp = 0;
-        le_write_double( &tmp, d );
-       fwrite( &tmp, sizeof(tmp), 1, f );
-}
+#define ReadShort(f) gbfgetint16(f)
+#define WriteShort(f,s) gbfputint16((s),f)
+#define ReadLong(f) gbfgetint32(f)
+#define WriteLong(f,l) gbfputint32((l),f)
+#define ReadDouble(f) gbfgetdbl(f)
+#define WriteDouble(f,d) gbfputdbl((d),f)
 
 static char *
-ReadString( FILE * f, short len ) 
+ReadString( gbfile * f, short len ) 
 {
        char *result = NULL;
        result = (char *)xcalloc( 1, len + 1 );
        if ( len ) {
-               fread( result, 1, len, f );
-       }
-       return result;
-}
-
-static unsigned char
-ReadChar( FILE *f )
-{
-       unsigned char result = 0;
-       if (fread( &result, 1, 1, f ) < 1) {
-               fatal( MYNAME ": error reading an1 file.  Perhaps this isn't really an an1 file.");
+               gbfread( result, 1, len, f );
        }
        return result;
 }
 
-static void
-WriteChar( FILE *f, unsigned char c ) 
-{
-       fwrite( &c, 1, 1, f );
-}
-
-static void
-WriteString( FILE *f, char *s )
-{
-       fwrite( s, 1, strlen(s), f );
-}
+#define ReadChar(f) (unsigned char) gbfgetc(f)
+#define WriteChar(f,c) gbfputc((unsigned char)(c),f)
+#define WriteString(f,s) gbfputs((s),f)
 
 static void 
-ReadGuid( FILE *f, GUID *guid )
+ReadGuid( gbfile *f, GUID *guid )
 {
        int i = 0;
        guid->l = ReadLong( f );
@@ -189,7 +125,7 @@ ReadGuid( FILE *f, GUID *guid )
 }
 
 static void 
-WriteGuid( FILE *f, GUID *guid )
+WriteGuid( gbfile *f, GUID *guid )
 {
        int i = 0;
        WriteLong( f, guid->l );
@@ -202,10 +138,10 @@ WriteGuid( FILE *f, GUID *guid )
 }      
 
 static void
-Skip(FILE * f,
+Skip(gbfile * f,
      unsigned long distance)
 {
-       fseek(f, distance, SEEK_CUR);
+       gbfseek(f, distance, SEEK_CUR);
 }
 
 static double
@@ -386,7 +322,7 @@ static void Destroy_AN1_Symbol( an1_symbol_record *symbol ) {
        xfree( symbol->name );
 }
 
-static void Read_AN1_Waypoint( FILE *f, an1_waypoint_record *wpt ) {
+static void Read_AN1_Waypoint( gbfile *f, an1_waypoint_record *wpt ) {
        short len;
        
        wpt->magic = ReadShort( f );
@@ -476,7 +412,7 @@ static void Read_AN1_Waypoint( FILE *f, an1_waypoint_record *wpt ) {
        wpt->fillflags = ReadLong( f ); 
 }
 
-static void Write_AN1_Waypoint( FILE *f, an1_waypoint_record *wpt ) {
+static void Write_AN1_Waypoint( gbfile *f, an1_waypoint_record *wpt ) {
        short len;
        
        WriteShort( f, wpt->magic );
@@ -564,7 +500,7 @@ static void Write_AN1_Waypoint( FILE *f, an1_waypoint_record *wpt ) {
        WriteLong( f, wpt->fillflags ); 
 }
 
-static void Read_AN1_Vertex( FILE *f, an1_vertex_record *vertex ) {
+static void Read_AN1_Vertex( gbfile *f, an1_vertex_record *vertex ) {
        
        vertex->magic = ReadShort( f );
        vertex->unk0 = ReadLong( f );
@@ -573,7 +509,7 @@ static void Read_AN1_Vertex( FILE *f, an1_vertex_record *vertex ) {
        vertex->unk1 = ReadShort( f );
 }
 
-static void Write_AN1_Vertex( FILE *f, an1_vertex_record *vertex ) {
+static void Write_AN1_Vertex( gbfile *f, an1_vertex_record *vertex ) {
        WriteShort( f, vertex->magic );
        WriteLong( f, vertex->unk0 );
        WriteLong( f, vertex->lon );
@@ -581,7 +517,7 @@ static void Write_AN1_Vertex( FILE *f, an1_vertex_record *vertex ) {
        WriteShort( f, vertex->unk1 );
 }
 
-static void Read_AN1_Line( FILE *f, an1_line_record *line ) {
+static void Read_AN1_Line( gbfile *f, an1_line_record *line ) {
        
        short len;
        
@@ -604,7 +540,7 @@ static void Read_AN1_Line( FILE *f, an1_line_record *line ) {
        line->pointcount = ReadLong( f );
 }
 
-static void Write_AN1_Line( FILE *f, an1_line_record *line ) {
+static void Write_AN1_Line( gbfile *f, an1_line_record *line ) {
        short len;
        
        WriteLong( f, line->roadtype );
@@ -627,11 +563,11 @@ static void Write_AN1_Line( FILE *f, an1_line_record *line ) {
        WriteLong( f, line->pointcount );
 } 
 
-static void Skip_AN1_IL( FILE *f ) {
+static void Skip_AN1_IL( gbfile *f ) {
        Skip( f, 26 );
 }
 
-static void Skip_AN1_BM( FILE *f ) {
+static void Skip_AN1_BM( gbfile *f ) {
        unsigned long bmsize;
        unsigned long palettesize;
        unsigned long bmisize;
@@ -649,7 +585,7 @@ static void Skip_AN1_BM( FILE *f ) {
        Skip( f, bmsize + palettesize );
 }
 
-static void Read_AN1_Symbol( FILE *f, an1_symbol_record *symbol ) {
+static void Read_AN1_Symbol( gbfile *f, an1_symbol_record *symbol ) {
        short len;
 
        /* This is just the high word of a long; we ate the low 
@@ -662,7 +598,7 @@ static void Read_AN1_Symbol( FILE *f, an1_symbol_record *symbol ) {
        symbol->name = ReadString( f, len );
 }
 
-static void Read_AN1_Header( FILE *f ) {
+static void Read_AN1_Header( gbfile *f ) {
        unsigned short magic;
        unsigned short type;
        
@@ -672,12 +608,12 @@ static void Read_AN1_Header( FILE *f ) {
        last_read_type = type;
 }
 
-static void Write_AN1_Header( FILE *f ) {
+static void Write_AN1_Header( gbfile *f ) {
        WriteShort( f, 11557 );
        WriteShort( f, output_type_num );
 }
 
-static void Read_AN1_Bitmaps( FILE *f ) {
+static void Read_AN1_Bitmaps( gbfile *f ) {
        long count;
        unsigned short magic;
        an1_symbol_record symbol;
@@ -704,13 +640,13 @@ static void Read_AN1_Bitmaps( FILE *f ) {
        /* Read the symbol table */
 }
 
-static void Write_AN1_Bitmaps( FILE *f ) {
+static void Write_AN1_Bitmaps( gbfile *f ) {
        /* On write, we don't output any bitmaps, so writing them
         * is just a matter of writing a count of zero */
        WriteLong( f, 0 );
 }
 
-static void Read_AN1_Waypoints( FILE *f ) {
+static void Read_AN1_Waypoints( gbfile *f ) {
        unsigned long count = 0;
        unsigned long i = 0;
        an1_waypoint_record *rec = NULL;
@@ -839,13 +775,13 @@ Write_One_AN1_Waypoint( const waypoint *wpt )
        }
 }
 
-static void Write_AN1_Waypoints( FILE *f ) {
+static void Write_AN1_Waypoints( gbfile *f ) {
        WriteShort( f, 2 );
        WriteLong( f, waypt_count() );
        waypt_disp_all( Write_One_AN1_Waypoint );
 }
 
-static void Read_AN1_Lines( FILE *f ) {
+static void Read_AN1_Lines( gbfile *f ) {
        unsigned long count = 0;
        unsigned long i = 0;
        unsigned long j = 0;
@@ -1026,7 +962,7 @@ Write_One_AN1_Vertex( const waypoint *wpt )
        }
 }
 
-static void Write_AN1_Lines( FILE *f ) {
+static void Write_AN1_Lines( gbfile *f ) {
        WriteShort( f, 2 );
        WriteLong( f, route_count()+track_count() );
        
@@ -1213,13 +1149,13 @@ Init_Road_Changes( void )
 static void
 rd_init(const char *fname)
 {
-       infile = xfopen(fname, "rb", MYNAME);
+       infile = gbfopen_le(fname, "rb", MYNAME);
 }
 
 static void
 rd_deinit(void)
 {
-       fclose(infile);
+       gbfclose(infile);
 }
 
 static void
@@ -1234,7 +1170,7 @@ my_read(void)
 static void
 wr_init(const char *fname)
 {
-       outfile = xfopen( fname, "wb", MYNAME );
+       outfile = gbfopen_le( fname, "wb", MYNAME );
        Init_Output_Type();
        Init_Road_Changes();
        opt_color_num = color_to_bbggrr(opt_color);
@@ -1255,7 +1191,7 @@ static void
 wr_deinit( void ) 
 {
        Free_Road_Changes();
-       fclose(outfile);
+       gbfclose(outfile);
 }
 
 static void
diff --git a/avltree.c b/avltree.c
new file mode 100644 (file)
index 0000000..c90c568
--- /dev/null
+++ b/avltree.c
@@ -0,0 +1,723 @@
+/*
+
+    AVL tree implementation.
+
+    Copyright (C) 2008 Olaf Klein, o.b.klein@gpsbabel.org
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+*/
+
+#include "avltree.h"
+
+#define MYNAME "avltree"
+
+#ifdef DEBUG_MEM
+#  define AVLTREE_MAGIC        0x41564c53      
+/* ((((((0L | 'A') << 8) | 'V') << 8) | 'L') << 8) | 'T'; */
+#endif
+
+#ifdef MEM_DEBUG
+void avltree_check_handle(const void *tree);
+#endif
+static void avltree_node_free(const avltree_t *tree, avlnode_t *node);
+static int avltree_node_height(avlnode_t *node);
+static int avltree_insert_node(avltree_t *tree, avlnode_t **root, const char *key, const void *data);
+static int avltree_delete_node(avltree_t *tree, const char *key, avlnode_t **root, int *changed);
+static avlnode_t *avltree_right_rotation(avlnode_t *A);
+static avlnode_t *avltree_left_rotation(avlnode_t *A);
+static avlnode_t *avltree_left_right_rotation(avlnode_t *A);
+static avlnode_t *avltree_right_left_rotation(avlnode_t *A);
+static avlnode_t *avltree_dupe_node(const avltree_t *tree, const avlnode_t *node);
+static int avltree_strcmpr(const char *s1, const char *s2);
+static int avltree_case_ignore_strcmpr(const char *s1, const char *s2);
+static avlnode_t *avltree_find_next(const avltree_t *tree, avlnode_t *node, const char *key);
+static void avltree_save_key(avltree_t *tree, const char *key);
+
+
+#ifdef MEM_DEBUG
+# define AVLTREE_CHECK_HANDLE(a) avltree_valid_tree(a)
+#else
+# define AVLTREE_CHECK_HANDLE(a)
+#endif
+
+#define AVLTREE_INVALID_BALANCE "%s/%s.%d: Invalid balance %d at node \"%s\"!\n", \
+       tree->module, MYNAME, __LINE__, node->balance, node->key
+
+
+/* Allocate and initialize an AVL Tree */
+
+avltree_t *
+avltree_init(const int options, const char *module)
+{
+       avltree_t *tree;
+
+       if ((module == NULL) || (*module == '\0'))
+               fatal(MYNAME ": 'avltree_init' should be called with a valid module name!\n");
+
+       tree = xcalloc(1, sizeof(*tree));
+       tree->options = options;
+       tree->module = module;
+
+       if (options & AVLTREE_NON_CASE_SENSITIVE) {
+               if (options & AVLTREE_DESCENDING)
+                       tree->compare = avltree_case_ignore_strcmpr;    /* descending, non-case-sensitive */
+               else
+                       tree->compare = case_ignore_strcmp;             /* ascending, non-case-sensitive */
+       }
+       else {
+               if (options & AVLTREE_DESCENDING)
+                       tree->compare = avltree_strcmpr;                /* descending, case-sensitive */
+               else
+                       tree->compare = strcmp;                         /* ascending, case-sensitive */
+       }
+       
+       return tree;
+}
+
+
+/* Destroy an AVL Tree */
+
+void
+avltree_done(avltree_t *tree)
+{
+       AVLTREE_CHECK_HANDLE(tree);
+
+       avltree_save_key(tree, NULL);
+       if (tree->count)
+               avltree_node_free(tree, tree->root);
+       xfree(tree);
+}
+
+
+/* Get number of items in tree */
+
+int
+avltree_count(const avltree_t *tree)
+{
+       AVLTREE_CHECK_HANDLE(tree);
+
+       return tree->count;
+}
+
+
+/* Delete item with key [key] */
+
+int
+avltree_delete(avltree_t *tree, const char *key)
+{
+       int changed = 0;
+       
+       AVLTREE_CHECK_HANDLE(tree);
+
+       if (key == NULL)
+               fatal("%s/%s.%d: Attempt to delete a NULL-pointer!\n",
+                       tree->module, MYNAME, __LINE__);
+
+       return avltree_delete_node(tree, key, &tree->root, &changed);
+}
+
+
+/* Duplicate an existing tree */
+
+avltree_t *
+avltree_dupe(const avltree_t *tree, const char *module)
+{
+       avltree_t *dupe;
+       
+       AVLTREE_CHECK_HANDLE(tree);
+
+       dupe = avltree_init(tree->options, module);
+       if ((dupe->count = tree->count))
+               dupe->root = avltree_dupe_node(tree, tree->root);
+       
+       return dupe;
+}
+
+
+/* Find key [key] in tree */
+
+int
+avltree_find(const avltree_t *tree, const char *key, const void **data)
+{
+       avlnode_t *node;
+       
+       AVLTREE_CHECK_HANDLE(tree);
+
+       node = tree->root;
+       while (node) {
+               int compare = tree->compare(key, node->key);
+
+               if (compare < 0)
+                       node = node->left;
+               else if (compare > 0)
+                       node = node->right;
+               else {
+                       if (data)
+                               (*data) = node->data;
+                       break;
+               }
+       }
+
+       return (node) ? 1 : 0;
+}
+
+
+/* Get the first (the MIN-) entry of the tree */
+
+const char *
+avltree_first(const avltree_t *tree, const void **data)
+{
+       return avltree_next(tree, NULL, data);
+}
+
+
+/* Get the current height of the tree */
+
+int
+avltree_height(const avltree_t *tree)
+{
+       AVLTREE_CHECK_HANDLE(tree);
+
+       if (tree->count)
+               return avltree_node_height(tree->root);
+       else
+               return 0;
+}
+
+
+/* Insert key [key] and [data] into tree */
+
+int
+avltree_insert(avltree_t *tree, const char *key, const void *data)
+{
+       int count;
+       
+       AVLTREE_CHECK_HANDLE(tree);
+
+       if (key == NULL)
+               fatal("%s/%s.%d: Attempt to insert a NULL-pointer!\n",
+                       tree->module, MYNAME, __LINE__);
+
+       count = tree->count;
+       avltree_insert_node(tree, &tree->root, key, data);
+       return (count != tree->count) ? 1 : 0;
+}
+
+
+/* Get the next (the entry above [key]) */
+
+const char *
+avltree_next(const avltree_t *tree, const char *key, const void **data)
+{
+       avlnode_t *node;
+       
+       AVLTREE_CHECK_HANDLE(tree);
+
+       if (key == NULL)
+               fatal("%s/%s.%d: Attempt to look for a NULL-pointer!\n",
+                       tree->module, MYNAME, __LINE__);
+       
+       node = tree->root;
+       if (! node) return NULL;
+       
+       if ((node = avltree_find_next(tree, node, key))) {
+               avltree_save_key((avltree_t *)tree, node->key);
+               if (data)
+                       (*data) = node->data;
+       }
+       else
+               avltree_save_key((avltree_t *)tree, NULL);
+
+       return tree->key;
+}
+
+
+/* ------------------------------ static stuff ------------------------------ */
+
+
+#ifdef MEM_DEBUG
+
+void
+avltree_check_handle(const avltree_t *tree)
+{
+       if (! tree)
+               fatal(MYNAME ": Invalid (NULL-) pointer!\n");
+       if (tree->magic != AVLTREE_MAGIC)
+               fatal(MYNAME ": Invalid (no AVL tree object) pointer!\n");
+}
+
+#endif 
+
+
+static void 
+avltree_node_free(const avltree_t *tree, avlnode_t *node)
+{
+       if ((! (tree->options & AVLTREE_STATIC_KEYS)) && node->key)
+                xfree((char *)node->key);
+       if (node->left)
+               avltree_node_free(tree, node->left);
+       if (node->right)
+               avltree_node_free(tree, node->right);
+       xfree(node);
+}
+
+
+static int
+avltree_node_height(avlnode_t *node)
+{
+       int height = 1;
+       
+       if (node->balance < 0)
+               height += avltree_node_height(node->left);
+       else if (node->right)
+               height += avltree_node_height(node->right);
+
+       return height;
+}
+
+
+static avlnode_t *
+avltree_right_rotation(avlnode_t *A)
+{
+/*
+>          A                         B
+>         / \                       / \
+>            \                     /   \
+>             B       -->>        A     .
+>            / \                 / \   / \
+>               \
+>                .
+>               / \
+*/       
+       avlnode_t *B;
+
+       B = A->right;
+       A->right = B->left;
+       B->left = A;
+
+       /* update balance of all touched nodes */       
+       /* reference: <http://cmcrossroads.com/bradapp/ftp/src/libs/C++/AvlTrees.html> */
+
+       B->balance--;
+       A->balance = -(B->balance);
+
+       return B;
+}
+
+
+static avlnode_t *
+avltree_left_rotation(avlnode_t *A)
+{
+/*
+>              A                     B
+>             / \                   / \
+>            /                     /   \
+>           B         -->>        .     A
+>          / \                   / \   / \
+>         /
+>        .
+>       / \
+*/       
+       avlnode_t *B;
+
+       B = A->left;
+       A->left = B->right;
+       B->right = A;
+
+       /* update balance of all touched nodes */       
+       /* reference: <http://cmcrossroads.com/bradapp/ftp/src/libs/C++/AvlTrees.html> */
+
+       B->balance++;
+       A->balance = -(B->balance);
+
+       return B;
+}
+         
+     
+static avlnode_t *
+avltree_left_right_rotation(avlnode_t *A)
+{
+/*
+>          A                       C
+>         / \                     / \
+>        /                       /   \
+>       B           -->>        B     A
+>      / \                     / \   / \
+>         \
+>          C
+*/       
+       avlnode_t *B, *C;
+
+       B = A->left;
+       C = B->right;
+       A->left = C->right;
+       B->right = C->left;
+       C->right = A;
+       C->left = B;
+
+       /* update balance of all touched nodes */       
+       /* reference: <http://cmcrossroads.com/bradapp/ftp/src/libs/C++/AvlTrees.html> */
+
+       A->balance = (C->balance > 0) ? 0 : -(C->balance);
+       B->balance = (C->balance < 0) ? 0 : -(C->balance);
+       C->balance = 0;
+
+       return C;
+}
+
+
+static avlnode_t *
+avltree_right_left_rotation(avlnode_t *A)
+{
+/*
+>          A                       C
+>         / \                     / \
+>            \                   /   \
+>             B      -->>       B     A
+>            / \               / \   / \
+>           /   
+>          C
+*/       
+       avlnode_t *B, *C;
+       
+       B = A->right;
+       C = B->left;
+       A->right = C->left;
+       B->left = C->right;
+       C->left = A;
+       C->right = B;
+
+       /* update balance of all touched nodes */       
+       /* reference: <http://cmcrossroads.com/bradapp/ftp/src/libs/C++/AvlTrees.html> */
+
+       A->balance = (C->balance < 0) ? 0 : -(C->balance);
+       B->balance = (C->balance > 0) ? 0 : -(C->balance);
+       C->balance = 0;
+
+       return C;
+}
+
+
+static int
+avltree_insert_node(avltree_t *tree, avlnode_t **root, const char *key, const void *data)
+{
+       int changed = 0;
+       int compare;
+       avlnode_t *node = (*root);
+
+       if (node == NULL) {
+               (*root) = node = xcalloc(1, sizeof(*node));
+               if (tree->options & AVLTREE_STATIC_KEYS)
+                       node->key = key;
+               else
+                       node->key = xstrdup(key);
+               node->data = data;
+               tree->count++;
+               return 1;       /* anyway, our tree has been changed */
+       }
+       
+       compare = tree->compare(key, node->key);
+
+       if (compare < 0) {
+               if (avltree_insert_node(tree, &node->left, key, data)) {
+                       changed = (--node->balance != 0);
+                       switch(node->balance) {
+                               case -2:
+                                       if (node->left->balance < 0)
+                                               node = avltree_left_rotation(node);
+                                       else
+                                               node = avltree_left_right_rotation(node);
+                                       (*root) = node;
+                               case  0:
+                                       changed = 0;
+                               case -1:
+                                       break;
+                               default:
+                                       /* should be impossible :-) */
+                                       fatal(AVLTREE_INVALID_BALANCE);
+                       }
+               }
+               else
+                       changed = 0;
+       }
+       else if (compare > 0) {
+               if (avltree_insert_node(tree, &node->right, key, data)) {
+                       changed = (++node->balance != 0);
+                       switch(node->balance) {
+                               case +2:
+                                       if (node->right->balance > 0)
+                                               node = avltree_right_rotation(node);
+                                       else
+                                               node = avltree_right_left_rotation(node);
+                                       (*root) = node;
+                               case 0:
+                                       changed = 0;
+                               case +1:
+                                       break;
+                               default:
+                                       /* should be impossible :-) */
+                                       fatal(AVLTREE_INVALID_BALANCE);
+                       }
+               }
+               else
+                       changed = 0;
+       }
+       else {
+               if (tree->options & AVLTREE_PARANOIAC)
+                       fatal("%s/%s.%d: Duplicate keys are not allowed (\"%s\")!\n",
+                               tree->module, MYNAME, __LINE__, key);
+               changed = 0;
+       }
+
+       return changed;
+}
+
+
+
+static int
+avltree_delete_node(avltree_t *tree, const char *key, avlnode_t **root, int *changed)
+{
+       avlnode_t *node = (*root);
+       int deleted = 0;
+       int compare;
+       
+       if (node == NULL) {
+               if (tree->options & AVLTREE_PARANOIAC)
+                       fatal("%s/%s.%d: Key to delete \"%s\" not found!\n",
+                               tree->module, MYNAME, __LINE__, key);
+               return 0;
+       }
+       
+       compare = tree->compare(key, node->key);
+
+       if (compare < 0) {
+               deleted = avltree_delete_node(tree, key, &node->left, changed);
+               if (*changed) {
+                       node->balance++;                /* shift weight to right */
+                       switch(node->balance) {
+                               case +1:
+                                       (*changed) = 0; /* stop rebalancing */
+                               case 0:
+                                       break;
+                               case +2:
+                                       if (node->right->balance >= 0)
+                                               node = avltree_right_rotation(node);
+                                       else
+                                               node = avltree_right_left_rotation(node);
+                                       (*root) = node;
+                                       if (node->balance == -1)
+                                               (*changed) = 0;
+                                       break;
+                               default:
+                                       /* should be impossible :-) */
+                                       fatal(AVLTREE_INVALID_BALANCE);
+                       }
+               }
+       }
+       else if (compare > 0) {
+               deleted = avltree_delete_node(tree, key, &node->right, changed);
+               if (*changed) {
+                       node->balance--;                /* shift weight to left */
+                       switch(node->balance) {
+                               case -1:
+                                       (*changed) = 0; /* stop rebalancing */
+                               case 0: 
+                                       break;
+                               case -2:
+                                       if (node->left->balance <= 0)
+                                               node = avltree_left_rotation(node);
+                                       else
+                                               node = avltree_left_right_rotation(node);
+                                       (*root) = node;
+                                       if (node->balance == +1)
+                                               (*changed) = 0;
+                                       break;
+                               default:
+                                       /* should be impossible :-) */
+                                       fatal(AVLTREE_INVALID_BALANCE);
+                       }
+               }
+       }
+       else {
+               if (node->left) {
+                       if (node->right) {
+                               const char *temp_key;
+                               const void *temp_data;
+                               avlnode_t *succ = node->right;
+
+                               while (succ->left) succ = succ->left;   /* find successor */
+
+                               temp_key = succ->key;                   /* swap contents */
+                               temp_data = succ->data;
+                               succ->key = node->key;
+                               succ->data = node->data;
+                               node->key = temp_key;
+                               node->data = temp_data;
+
+                               deleted = avltree_delete_node(tree, key, &node->right, changed);
+
+                               if (*changed) {
+                                       node->balance--;                /* shift weight to left */
+                                       switch(node->balance) {
+                                               case -1:
+                                                       (*changed) = 0; /* stop rebalancing */
+                                               case 0: 
+                                                       break;
+                                               case -2:
+                                                       if (node->left->balance <= 0)
+                                                               node = avltree_left_rotation(node);
+                                                       else
+                                                               node = avltree_left_right_rotation(node);
+                                                       (*root) = node;
+                                                       if (node->balance == +1)
+                                                               (*changed) = 0;
+                                                       break;
+                                               default:
+                                                       /* should be impossible :-) */
+                                                       fatal(AVLTREE_INVALID_BALANCE);
+                                       }
+                               }
+                               return deleted;
+                       }
+                       else {  /* only left branch */
+                               (*root) = node->left;
+                               node->left = NULL;
+                       }
+               }
+               else if (node->right) { /* only right branch */
+                       (*root) = node->right;
+                       node->right = NULL;
+               }
+               else    /* only a simple leaf */
+                       (*root) = NULL;
+
+               avltree_node_free(tree, node);
+               tree->count--;
+               (*changed) = 1;
+               deleted = 1;
+       }
+
+       return deleted;
+}
+
+
+static avlnode_t *
+avltree_dupe_node(const avltree_t *tree, const avlnode_t *node)
+{
+       avlnode_t *res = xcalloc(1, sizeof(*res));
+       
+       if (tree->options & AVLTREE_STATIC_KEYS)
+               res->key = node->key;
+       else
+               res->key = xstrdup(node->key);
+       
+       res->balance = node->balance;
+       if (node->left)
+               res->left = avltree_dupe_node(tree, node->left);
+       if (node->right)
+               res->right = avltree_dupe_node(tree, node->right);
+       
+       return res;
+}
+
+
+static int
+avltree_strcmpr(const char *s1, const char *s2)
+{
+       return -(strcmp(s1, s2));
+}
+
+
+static int
+avltree_case_ignore_strcmpr(const char *s1, const char *s2)
+{
+       return -(case_ignore_strcmp(s1, s2));
+}
+
+
+static avlnode_t *
+avltree_find_next(const avltree_t *tree, avlnode_t *node, const char *key)
+{
+       avlnode_t *prev = NULL;
+
+       if (key == NULL) {
+               if ((node = tree->root)) {
+                       while (node->left)
+                               node = node->left;
+               }
+               return node;
+       }
+
+       while (node) {
+               int compare = tree->compare(key, node->key);
+
+               if (compare < 0) {
+                       prev = node;
+                       node = node->left;
+               }
+               else if (compare > 0) 
+                       node = node->right;
+               else {
+                       if ((node = node->right))
+                               while (node->left) node = node->left;
+                       else
+                               node = prev;
+                       return node;
+               }
+       }
+       /* The previous node was deleted and we could not find it. */
+       return prev;
+}
+
+
+/*
+   Save [key] for a possible delete before next op. Now we have no problem with:
+       curr = NULL;
+       while ((curr = avtree_next(tree, curr, NULL))) {
+               avltree_delete(tree, curr);
+       }
+ */
+static void
+avltree_save_key(avltree_t *tree, const char *key)
+{
+       if (tree->options & AVLTREE_STATIC_KEYS)
+               tree->key = key;
+       else {
+               if (key == NULL) {
+                       if (tree->key_sz) {
+                               xfree((char *)tree->key);
+                               tree->key_sz = 0;
+                       }
+                       tree->key = NULL;
+               }
+               else {
+                       int n, n8;
+                       
+                       n = strlen(key) + 1;
+                       n8 = ((n + 7) / 8) * 8;
+
+                       if (n8 > tree->key_sz) {
+                               if (tree->key_sz == 0)
+                                       tree->key = xmalloc(n8);
+                               else
+                                       tree->key = xrealloc((char *)tree->key, n8);
+                               tree->key_sz = n8;
+                       }
+                       strncpy((char *)tree->key, key, n);
+               }
+       }
+}
diff --git a/avltree.h b/avltree.h
new file mode 100644 (file)
index 0000000..d8c9ddb
--- /dev/null
+++ b/avltree.h
@@ -0,0 +1,94 @@
+/*
+
+    AVL tree implementation.
+    
+    Copyright (C) 2008 Olaf Klein, o.b.klein@gpsbabel.org
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+*/
+
+#ifndef AVLTREE_H_INCLUDED
+#define AVLTREE_H_INCLUDED
+
+#include "defs.h"
+#include <stdlib.h>
+#include <string.h>
+
+typedef int (*avltree_compare_cb) (const char *, const char *);
+
+typedef struct avltree_s
+{
+#ifdef MEM_DEBUG
+       const int magic;
+#endif
+       struct avlnode_s *root;
+       const char *module;
+       int count;              /* number of items in tree */
+       int options;
+       const char *key;
+       int key_sz;
+       avltree_compare_cb compare;
+} avltree_t;
+
+typedef struct avlnode_s {
+       int balance;
+       const char *key;
+       const void *data;
+       struct avlnode_s *left;
+       struct avlnode_s *right;
+} avlnode_t;
+
+/* options for avltree_init */
+
+#define AVLTREE_ASCENDING              0       /* default */
+#define AVLTREE_DESCENDING             1
+#define AVLTREE_CASE_SENSITIVE         0       /* default */
+#define AVLTREE_NON_CASE_SENSITIVE     2
+#define AVLTREE_STATIC_KEYS            128
+#define AVLTREE_PARANOIAC              256     /* STOP on "duplicate key" (insert) or on "not found" (delete) */
+
+/* Allocate and initialize an AVL Tree */
+avltree_t *avltree_init(const int options, const char *module);
+
+/* Destroy an AVL Tree */
+void avltree_done(avltree_t *tree);
+
+/* Get number of items in tree */
+int avltree_count(const avltree_t *tree);
+
+/* Delete item with key [key] */
+int avltree_delete(avltree_t *tree, const char *key);
+
+/* Duplicate an existing tree */
+avltree_t *avltree_dupe(const avltree_t *tree, const char *module);
+
+/* Find key [key] in tree */
+int avltree_find(const avltree_t *tree, const char *key, const void **data);
+
+/* Get the first (the MIN-) entry of the tree */
+const char *avltree_first(const avltree_t *tree, const void **data);
+
+/* Get the current height of the tree */
+int avltree_height(const avltree_t *tree);
+
+/* Insert key [key] and [data] into tree */
+int avltree_insert(avltree_t *tree, const char *key, const void *data);
+
+/* Get the next (the entry above [key]) */
+const char *avltree_next(const avltree_t *tree, const char *key, const void **data);
+
+
+#endif /* AVLTREE_H_INCLUDED */
index 6d083cee89bfa4f1671a83fd88352d194e66c30f..a931ba0331a95323d6e22476fc862f25049f1bc8 100644 (file)
@@ -104,8 +104,8 @@ decode_buff(const char *buff, route_head *track)
                (tm.tm_hour > 23) || (tm.tm_min > 60) || (tm.tm_sec > 60),
                MYNAME ": Invalid or unsupported file (invalid time-stamp).");
        is_fatal(
-               (fabs(wpt->latitude) > 180) ||
-               (fabs(wpt->longitude) > 90),
+               (fabs(wpt->latitude) > 90) ||
+               (fabs(wpt->longitude) > 180),
                MYNAME ": Invalid or unsupported file (lat or/and lon out of range).");
 
        /* post work */
diff --git a/bcr.c b/bcr.c
index c9eaf340eab737ea7f1b19017372cd4ffa098b63..0be68f4f82d1ce68e43dbacd4a9bac778869237f 100644 (file)
--- a/bcr.c
+++ b/bcr.c
@@ -298,7 +298,12 @@ bcr_data_read(void)
                
                route_add_wpt(route, wpt);
        }
-       bcr_create_waypts_from_route(route);
+       
+       /* remove empty route */
+       if (route->rte_waypt_ct == 0)
+               route_del_head(route);
+       else
+               bcr_create_waypts_from_route(route);
 }
 
 /* %%% bcr write support %%% ----------------------------------- */
index 19e76f24d6e4a2a8ce942d8e413136531736e685..d8fd3930ff9ae183c5e67a8bd4a6ad8b5ca7f462 100644 (file)
@@ -1154,38 +1154,30 @@ cet_disp_character_set_names(FILE *fout)
 
 int cet_gbfprintf(gbfile *stream, const cet_cs_vec_t *src_vec, const char *fmt, ...)
 {
-       char buff[128];
-       int res, ct;
+       int res;
+       char *cout;
        va_list args;
-       char *cout = buff;
 
        va_start(args, fmt);
-       ct = vsnprintf(buff, sizeof(buff), fmt, args);
+       xvasprintf(&cout, fmt, args);
        va_end(args);
 
-       if (ct >= (int)sizeof(buff)) {
-               cout = xmalloc(ct + 1);
-               va_start(args, fmt);
-               vsnprintf(cout, ct + 1, fmt, args);
-               va_end(args);
-       }
-
        if (global_opts.charset != src_vec)
        {
                if (src_vec != &cet_cs_vec_utf8) {
                        char *ctemp = cet_str_any_to_utf8(cout, src_vec);
-                       if (cout != buff) xfree(cout);
+                       xfree(cout);
                        cout = ctemp;
                }
                if (global_opts.charset != &cet_cs_vec_utf8) {
                        char *ctemp = cet_str_utf8_to_any(cout, global_opts.charset);
-                       if (cout != buff) xfree(cout);
+                       xfree(cout);
                        cout = ctemp;
                }
        }
 
        res = gbfprintf(stream, "%s", cout);
-       if (cout != buff) xfree(cout);
+       xfree(cout);
        
        return res;
 }
diff --git a/cetus.c b/cetus.c
index 8617a29959904293730407e097eba8e0290a3182..138625966a1a063a2395f7b85c757d041ccfd259 100644 (file)
--- a/cetus.c
+++ b/cetus.c
@@ -1,7 +1,7 @@
 /*
     Read and write Cetus files.
 
-    Copyright (C) 2002 Robert Lipe, robertlipe@usa.net
+    Copyright (C) 2002-2008 Robert Lipe, robertlipe@usa.net
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -124,7 +124,7 @@ typedef struct cetus_track_point_s
        char hour;
        char min;
        char sec;
-       char msec;
+       char dsec;
        char sat;
        char hdop;
        pdb_32 latitude;
@@ -181,17 +181,19 @@ read_track_point(cetus_track_point_t *data, const time_t basetime)
        i = be_read16(&data->course);
        if (i != 4000) WAYPT_SET(wpt, course, (float) i / 10);
        
-       switch(data->hour / 32) /* extract fix */
+       switch(data->hour >> 5) /* extract fix */
        {
-           case 0: break;                      /* no GPS */
            case 1: wpt->fix = fix_none; break;
            case 2: wpt->fix = fix_2d; break;
            case 3: wpt->fix = fix_3d; break;
            case 4: wpt->fix = fix_dgps; break;
+           default: break;                     /* no GPS */
        }
        
        wpt->creation_time = basetime +
-           ((data->hour % 32) * 3600) + (data->min * 60) + data->sec;
+           ((data->hour & 0x1F) * 3600) + (data->min * 60) + data->sec;
+       if (data->dsec)
+           wpt->microseconds = (int)data->dsec * 10000;
 
        return wpt;
 }
@@ -205,7 +207,7 @@ read_tracks(const pdbfile *pdb)
        char descr[(2 * TRACK_POINT_SIZE) + 1];
        char temp_descr[TRACK_POINT_SIZE + 1];
        cetus_track_head_t *head;
-       waypoint *wpt, *prev;
+       waypoint *wpt;
        route_head *track;
        time_t basetime;
        
@@ -230,7 +232,6 @@ read_tracks(const pdbfile *pdb)
            records = reclen / TRACK_POINT_SIZE;
 
            c += 8;
-           prev = NULL;
            
            for (i = 0; i < records; i++, c += TRACK_POINT_SIZE)
            {
@@ -240,7 +241,8 @@ read_tracks(const pdbfile *pdb)
                    
                    case 0:     /* track header */
                        head = (cetus_track_head_t *)c; 
-                       if (head->id[0] != 'C' || head->id[1] != 'G') fatal(MYNAME ": Invalid track header!\n");
+                       if (head->id[0] != 'C' || head->id[1] != 'G')
+                           fatal(MYNAME ": Invalid track header!\n");
                        
                        memset(&tm, 0, sizeof(tm));
                        tm.tm_mday = head->day;
@@ -266,14 +268,6 @@ read_tracks(const pdbfile *pdb)
                        {
                            track_add_wpt(track, wpt);
                            points++;
-                           
-                           /* Did we run over midnight ? */
-                           if ((prev != NULL) && (prev->creation_time > wpt->creation_time))
-                           {
-                               basetime += (24 * 3600);
-                               wpt->creation_time += (24 * 3600);
-                           }
-                           prev = wpt;
                        }
                        else
                            dropped++;
@@ -400,18 +394,16 @@ wr_deinit(void)
 static void
 data_read(void)
 {
-       pdbfile *pdb = file_in;
-
-       if (pdb->creator != MYCREATOR) fatal(MYNAME ": Not a Cetus file.\n");
+       if (file_in->creator != MYCREATOR) fatal(MYNAME ": Not a Cetus file.\n");
 
-       switch(pdb->type)
+       switch(file_in->type)
        {
            case MYTYPE_TRK:
-               read_tracks(pdb);
+               read_tracks(file_in);
                break;
                
            case MYTYPE_WPT:
-               read_waypts(pdb);
+               read_waypts(file_in);
                break;
        }
 }
@@ -425,6 +417,7 @@ cetus_writewpt(const waypoint *wpt)
        char *vdata;
        char *desc_long;
        char *desc_short;
+       char *desc_geo;
        char *desc;
 
        rec = xcalloc(sizeof(*rec)+18 + NOTESZ + DESCSZ,1);
@@ -480,9 +473,24 @@ cetus_writewpt(const waypoint *wpt)
        }
        vdata += strlen( vdata ) + 1;
 
+       if (wpt->gc_data.diff) {
+                       xasprintf(&desc_geo, "%s%s by %s\n%.4s/%.4s %3.1f/%3.1f\n",
+                       wpt->gc_data.is_available==status_true ? 
+                               "" : " (Disabled)",
+                       wpt->gc_data.is_archived==status_true ? 
+                               " (Archived)" : "", 
+                       wpt->gc_data.placer,
+                       gs_get_cachetype(wpt->gc_data.type),
+                       gs_get_container(wpt->gc_data.container),
+                       wpt->gc_data.diff/10.0,
+                       wpt->gc_data.terr/10.0);
+       } else {
+               desc_geo = xstrdup("");
+       }
+
        if (wpt->gc_data.desc_short.utfstring) {
                char *stripped_html = strip_html(&wpt->gc_data.desc_short);
-               desc_short = xstrdup("\n\n");
+               desc_short = xstrdup(wpt->gc_data.diff == 0 ? "\n\n" : "");
                desc_short = xstrappend(desc_short, xstrdup(stripped_html));
                xfree(stripped_html);
        } else {
@@ -501,12 +509,14 @@ cetus_writewpt(const waypoint *wpt)
        desc = wpt->description ? xstrdup(wpt->description) : 
                xstrdup("");
 
-       snprintf(vdata, DESCSZ, "%s%s%s", 
+       snprintf(vdata, DESCSZ, "%s%s%s%s", 
                desc,
+               desc_geo,
                desc_short,
                desc_long);
 
        xfree(desc);
+       xfree(desc_geo);
        xfree(desc_short);
        xfree(desc_long);
 
diff --git a/chkdoc b/chkdoc
index f16444efd23e56d5fa1c1723eabb640dd84e52ad..d57a2b7a8e0e3cb770977ee73c83dcfd7e704bab 100755 (executable)
--- a/chkdoc
+++ b/chkdoc
@@ -12,7 +12,7 @@ checkit() {
                ECODE=1
        fi
        
-       if ! grep -qi $TYPE  ~/src/babelweb/changes.html
+       if ! grep -qi $TYPE  ~/src/babelweb/changes*.html
        then
                echo $STY $TYPE is not documented in changes.html.
                ECODE=1
index 0e668d4f0ad2eb334b85587fcc92a1163af5ef97..ff1bfe607baddab5fe8d8f41f2347d4575fdc266 100644 (file)
 /* Define to 1 if you have the `sleep' function. */
 #undef HAVE_SLEEP
 
+/* Define if we have va_copy */
+#undef HAVE_VA_COPY
+
+/* Define if we have __va_copy */
+#undef HAVE___VA_COPY
+
+/* Define as 1 if your va_list type is an array */
+#undef HAVE_VA_LIST_AS_ARRAY
+
+/* 1 to enable as many formats as possible */
+#undef MAXIMAL_ENABLED
+
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
index d51b46141c30ccb1ded4b40f02544fa7cc0ad6e8..ba89b6b49e2357a1bc5e3e9d5b67fe6f302a4b46 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for GPSBabel 1.3.4.
+# Generated by GNU Autoconf 2.61 for GPSBabel 1.3.5.
 #
 # Report bugs to <BUG-REPORT-ADDRESS>.
 #
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='GPSBabel'
 PACKAGE_TARNAME='gpsbabel'
-PACKAGE_VERSION='1.3.4'
-PACKAGE_STRING='GPSBabel 1.3.4'
+PACKAGE_VERSION='1.3.5'
+PACKAGE_STRING='GPSBabel 1.3.5'
 PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
 
 # Factoring default headers for most tests.
@@ -652,9 +652,11 @@ build_alias
 host_alias
 target_alias
 PACKAGE_RELEASE
+DOCVERSION
 GBMAJOR
 GBMINOR
 GBMICRO
+GBBUILD
 build
 build_cpu
 build_vendor
@@ -683,6 +685,7 @@ CPP
 GREP
 EGREP
 PALM_DB_CMT
+FMTS
 FILEINFO
 RC
 LIBUSBCONFIG
@@ -1210,7 +1213,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GPSBabel 1.3.4 to adapt to many kinds of systems.
+\`configure' configures GPSBabel 1.3.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1276,7 +1279,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GPSBabel 1.3.4:";;
+     short | recursive ) echo "Configuration of GPSBabel 1.3.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1286,6 +1289,7 @@ Optional Features:
   --enable-shapefile=(yes)|no
   --enable-pdb=(yes)|no
   --enable-csv=(yes)|no
+  --enable-most=(yes)|no
   --enable-filters=(yes)|no
   --enable-efence=yes|(no)
 
@@ -1372,7 +1376,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GPSBabel configure 1.3.4
+GPSBabel configure 1.3.5
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1386,7 +1390,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GPSBabel $as_me 1.3.4, which was
+It was created by GPSBabel $as_me 1.3.5, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -1739,9 +1743,10 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-
+# Increase GBBUILD for a new release
+GBBUILD=16
 # YYYYMMDD, please, if beta, i.e. "-beta20060413"
-# PACKAGE_RELEASE="-beta20070711"
+# PACKAGE_RELEASE="-beta20080305"
 
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_RELEASE "$PACKAGE_RELEASE"
@@ -1749,6 +1754,11 @@ _ACEOF
 
 
 
+DOCVERSION=`echo $PACKAGE_VERSION`
+DOCVERSION=development
+DOCVERSION=1.3.5
+
+
 GBMAJOR=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $major)`
 GBMINOR=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $minor)`
 GBMICRO=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $micro)`
@@ -1756,6 +1766,7 @@ GBMICRO=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $micro)`
 
 
 
+
 # AC_CONFIG_SRCDIR([nmea.c])
 ac_config_headers="$ac_config_headers config.h"
 
@@ -3993,6 +4004,31 @@ echo "${ECHO_T}yes" >&6; }
 echo "${ECHO_T}no" >&6; }
     fi
 
+{ echo "$as_me:$LINENO: checking whether to support maximum number of formats" >&5
+echo $ECHO_N "checking whether to support maximum number of formats... $ECHO_C" >&6; }
+# Check whether --enable-most was given.
+if test "${enable_most+set}" = set; then
+  enableval=$enable_most;  enable_most="$enableval"
+else
+  enable_most="yes"
+fi
+
+    if test "$enable_most" != "no" ; then
+       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define MAXIMAL_ENABLED 1
+_ACEOF
+
+       FMTS='$(ALL_FMTS)'
+    else
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+       FMTS='$(MINIMAL_FMTS)'
+    fi
+
+
 { echo "$as_me:$LINENO: checking whether to support filters" >&5
 echo $ECHO_N "checking whether to support filters... $ECHO_C" >&6; }
 # Check whether --enable-filters was given.
@@ -4275,9 +4311,15 @@ fi
                        USB_LIBS="`libusb-config --prefix`/lib/libusb.a -framework  IOKit -framework CoreFoundation"
                        LDFLAGS=$OLDFLAGS
                        CDFLAGS=$OCDFLAGS
+                       OSJEEPS=jeeps/gpslibusb.o
+                   else
+                       OSJEEPS=jeeps/gpsusbstub.o
                  fi
+                 ;;
+               *)
+                 OSJEEPS=jeeps/gpslibusb.o
+                 ;;
                esac
-               OSJEEPS=jeeps/gpslibusb.o
                CFLAGS="$OCFLAGS"
        #       LIBS="$LIBS `libusb-config --libs`"
            else
@@ -4305,7 +4347,9 @@ if test "${with_expathdr+set}" = set; then
 else
 
        case "$target" in
-       *-*-darwin*)
+       *-*-darwin6*|*-*-darwin7*|*-*-darwin8*)
+               # Restrict test to OS/X 10.4 and earlier.  Leopard (10.5)
+               # provides expat and in a sensible location.
                if test -f /sw/include/expat.h ; then
                        xpathdr=/sw/include/
                fi
@@ -4331,15 +4375,49 @@ echo $ECHO_N "checking for libexpat... $ECHO_C" >&6; }
 
 # Check whether --with-libexpat was given.
 if test "${with_libexpat+set}" = set; then
-  withval=$with_libexpat;  CFLAGS="$CFLAGS -L$withval"
-    EXPAT_LIB="-L$withval -lexpat"
+  withval=$with_libexpat;
+    # If the developer specified a reference
+    # to a FILE and not a directory, assume they are a highly
+    # trained professional that has specified a .a to to be used.
+    if test -f $withval ; then
+      EXPAT_LIB=$withval
+    else
+      CFLAGS="$CFLAGS -L$withval"
+      EXPAT_LIB="-L$withval -lexpat"
+    fi
 
 else
 
        case "$target" in
-       *-*-darwin*)
+       *-*-darwin6*|*-*-darwin7*|*-*-darwin8*)
+               # Restrict test to OS/X 10.4 and earlier.  Leopard (10.5)
+               # provides expat and in a sensible location.
                if test -f /sw/lib/libexpat.a ; then
+                       # libexpat installed via fink
                        EXPAT_LIB=/sw/lib/libexpat.a
+                       LIBS="$LIBS -L/sw/lib"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBEXPAT 1
+_ACEOF
+
+
+               fi
+               if test -f /opt/local/lib/libexpat.a ; then
+                       # libexpat installed via macports
+                       EXPAT_LIB=/opt/local/lib/libexpat.a
+                       LIBS="$LIBS -L/opt/local/lib"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBEXPAT 1
+_ACEOF
+
+
+               fi
+               if test -f /usr/local/lib/libexpat.a ; then
+                       # libexpat installed from source
+                       EXPAT_LIB=/usr/local/lib/libexpat.a
+                       LIBS="$LIBS -L/usr/local/lib"
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_LIBEXPAT 1
@@ -4591,6 +4669,212 @@ fi
 done
 
 
+#
+# Checks for how the system handles va_list
+# paul.bromiley@man.ac.uk
+#
+{ echo "$as_me:$LINENO: checking for va_copy" >&5
+echo $ECHO_N "checking for va_copy... $ECHO_C" >&6; }
+if test "${ac_cv_c_va_copy+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+int
+main ()
+{
+va_list ap1, ap2;
+    va_copy(ap1,ap2);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_c_va_copy="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_c_va_copy="no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_va_copy" >&5
+echo "${ECHO_T}$ac_cv_c_va_copy" >&6; }
+if test "$ac_cv_c_va_copy" = "yes"
+then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VA_COPY 1
+_ACEOF
+
+fi
+{ echo "$as_me:$LINENO: checking for __va_copy" >&5
+echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6; }
+if test "${ac_cv_c___va_copy+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+int
+main ()
+{
+va_list ap1, ap2;
+    __va_copy(ap1,ap2);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_c___va_copy="yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_c___va_copy="no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c___va_copy" >&5
+echo "${ECHO_T}$ac_cv_c___va_copy" >&6; }
+if test "$ac_cv_c___va_copy" = "yes"
+then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE___VA_COPY 1
+_ACEOF
+
+fi
+
+#
+# Does this platform require array notation to assign to a va_list?
+#
+{ echo "$as_me:$LINENO: checking va_list assignments need array notation" >&5
+echo $ECHO_N "checking va_list assignments need array notation... $ECHO_C" >&6; }
+if test "${ac_cv_valistisarray+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_valistisarray=false
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+                    #include <stdarg.h>
+                    void foo(int i, ...) {
+                       va_list ap1, ap2;
+                       va_start(ap1, i);
+                       ap2 = ap1;
+                       if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123) { exit(1); }
+                       va_end(ap1); va_end(ap2);
+                    }
+                    int main()
+                    { foo(0, 123); return(0); }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_valistisarray=false
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_valistisarray=true
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+
+if test "$ac_cv_valistisarray" = true ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VA_LIST_AS_ARRAY 1
+_ACEOF
+
+       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+       { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
 ac_config_files="$ac_config_files Makefile gbversion.h xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile shapelib/Makefile zlib/empty"
 
 cat >confcache <<\_ACEOF
@@ -4989,7 +5273,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by GPSBabel $as_me 1.3.4, which was
+This file was extended by GPSBabel $as_me 1.3.5, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5038,7 +5322,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-GPSBabel config.status 1.3.4
+GPSBabel config.status 1.3.5
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -5254,9 +5538,11 @@ build_alias!$build_alias$ac_delim
 host_alias!$host_alias$ac_delim
 target_alias!$target_alias$ac_delim
 PACKAGE_RELEASE!$PACKAGE_RELEASE$ac_delim
+DOCVERSION!$DOCVERSION$ac_delim
 GBMAJOR!$GBMAJOR$ac_delim
 GBMINOR!$GBMINOR$ac_delim
 GBMICRO!$GBMICRO$ac_delim
+GBBUILD!$GBBUILD$ac_delim
 build!$build$ac_delim
 build_cpu!$build_cpu$ac_delim
 build_vendor!$build_vendor$ac_delim
@@ -5284,6 +5570,7 @@ CPP!$CPP$ac_delim
 GREP!$GREP$ac_delim
 EGREP!$EGREP$ac_delim
 PALM_DB_CMT!$PALM_DB_CMT$ac_delim
+FMTS!$FMTS$ac_delim
 FILEINFO!$FILEINFO$ac_delim
 RC!$RC$ac_delim
 LIBUSBCONFIG!$LIBUSBCONFIG$ac_delim
@@ -5301,7 +5588,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 83; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 86; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -5730,3 +6017,4 @@ if test "$no_create" != yes; then
   $ac_cs_success || { (exit 1); exit 1; }
 fi
 
+
index 8cf8cf5e9acc00cbca21dfb2c381506ef597c505..15982033c9ae3b4d4bd7a663475429c8e28a2318 100644 (file)
@@ -3,19 +3,26 @@
 
 AC_PREREQ(2.59)
 
-AC_INIT(GPSBabel, 1.3.4, BUG-REPORT-ADDRESS)
-
+AC_INIT(GPSBabel, 1.3.5, BUG-REPORT-ADDRESS)
+# Increase GBBUILD for a new release
+GBBUILD=16
 # YYYYMMDD, please, if beta, i.e. "-beta20060413"
-# PACKAGE_RELEASE="-beta20070711"
+# PACKAGE_RELEASE="-beta20080305"
 AC_DEFINE_UNQUOTED(PACKAGE_RELEASE, "$PACKAGE_RELEASE", [Define to the release name of this package.])
 AC_SUBST(PACKAGE_RELEASE)
 
+DOCVERSION=`echo $PACKAGE_VERSION`
+DOCVERSION=development
+DOCVERSION=1.3.5   
+AC_SUBST(DOCVERSION)
+
 GBMAJOR=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $major)`
 GBMINOR=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $minor)`
 GBMICRO=`echo $PACKAGE_VERSION | (IFS="."; read major minor micro; echo $micro)`
 AC_SUBST(GBMAJOR)
 AC_SUBST(GBMINOR)
 AC_SUBST(GBMICRO)
+AC_SUBST(GBBUILD)
 
 # AC_CONFIG_SRCDIR([nmea.c])
 AC_CONFIG_HEADER([config.h])
@@ -84,6 +91,20 @@ AC_ARG_ENABLE(csv,
        AC_MSG_RESULT(no)
     fi
 
+AC_MSG_CHECKING(whether to support maximum number of formats)
+AC_ARG_ENABLE(most,
+  [  --enable-most=[(yes)|no]],
+  [ enable_most="$enableval"],[enable_most="yes"])
+    if test "$enable_most" != "no" ; then
+       AC_MSG_RESULT(yes)
+        AC_DEFINE(MAXIMAL_ENABLED, 1, [1 to enable as many formats as possible])
+       FMTS='$(ALL_FMTS)'
+    else
+       AC_MSG_RESULT(no)
+       FMTS='$(MINIMAL_FMTS)'
+    fi
+  AC_SUBST(FMTS)
+
 AC_MSG_CHECKING(whether to support filters)
 AC_ARG_ENABLE(filters,
   [  --enable-filters=[(yes)|no]],
@@ -166,9 +187,15 @@ case "$target" in
                        USB_LIBS="`libusb-config --prefix`/lib/libusb.a -framework  IOKit -framework CoreFoundation"
                        LDFLAGS=$OLDFLAGS
                        CDFLAGS=$OCDFLAGS
+                       OSJEEPS=jeeps/gpslibusb.o
+                   else
+                       OSJEEPS=jeeps/gpsusbstub.o
                  fi
+                 ;;
+               *)
+                 OSJEEPS=jeeps/gpslibusb.o
+                 ;;
                esac
-               OSJEEPS=jeeps/gpslibusb.o
                CFLAGS="$OCFLAGS"
        #       LIBS="$LIBS `libusb-config --libs`"
            else
@@ -191,7 +218,9 @@ AC_ARG_WITH(expathdr,
   [  --with-expathdr[=DIR]   Use this to specify the location of expat.h],
   [ xpathdr="$withval" ], [
        case "$target" in
-       *-*-darwin*)
+       *-*-darwin6*|*-*-darwin7*|*-*-darwin8*)
+               # Restrict test to OS/X 10.4 and earlier.  Leopard (10.5) 
+               # provides expat and in a sensible location.
                if test -f /sw/include/expat.h ; then
                        xpathdr=/sw/include/
                fi
@@ -213,16 +242,42 @@ fi
 AC_MSG_CHECKING(for libexpat)
 AC_ARG_WITH(libexpat,
   [  --with-libexpat[=DIR]   Use this to specify expat library .],
-  [ CFLAGS="$CFLAGS -L$withval"
-    EXPAT_LIB="-L$withval -lexpat"
+  [ 
+    # If the developer specified a reference
+    # to a FILE and not a directory, assume they are a highly
+    # trained professional that has specified a .a to to be used.
+    if test -f $withval ; then
+      EXPAT_LIB=$withval
+    else
+      CFLAGS="$CFLAGS -L$withval"
+      EXPAT_LIB="-L$withval -lexpat"
+    fi
   ], [
        case "$target" in
-       *-*-darwin*)
+       *-*-darwin6*|*-*-darwin7*|*-*-darwin8*)
+               # Restrict test to OS/X 10.4 and earlier.  Leopard (10.5) 
+               # provides expat and in a sensible location.
                if test -f /sw/lib/libexpat.a ; then
+                       # libexpat installed via fink
                        EXPAT_LIB=/sw/lib/libexpat.a
+                       LIBS="$LIBS -L/sw/lib"
                          AC_DEFINE(HAVE_LIBEXPAT, 1, [Defined if you have libexpat])
                          AC_SUBST(EXPAT_LIB)
                fi
+               if test -f /opt/local/lib/libexpat.a ; then
+                       # libexpat installed via macports
+                       EXPAT_LIB=/opt/local/lib/libexpat.a
+                       LIBS="$LIBS -L/opt/local/lib"
+                         AC_DEFINE(HAVE_LIBEXPAT, 1, [Defined if you have libexpat])
+                         AC_SUBST(EXPAT_LIB)
+               fi
+               if test -f /usr/local/lib/libexpat.a ; then
+                       # libexpat installed from source
+                       EXPAT_LIB=/usr/local/lib/libexpat.a
+                       LIBS="$LIBS -L/usr/local/lib"
+                         AC_DEFINE(HAVE_LIBEXPAT, 1, [Defined if you have libexpat])
+                         AC_SUBST(EXPAT_LIB)
+               fi                              
                ;;
        *-*-freebsd*)
                if test -f /usr/local/lib/libexpat.a ; then
@@ -288,5 +343,53 @@ AC_SUBST(DOCDIR)
 # AC_CHECK_FUNCS([atexit floor localtime_r memmove memset pow select sqrt strchr strcspn strdup strerror strncasecmp strrchr strspn strstr strtol strtoul])
 AC_CHECK_FUNCS([nanosleep sleep])
 
+#
+# Checks for how the system handles va_list
+# paul.bromiley@man.ac.uk
+#
+dnl **** Check for va_copy ****
+AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>]], [[va_list ap1, ap2;
+    va_copy(ap1,ap2);
+   ]])],[ac_cv_c_va_copy="yes"],[ac_cv_c_va_copy="no"])
+ )
+if test "$ac_cv_c_va_copy" = "yes"
+then
+    AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy])
+fi
+AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy,
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdarg.h>]], [[va_list ap1, ap2;
+    __va_copy(ap1,ap2);
+   ]])],[ac_cv_c___va_copy="yes"],[ac_cv_c___va_copy="no"])
+ )
+if test "$ac_cv_c___va_copy" = "yes"
+then
+    AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy])
+fi
+
+#
+# Does this platform require array notation to assign to a va_list?
+#
+AC_MSG_CHECKING(va_list assignments need array notation)
+AC_CACHE_VAL(ac_cv_valistisarray,
+        [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
+                    #include <stdarg.h>
+                    void foo(int i, ...) {
+                       va_list ap1, ap2;
+                       va_start(ap1, i);
+                       ap2 = ap1;
+                       if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123) { exit(1); }
+                       va_end(ap1); va_end(ap2);
+                    }
+                    int main()
+                    { foo(0, 123); return(0); }]])],[ac_cv_valistisarray=false],[ac_cv_valistisarray=true],[ac_cv_valistisarray=false])])
+                                            
+if test "$ac_cv_valistisarray" = true ; then
+       AC_DEFINE(HAVE_VA_LIST_AS_ARRAY, 1, [Define as 1 if your va_list type is an array])
+       AC_MSG_RESULT(yes)
+else
+       AC_MSG_RESULT(no)
+fi
 AC_CONFIG_FILES([Makefile gbversion.h xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc jeeps/Makefile shapelib/Makefile zlib/empty])
 AC_OUTPUT
+
index 81b833b76a6c54ec1ff7cc233cc78613cb55d60d..31886f4b4d86bb84428ab0a800b6a5575f18d92d 100644 (file)
@@ -2,7 +2,7 @@
     Utilities for parsing Character Separated Value files (CSV)
 
     Copyright (C) 2002 Alex Mottram (geo_alexm at cox-internet.com)
-    Copyright (C) 2002-2005 Robert Lipe
+    Copyright (C) 2002-2007 Robert Lipe
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -28,6 +28,7 @@
 #include "strptime.h"
 #include "jeeps/gpsmath.h"
 #include "xmlgeneric.h"  // for xml_fill_in_time.
+#include "garmin_fs.h"
 
 #define MYNAME "CSV_UTIL"
 
 
 #define GPS_DATUM_WGS84                118
 
+
+/*
+ * Internal numeric value to associate with each keyword in a style file.
+ * To add new keywords, just add an entry here, handle it in the switch
+ * statements below, add it to xcsv_tokens.in, and rebuild on a system
+ * that has GNU gperf on it.
+ */
+typedef enum {
+       XT_unused = 0,
+       XT_ALT_FEET,
+       XT_ALT_METERS,
+       XT_ANYNAME,
+       XT_CADENCE,
+       XT_CITY,
+       XT_CONSTANT,
+       XT_COUNTRY,
+       XT_DESCRIPTION,
+       XT_EXCEL_TIME,
+       XT_FACILITY,
+       XT_GEOCACHE_CONTAINER,
+       XT_GEOCACHE_DIFF,
+       XT_GEOCACHE_HINT,
+       XT_GEOCACHE_LAST_FOUND,
+       XT_GEOCACHE_PLACER,
+       XT_GEOCACHE_TERR,
+       XT_GEOCACHE_TYPE,
+       XT_GEOCACHE_ISAVAILABLE,
+       XT_GEOCACHE_ISARCHIVED,
+       XT_GMT_TIME,
+       XT_GPS_FIX,
+       XT_GPS_HDOP,
+       XT_GPS_PDOP,
+       XT_GPS_SAT,
+       XT_GPS_VDOP,
+       XT_HEART_RATE,
+       XT_HMSG_TIME,
+       XT_HMSL_TIME,
+       XT_ICON_DESCR,
+       XT_IGNORE,
+       XT_INDEX,
+       XT_ISO_TIME,
+       XT_ISO_TIME_MS,
+       XT_LATLON_HUMAN_READABLE,
+       XT_LAT_DECIMAL,
+       XT_LAT_DECIMALDIR,
+       XT_LAT_DIR,
+       XT_LAT_DIRDECIMAL,
+       XT_LAT_HUMAN_READABLE,
+       XT_LAT_INT32DEG,
+       XT_LAT_NMEA,
+       XT_LOCAL_TIME,
+       XT_LON_DECIMAL,
+       XT_LON_DECIMALDIR,
+       XT_LON_DIR,
+       XT_LON_DIRDECIMAL,
+       XT_LON_HUMAN_READABLE,
+       XT_LON_INT32DEG,
+       XT_LON_NMEA,
+       XT_MAP_EN_BNG,
+       XT_NOTES,
+       XT_PATH_COURSE,
+       XT_PATH_DISTANCE_KM,
+       XT_PATH_DISTANCE_MILES,
+       XT_PATH_SPEED,
+       XT_PATH_SPEED_KNOTS,
+       XT_PATH_SPEED_KPH,
+       XT_PATH_SPEED_MPH,
+       XT_PHONE_NR,
+       XT_POSTAL_CODE,
+       XT_ROUTE_NAME,
+       XT_SHORTNAME,
+       XT_STATE,
+       XT_STREET_ADDR,
+       XT_TIMET_TIME,
+       XT_TRACK_NAME,
+       XT_URL,
+       XT_URL_LINK_TEXT,
+       XT_YYYYMMDD_TIME
+} xcsv_token;
+
+#include "xcsv_tokens.gperf"
+
 /****************************************************************************/
 /* obligatory global struct                                                 */
 /****************************************************************************/
@@ -473,12 +556,14 @@ human_to_dec( const char *instr, double *outlat, double *outlon, int which )
        if ( lat[0] != 999 ) *outlat = lat[0];
        if ( lat[1] != 999 ) *outlat += lat[1]/60.0;
        if ( lat[2] != 999 ) *outlat += lat[2]/3600.0;
+       if ( *outlat > 360) *outlat = ddmm2degrees(*outlat);    /* NMEA style */
        if ( latsign ) *outlat *= latsign;
     }
     if ( outlon ) {
        if ( lon[0] != 999 ) *outlon = lon[0];
        if ( lon[1] != 999 ) *outlon += lon[1]/60.0;
        if ( lon[2] != 999 ) *outlon += lon[2]/3600.0;
+       if ( *outlon > 360) *outlon = ddmm2degrees(*outlon);    /* NMEA style */
        if ( lonsign ) *outlon *= lonsign;
     }
     if (buff != instr) {
@@ -599,8 +684,10 @@ void
 xcsv_ifield_add(char *key, char *val, char *pfc)
 {
     field_map_t *fmp = xcalloc(sizeof(*fmp), 1);
+    struct xt_mapping *xm = in_word_set(key, strlen(key));
     
     fmp->key = key;
+    fmp->hashed_key = xm ? xm->xt_token : -1;
     fmp->val = val;
     fmp->printfc = pfc;
     
@@ -616,8 +703,10 @@ void
 xcsv_ofield_add(char *key, char *val, char *pfc, int options)
 {
     field_map_t *fmp = xcalloc(sizeof(*fmp), 1);
+    struct xt_mapping *xm = in_word_set(key, strlen(key));
     
     fmp->key = key;
+    fmp->hashed_key = xm ? xm->xt_token : -1;
     fmp->val = val;
     fmp->printfc = pfc;
     fmp->options = options;
@@ -696,9 +785,14 @@ sscanftime( const char *s, const char *format, const int gmt )
                else
                        return mktime(&stm);            
        }
-       
+       // Don't fuss for empty strings.
+       if (*s) {
+               warning("date parse of string '%s' with format '%s' failed.\n", 
+                        s, format);    
+       }
        return 0;
 }
+
 static
 time_t
 addhms( const char *s, const char *format )
@@ -762,13 +856,16 @@ static
 int 
 writehms(char * buff, size_t bufsize, const char * format, time_t t, int gmt )
 {
-       static struct tm * stmp;
+       static struct tm no_time = {0};
+       static struct tm * stmp = &no_time;
 
        if (gmt)
                stmp = gmtime(&t);
        else
                stmp = localtime(&t);
 
+       if (stmp == NULL) stmp = &no_time;
+
        return snprintf(buff, bufsize, format, 
                stmp->tm_hour, stmp->tm_min, stmp->tm_sec, 
                (stmp->tm_hour>=12?"PM":"AM") );
@@ -788,6 +885,17 @@ time_to_yyyymmdd(time_t t)
        return b;
 }
 
+static garmin_fs_t *
+gmsd_init(waypoint *wpt)
+{
+       garmin_fs_t *gmsd = GMSD_FIND(wpt);
+       if (gmsd == NULL) {
+               gmsd = garmin_fs_alloc(-1);
+               fs_chain_add(&wpt->fs, (format_specific_data *) gmsd);
+       }
+       return gmsd;
+}
+
 /*****************************************************************************/
 /* xcsv_parse_val() - parse incoming data into the waypt structure.          */
 /* usage: xcsv_parse_val("-123.34", *waypt, *field_map)                      */
@@ -796,203 +904,217 @@ static void
 xcsv_parse_val(const char *s, waypoint *wpt, const field_map_t *fmp)
 {
     char *enclosure = "";
+
     if (0 == strcmp(fmp->printfc, "\"%s\"")) {
        enclosure = "\"";
     }
-    if (strcmp(fmp->key, "IGNORE") == 0) {
-       /* IGNORE -- Categorically ignore this... */
-    } else
-    if (strcmp(fmp->key, "CONSTANT") == 0) {
-       /* CONSTANT -- Ignore on Input... */
-    } else
-    if (strcmp(fmp->key, "ANYNAME") == 0) {
-       /* ANYNAME -- Ignore -- this is output magic. */
-    } else
-    if (strcmp(fmp->key, "INDEX") == 0) {
-       /* IGNORE -- Calculated Sequence # For Ouput*/
-    } else
-    if (strcmp(fmp->key, "SHORTNAME") == 0) {
-       wpt->shortname = csv_stringtrim(s, enclosure, 0);
-    } else
-    if (strcmp(fmp->key, "DESCRIPTION") == 0) {
-       wpt->description = csv_stringtrim(s, enclosure, 0);
-    } else
-    if (strcmp(fmp->key, "NOTES") == 0) {
-       wpt->notes = csv_stringtrim(s, "", 0);
-    } else
-    if (strcmp(fmp->key, "URL") == 0) {
-       wpt->url = csv_stringtrim(s, "", 0);
-    } else
-    if (strcmp(fmp->key, "URL_LINK_TEXT") == 0) {
-       wpt->url_link_text = csv_stringtrim(s, "", 0);
-    } else
-    if (strcmp(fmp->key, "ICON_DESCR") == 0) {
-       wpt->icon_descr = csv_stringtrim(s, "", 0);
-       wpt->wpt_flags.icon_descr_is_dynamic = 1;
-    } else
+    switch(fmp->hashed_key) {
+    case XT_IGNORE:
+       /* IGNORE -- Categorically ignore this... */
+       break;
+    case XT_CONSTANT:
+       /* CONSTANT -- Ignore on Input... */
+       break;
+    case XT_ANYNAME:
+       /* ANYNAME -- Ignore -- this is output magic. */
+       break;
+    case XT_INDEX:
+       /* IGNORE -- Calculated Sequence # For Ouput*/
+       break;
+    case XT_SHORTNAME:
+       wpt->shortname = csv_stringtrim(s, enclosure, 0);
+       break;
+    case XT_DESCRIPTION:
+       wpt->description = csv_stringtrim(s, enclosure, 0);
+       break;
+    case XT_NOTES:
+       wpt->notes = csv_stringtrim(s, "", 0);
+       break;
+    case XT_URL:
+       wpt->url = csv_stringtrim(s, "", 0);
+       break;
+    case XT_URL_LINK_TEXT:
+       wpt->url_link_text = csv_stringtrim(s, "", 0);
+       break;
+    case XT_ICON_DESCR:
+       wpt->icon_descr = csv_stringtrim(s, "", 0);
+       wpt->wpt_flags.icon_descr_is_dynamic = 1;
+       break;
 
     /* LATITUDE CONVERSIONS**************************************************/
-    if (strcmp(fmp->key, "LAT_DECIMAL") == 0) {
+    case XT_LAT_DECIMAL:
        /* latitude as a pure decimal value */
-       wpt->latitude = atof(s);
-    } else
-    if ((strcmp(fmp->key, "LAT_DECIMALDIR") == 0) ||
-        (strcmp(fmp->key, "LAT_DIRDECIMAL") == 0)) {
-       /* latitude as a decimal with N/S in it. */
-       wpt->latitude = decdir_to_dec(s);
-    } else
-    if (strcmp(fmp->key, "LAT_INT32DEG") == 0) {
-       /* latitude as a 32 bit integer offset */
-       wpt->latitude = intdeg_to_dec((int) atof(s));
-    } else
-    if ( strcmp(fmp->key, "LAT_HUMAN_READABLE") == 0) {
-       human_to_dec( s, &wpt->latitude, &wpt->longitude, 1 );
-    } else
-    if ( strcmp(fmp->key, "LAT_NMEA") == 0) {
+       wpt->latitude = atof(s);
+       break;
+    case XT_LAT_DECIMALDIR:
+    case XT_LAT_DIRDECIMAL:
+       /* latitude as a decimal with N/S in it. */
+       wpt->latitude = decdir_to_dec(s);
+       break;
+    case XT_LAT_INT32DEG:
+       /* latitude as a 32 bit integer offset */
+       wpt->latitude = intdeg_to_dec((int) atof(s));
+       break;
+    case XT_LAT_HUMAN_READABLE:
+       human_to_dec( s, &wpt->latitude, &wpt->longitude, 1 );
+       break;
+    case XT_LAT_NMEA:
        wpt->latitude = ddmm2degrees(atof(s));
-    } else
-    if ( strncmp(fmp->key, "LAT_10E", 7) == 0) {
-       wpt->latitude = atof(s) / pow((double)10, atof(fmp->key+7));
-    } else
+       break;
+    // XT_LAT_10E is handled outside the switch.
     /* LONGITUDE CONVERSIONS ***********************************************/
-    if (strcmp(fmp->key, "LON_DECIMAL") == 0) {
+    case XT_LON_DECIMAL:
        /* longitude as a pure decimal value */
-       wpt->longitude = atof(s);
-    } else
-    if ((strcmp(fmp->key, "LON_DECIMALDIR") == 0) ||
-        (strcmp(fmp->key, "LON_DIRDECIMAL") == 0)) {
+       wpt->longitude = atof(s);
+       break;
+    case XT_LON_DECIMALDIR:
+    case XT_LON_DIRDECIMAL:
        /* longitude as a decimal with N/S in it. */
-       wpt->longitude = decdir_to_dec(s);
-    } else
-    if (strcmp(fmp->key, "LON_INT32DEG") == 0) {
+       wpt->longitude = decdir_to_dec(s);
+       break;
+    case XT_LON_INT32DEG:
        /* longitude as a 32 bit integer offset  */
-       wpt->longitude = intdeg_to_dec((int) atof(s));
-    } else
-    if ( strcmp(fmp->key, "LON_HUMAN_READABLE") == 0) {
-       human_to_dec( s, &wpt->latitude, &wpt->longitude, 2 );
-    } else
-    if ( strcmp(fmp->key, "LON_NMEA") == 0) {
+       wpt->longitude = intdeg_to_dec((int) atof(s));
+       break;
+    case XT_LON_HUMAN_READABLE:
+       human_to_dec( s, &wpt->latitude, &wpt->longitude, 2 );
+       break;
+    case XT_LON_NMEA:
        wpt->longitude = ddmm2degrees(atof(s));
-    } else
-    if ( strncmp(fmp->key, "LON_10E", 7) == 0) {
-       wpt->longitude = atof(s) / pow((double)10, atof(fmp->key+7));
-    } else
+       break;
+    // case XT_LON_10E is handled outside the switch.
     /* LAT AND LON CONVERSIONS ********************************************/
-    if ( strcmp(fmp->key, "LATLON_HUMAN_READABLE") == 0) {
-       human_to_dec( s, &wpt->latitude, &wpt->longitude, 0 );
-    } else
+    case XT_LATLON_HUMAN_READABLE:
+       human_to_dec( s, &wpt->latitude, &wpt->longitude, 0 );
+       break;
     /* DIRECTIONS **********************************************************/
-    if (strcmp(fmp->key, "LAT_DIR") == 0) {
-       /* latitude N/S.  Ignore on input for now */
-    } else
-    if (strcmp(fmp->key, "LON_DIR") == 0) {
-       /* longitude E/W. Ingore on input for now */
-    } else
+    case XT_LAT_DIR:
+       /* latitude N/S.  Ignore on input for now */
+       break;
+    case XT_LON_DIR:
+       /* longitude E/W. Ingore on input for now */
+       break;
     /* SPECIAL COORDINATES/GRID */
-    if (strcmp(fmp->key, "MAP_EN_BNG") == 0) {
-       parse_coordinates(s, DATUM_OSGB36, grid_bng,
-          &wpt->latitude, &wpt->longitude, MYNAME);
-    } else
+    case XT_MAP_EN_BNG:
+       parse_coordinates(s, DATUM_OSGB36, grid_bng,
+               &wpt->latitude, &wpt->longitude, MYNAME);
+       break;
     /* ALTITUDE CONVERSIONS ************************************************/
-    if (strcmp(fmp->key, "ALT_FEET") == 0) {
-       /* altitude in feet as a decimal value */
-       wpt->altitude = FEET_TO_METERS(atof(s));
-       if (wpt->altitude < unknown_alt + 1)
-          wpt->altitude = unknown_alt;
-    } else
-    if (strcmp(fmp->key, "ALT_METERS") == 0) {
-       /* altitude in meters as a decimal value */
-       wpt->altitude = atof(s);
-       if (wpt->altitude < unknown_alt + 1)
-          wpt->altitude = unknown_alt;
-    } else
+    case XT_ALT_FEET:
+       /* altitude in feet as a decimal value */
+       wpt->altitude = FEET_TO_METERS(atof(s));
+       if (wpt->altitude < unknown_alt + 1)
+               wpt->altitude = unknown_alt;
+       break;
+    case XT_ALT_METERS:
+       /* altitude in meters as a decimal value */
+       wpt->altitude = atof(s);
+       if (wpt->altitude < unknown_alt + 1)
+               wpt->altitude = unknown_alt;
+       break;
     
     /* PATH CONVERSIONS ************************************************/
-    if (strcmp(fmp->key, "PATH_SPEED") == 0) {
+    case XT_PATH_SPEED:
        WAYPT_SET(wpt, speed, atof(s));
-    } else
-    if (strcmp(fmp->key, "PATH_SPEED_KPH") == 0) {
+       break;
+    case XT_PATH_SPEED_KPH:
        WAYPT_SET(wpt, speed, KPH_TO_MPS(atof(s)));
-    } else
-    if (strcmp(fmp->key, "PATH_SPEED_MPH") == 0) {
+       break;
+    case XT_PATH_SPEED_MPH:
        WAYPT_SET(wpt, speed, MPH_TO_MPS(atof(s)));
-    } else
-    if (strcmp(fmp->key, "PATH_SPEED_KNOTS") == 0) {
+       break;
+    case XT_PATH_SPEED_KNOTS:
        WAYPT_SET(wpt, speed, KNOTS_TO_MPS(atof(s)));
-    } else
-    if (strcmp(fmp->key, "PATH_COURSE") == 0) {
+       break;
+    case XT_PATH_COURSE:
        WAYPT_SET(wpt, course, atof(s));
-    } else
+       break;
 
     /* TIME CONVERSIONS ***************************************************/
-    if (strcmp(fmp->key, "EXCEL_TIME") == 0) {
+    case XT_EXCEL_TIME:
        /* Time as Excel Time  */
-       wpt->creation_time = EXCEL_TO_TIMET(atof(s));
-    } else
-    if (strcmp(fmp->key, "TIMET_TIME") == 0) {
+       wpt->creation_time = EXCEL_TO_TIMET(atof(s));
+       break;
+    case XT_TIMET_TIME:
        /* Time as time_t */
-       wpt->creation_time = atol(s);
-     } else
-    if (strcmp(fmp->key, "YYYYMMDD_TIME") == 0) {
+       wpt->creation_time = atol(s);
+       break;
+    case XT_YYYYMMDD_TIME:
        wpt->creation_time = yyyymmdd_to_time(s);
-    } else
-    if (strcmp(fmp->key, "GMT_TIME") == 0) {
-       wpt->creation_time = sscanftime(s, fmp->printfc, 1);
-    } else
-    if (strcmp(fmp->key, "LOCAL_TIME") == 0) {
-       wpt->creation_time = sscanftime(s, fmp->printfc, 0);
-    } else
+       break;
+    case XT_GMT_TIME:
+       wpt->creation_time += sscanftime(s, fmp->printfc, 1);
+       break;
+    case XT_LOCAL_TIME:
+       wpt->creation_time += sscanftime(s, fmp->printfc, 0);
+       break;
     /* Useful when time and date are in separate fields 
        GMT / Local offset is handled by the two cases above */
-    if ((strcmp(fmp->key, "HMSG_TIME") == 0)||
-       (strcmp(fmp->key, "HMSL_TIME") == 0) ) {
+    case XT_HMSG_TIME:
+    case XT_HMSL_TIME:
        wpt->creation_time += addhms(s, fmp->printfc);
-    } else
-    if ((strcmp(fmp->key, "ISO_TIME") == 0) || 
-        (strcmp(fmp->key, "ISO_TIME_MS") == 0)) {
+       break;
+    case XT_ISO_TIME: 
+    case XT_ISO_TIME_MS: 
        wpt->creation_time = xml_parse_time(s, &wpt->microseconds);
-    } else
-       if (strcmp(fmp->key, "GEOCACHE_LAST_FOUND") == 0) {
+       break;
+       case XT_GEOCACHE_LAST_FOUND:
        wpt->gc_data.last_found = yyyymmdd_to_time(s);
-    } else
+       break;
 
     /* GEOCACHING STUFF ***************************************************/
-    if (strcmp(fmp->key, "GEOCACHE_DIFF") == 0) {
+    case XT_GEOCACHE_DIFF:
        /* Geocache Difficulty as an int */
-       wpt->gc_data.diff = atof(s) * 10; 
-    } else
-    if (strcmp(fmp->key, "GEOCACHE_TERR") == 0) {
+       wpt->gc_data.diff = atof(s) * 10; 
+       break;
+    case XT_GEOCACHE_TERR:
        /* Geocache Terrain as an int */
-       wpt->gc_data.terr = atof(s) * 10;
-    } else
-    if (strcmp(fmp->key, "GEOCACHE_TYPE") == 0) {
+       wpt->gc_data.terr = atof(s) * 10;
+       break;
+    case XT_GEOCACHE_TYPE:
        /* Geocache Type */
-       wpt->gc_data.type = gs_mktype(s);
-    } else
-    if (strcmp(fmp->key, "GEOCACHE_CONTAINER") == 0) {
-       wpt->gc_data.container = gs_mkcont(s);
-    } else
-    if (strcmp(fmp->key, "GEOCACHE_HINT") == 0) {
-       wpt->gc_data.hint = csv_stringtrim(s, "", 0);
-    } else
-    if (strcmp(fmp->key, "GEOCACHE_PLACER") == 0) {
-       wpt->gc_data.placer = csv_stringtrim(s, "", 0);
-    } else
-       
+       wpt->gc_data.type = gs_mktype(s);
+       break;
+    case XT_GEOCACHE_CONTAINER:
+       wpt->gc_data.container = gs_mkcont(s);
+       break;
+    case XT_GEOCACHE_HINT:
+       wpt->gc_data.hint = csv_stringtrim(s, "", 0);
+       break;
+    case XT_GEOCACHE_PLACER:
+       wpt->gc_data.placer = csv_stringtrim(s, "", 0);
+       break;
+    case XT_GEOCACHE_ISAVAILABLE:
+       if ( case_ignore_strcmp(csv_stringtrim(s, "", 0), "False") == 0 )
+               wpt->gc_data.is_available = status_false;
+       else if ( case_ignore_strcmp(csv_stringtrim(s, "", 0), "True") == 0 )
+               wpt->gc_data.is_available = status_true;
+       else
+               wpt->gc_data.is_available = status_unknown;
+       break;
+    case XT_GEOCACHE_ISARCHIVED:
+       if ( case_ignore_strcmp(csv_stringtrim(s, "", 0), "False") == 0 )
+               wpt->gc_data.is_archived = status_false;
+       else if ( case_ignore_strcmp(csv_stringtrim(s, "", 0), "True") == 0 )
+               wpt->gc_data.is_archived = status_true;        
+       else
+       wpt->gc_data.is_archived = status_unknown;
+       break;
+               
     /* GPS STUFF *******************************************************/
-    if (strcmp(fmp->key, "GPS_HDOP") == 0) {
-        wpt->hdop = atof(s);
-    } else
-    if (strcmp(fmp->key, "GPS_VDOP") == 0) {
+    case XT_GPS_HDOP:
+       wpt->hdop = atof(s);
+       break;
+    case XT_GPS_VDOP:
        wpt->vdop = atof(s);
-    } else
-    if (strcmp(fmp->key, "GPS_PDOP") == 0) {
+       break;
+    case XT_GPS_PDOP:
         wpt->pdop = atof(s);
-    } else
-    if (strcmp(fmp->key, "GPS_SAT") == 0) {
+       break;
+    case XT_GPS_SAT:
        wpt->sat = atoi(s);
-    } else
-    if (strcmp(fmp->key, "GPS_FIX") == 0) {
+       break;
+    case XT_GPS_FIX:
        wpt->fix = atoi(s)-1;
        if ( wpt->fix < fix_2d) {
        if (!case_ignore_strcmp(s, "none"))
@@ -1004,29 +1126,78 @@ xcsv_parse_val(const char *s, waypoint *wpt, const field_map_t *fmp)
        else
                wpt->fix = fix_unknown;
        }
-    } else
+       break;
     /* Tracks and routes *********************************************/
-    if ( strcmp ( fmp->key, "ROUTE_NAME") == 0) {
+    case XT_ROUTE_NAME:
        if (csv_route) csv_route->rte_name = csv_stringtrim(s, enclosure, 0);
-    } else
-    if ( strcmp ( fmp->key, "TRACK_NAME") == 0) {
+       break;
+    case XT_TRACK_NAME:
        if (csv_track) csv_track->rte_name = csv_stringtrim(s, enclosure, 0);
-    } else
+       break;
        
     /* OTHER STUFF ***************************************************/
-    if ( strcmp( fmp->key, "PATH_DISTANCE_MILES") == 0) {
-       /* Ignored on input */
-    } else
-    if ( strcmp( fmp->key, "HEART_RATE") == 0) {
-      wpt->heartrate = atoi(s); 
-    } else
-    if ( strcmp( fmp->key, "CADENCE") == 0) {
-      wpt->cadence = atoi(s); 
-    } else
-    if ( strcmp( fmp->key, "PATH_DISTANCE_KM") == 0 ) {
-       /* Ignored on input */
-    } else {
-       warning( MYNAME ": Unknown style directive: %s\n", fmp->key);
+    case XT_PATH_DISTANCE_MILES:
+       /* Ignored on input */
+       break;
+    case XT_HEART_RATE:
+       wpt->heartrate = atoi(s); 
+       break;
+    case XT_CADENCE:
+       wpt->cadence = atoi(s); 
+       break;
+    case XT_PATH_DISTANCE_KM:
+       /* Ignored on input */
+       break;
+    /* GMSD ****************************************************************/
+    case XT_COUNTRY: {
+       garmin_fs_t *gmsd = gmsd_init(wpt);
+       GMSD_SET(country, csv_stringtrim(s, enclosure, 0));
+       }
+       break;
+    case XT_STATE: {
+       garmin_fs_t *gmsd = gmsd_init(wpt);
+       GMSD_SET(state, csv_stringtrim(s, enclosure, 0));
+       }
+       break;
+    case XT_CITY: {
+       garmin_fs_t *gmsd = gmsd_init(wpt);
+       GMSD_SET(city, csv_stringtrim(s, enclosure, 0));
+       }
+       break;
+    case XT_STREET_ADDR: {
+       garmin_fs_t *gmsd = gmsd_init(wpt);
+       GMSD_SET(addr, csv_stringtrim(s, enclosure, 0));
+       }
+       break;
+    case XT_POSTAL_CODE: {
+       garmin_fs_t *gmsd = gmsd_init(wpt);
+       GMSD_SET(postal_code, csv_stringtrim(s, enclosure, 0));
+       }
+       break;
+    case XT_PHONE_NR: {
+       garmin_fs_t *gmsd = gmsd_init(wpt);
+       GMSD_SET(phone_nr, csv_stringtrim(s, enclosure, 0));
+       }
+       break;
+    case XT_FACILITY: {
+       garmin_fs_t *gmsd = gmsd_init(wpt);
+       GMSD_SET(facility, csv_stringtrim(s, enclosure, 0));
+       }
+       break;
+    case -1:
+       if (strncmp(fmp->key, "LON_10E", 7) == 0) {
+               wpt->longitude = atof(s) / pow((double)10, atof(fmp->key+7));
+       } else 
+       if (strncmp(fmp->key, "LAT_10E", 7) == 0) {
+               wpt->latitude = atof(s) / pow((double)10, atof(fmp->key+7));
+       } else {
+               warning( MYNAME ": Unknown style directive: %s\n", fmp->key);
+       }
+       break;
+   
+    default:  
+       fatal("This can't happen\n");
+       break;
     }
 }
 
@@ -1049,13 +1220,9 @@ xcsv_data_read(void)
     
     csv_route = csv_track = NULL;
     if (xcsv_file.datatype == trkdata) {
-       trk = route_head_alloc();
-       track_add_head(trk);
        csv_track = trk;
     } else
     if (xcsv_file.datatype == rtedata) {
-       rte = route_head_alloc();
-       route_add_head(rte);
        csv_route = rte;
     }
 
@@ -1126,11 +1293,22 @@ xcsv_data_read(void)
            switch(xcsv_file.datatype) {
                case 0:
                case wptdata:
-                   waypt_add(wpt_tmp); break;
+                   waypt_add(wpt_tmp);
+                   break;
                case trkdata:
-                   track_add_wpt(trk, wpt_tmp); break;
-               case rtedata: 
-                   route_add_wpt(rte, wpt_tmp); break;
+                   if (trk == NULL) {
+                       trk = route_head_alloc();
+                       track_add_head(trk);
+                   }
+                   track_add_wpt(trk, wpt_tmp);
+                   break;
+               case rtedata:
+                   if (rte == NULL) {
+                       rte = route_head_alloc();
+                       route_add_head(rte);
+                   }
+                   route_add_wpt(rte, wpt_tmp);
+                   break;
                default: ;
            }
         }
@@ -1252,26 +1430,28 @@ xcsv_waypt_pr(const waypoint *wpt)
 
         i++;
 #define writebuff(b, fmt, data) snprintf(b, sizeof(b), fmt, data)
-        if (strcmp(fmp->key, "IGNORE") == 0) {
+    switch(fmp->hashed_key) {
+        case XT_IGNORE:
             /* IGNORE -- Write the char printf conversion */
             writebuff(buff, fmp->printfc, "");
-        } else
-        if (strcmp(fmp->key, "INDEX") == 0) {
+            break;
+        case XT_INDEX:
             writebuff(buff, fmp->printfc, waypt_out_count + atoi(fmp->val));
-        } else
-        if (strcmp(fmp->key, "CONSTANT") == 0) {
+            break;
+        case XT_CONSTANT: {
            const char *cp = xcsv_get_char_from_constant_table(fmp->val);
            if (cp) {
                 writebuff(buff, fmp->printfc, cp);
-           } else {
+               } else {
                writebuff(buff, fmp->printfc, fmp->val);
            }
-        } else
-        if (strcmp(fmp->key, "SHORTNAME") == 0) {
+           }
+            break;
+        case XT_SHORTNAME:
             writebuff(buff, fmp->printfc, 
                 (shortname && *shortname) ? shortname : fmp->val);
-        } else
-        if (strcmp(fmp->key, "ANYNAME") == 0) {
+            break;
+        case XT_ANYNAME:
             if (wpt->shortname) {
                 anyname = xstrdup(wpt->shortname);
             } else
@@ -1290,16 +1470,16 @@ xcsv_waypt_pr(const waypoint *wpt)
             writebuff(buff, fmp->printfc, anyname);
             
             xfree(anyname);
-        } else
-        if (strcmp(fmp->key, "DESCRIPTION") == 0) {
+            break;
+        case XT_DESCRIPTION:
             writebuff(buff, fmp->printfc, 
                 (description && *description) ? description : fmp->val);
-        } else
-        if (strcmp(fmp->key, "NOTES") == 0) {
+            break;
+        case XT_NOTES:
            writebuff(buff, fmp->printfc, 
                (wpt->notes && *wpt->notes) ? wpt->notes : fmp->val);
-        } else
-        if (strcmp(fmp->key, "URL") == 0) {
+            break;
+        case XT_URL: {
            int off = 0;
            if (xcsv_urlbase) {
                strcpy(buff, xcsv_urlbase);
@@ -1309,243 +1489,255 @@ xcsv_waypt_pr(const waypoint *wpt)
                snprintf(buff + off, sizeof(buff) - off, fmp->printfc, wpt->url);
            else
                strcpy(buff, (fmp->val && *fmp->val) ? fmp->val : "\"\"");
-        } else
-        if (strcmp(fmp->key, "URL_LINK_TEXT") == 0) {
+           }
+            break;
+        case XT_URL_LINK_TEXT:
             snprintf(buff, sizeof(buff), fmp->printfc, 
                 (wpt->url_link_text && *wpt->url_link_text) ? wpt->url_link_text : fmp->val);
-        } else
-        if (strcmp(fmp->key, "ICON_DESCR") == 0) {
+            break;
+        case XT_ICON_DESCR:
             writebuff(buff, fmp->printfc, 
                 (wpt->icon_descr && *wpt->icon_descr) ? 
                 wpt->icon_descr : fmp->val);
-        } else
+            break;
 
         /* LATITUDE CONVERSION***********************************************/
-        if (strcmp(fmp->key, "LAT_DECIMAL") == 0) {
+        case XT_LAT_DECIMAL:
             /* latitude as a pure decimal value */
             writebuff(buff, fmp->printfc, lat);
-        } else
-        if (strcmp(fmp->key, "LAT_DECIMALDIR") == 0) {
+            break;
+        case XT_LAT_DECIMALDIR:
             /* latitude as a decimal value with N/S after it */
             snprintf(buff, sizeof(buff), fmp->printfc, fabs(lat), 
               LAT_DIR(lat));
-        } else
-        if (strcmp(fmp->key, "LAT_DIRDECIMAL") == 0) {
+            break;
+        case XT_LAT_DIRDECIMAL:
             /* latitude as a decimal value with N/S before it */
             snprintf(buff, sizeof(buff), fmp->printfc, 
               LAT_DIR(lat),
               fabs(lat));
-        } else
-        if (strcmp(fmp->key, "LAT_INT32DEG") == 0) {
+            break;
+        case XT_LAT_INT32DEG:
             /* latitude as an integer offset from 0 degrees */
             writebuff(buff, fmp->printfc,
               dec_to_intdeg(lat));
-        } else
-       if (strcmp(fmp->key, "LAT_HUMAN_READABLE") == 0) {
+            break;
+       case XT_LAT_HUMAN_READABLE:
            dec_to_human( buff, fmp->printfc, "SN", lat );
-       } else
-       if (strcmp(fmp->key, "LAT_NMEA") == 0) {
+           break;
+       case XT_LAT_NMEA:
            writebuff(buff, fmp->printfc, degrees2ddmm(lat));
-       } else
-       if (strncmp(fmp->key, "LAT_10E", 7) == 0) {
-           writebuff(buff, fmp->printfc, lat * pow((double)10, atof(fmp->key+7)));
-       } else
-
+           break;
+       // case XT_LAT_10E is handled outside the switch.
         /* LONGITUDE CONVERSIONS*********************************************/
-        if (strcmp(fmp->key, "LON_DECIMAL") == 0) {
+        case XT_LON_DECIMAL:
             /* longitude as a pure decimal value */
             writebuff(buff, fmp->printfc, lon);
-        } else
-        if (strcmp(fmp->key, "LON_DECIMALDIR") == 0) {
+            break;
+        case XT_LON_DECIMALDIR:
             /* latitude as a decimal value with N/S after it */
             snprintf(buff, sizeof(buff),  fmp->printfc,
               fabs(lon), 
               LON_DIR(lon));
-        } else
-        if (strcmp(fmp->key, "LON_DIRDECIMAL") == 0) {
+            break;
+        case XT_LON_DIRDECIMAL:
             /* latitude as a decimal value with N/S before it */
             snprintf(buff, sizeof(buff), fmp->printfc,
               LON_DIR(lon),
               fabs(lon));
-        } else
-        if (strcmp(fmp->key, "LON_INT32DEG") == 0) {
+            break;
+        case XT_LON_INT32DEG:
             /* longitudee as an integer offset from 0 degrees */
             writebuff(buff, fmp->printfc,
               dec_to_intdeg(lon));
-        } else
-       if (strcmp(fmp->key, "LON_HUMAN_READABLE") == 0) {
+            break;
+       case XT_LON_HUMAN_READABLE:
            dec_to_human( buff, fmp->printfc, "WE", lon );
-       } else
-       if (strcmp(fmp->key, "LATLON_HUMAN_READABLE") == 0) {
+           break;
+       case XT_LATLON_HUMAN_READABLE:
            dec_to_human( buff, fmp->printfc, "SN", lat );
            if ( !isspace(buff[strlen(buff)])) strcat( buff, " " );
            dec_to_human( buff+strlen(buff), fmp->printfc, "WE", 
                            lon );
-       } else
-       if (strcmp(fmp->key, "LON_NMEA") == 0) {
+           break;
+       case XT_LON_NMEA:
                writebuff(buff, fmp->printfc, degrees2ddmm(lon));
-       } else
-       if (strncmp(fmp->key, "LON_10E", 7) == 0) {
-           writebuff(buff, fmp->printfc, lon * pow((double)10, atof(fmp->key+7)));
-       } else
-
+           break;
+       // case XT_LON_10E is handled outside the switch.
         /* DIRECTIONS *******************************************************/
-        if (strcmp(fmp->key, "LAT_DIR") == 0) {
+        case XT_LAT_DIR:
             /* latitude N/S as a char */
             writebuff(buff, fmp->printfc,
             LAT_DIR(lat));
-        } else
-        if (strcmp(fmp->key, "LON_DIR") == 0) {
+            break;
+        case XT_LON_DIR:
             /* longitude E/W as a char */
             writebuff(buff, fmp->printfc,
               LON_DIR(lon));
-        } else
+            break;
        
        /* SPECIAL COORDINATES */
-        if (strcmp(fmp->key, "MAP_EN_BNG") == 0) {
+        case XT_MAP_EN_BNG: {
                char map[3];
                double north, east;
                if (! GPS_Math_WGS84_To_UKOSMap_M(wpt->latitude, wpt->longitude, &east, &north, map))
                        fatal(MYNAME ": Position (%.5f/%.5f) outside of BNG.\n",
                                wpt->latitude, wpt->longitude);
                snprintf(buff, sizeof(buff), fmp->printfc, map, (int)(east + 0.5), (int)(north + 0.5));
-       } else
+               }
+           break;
 
         /* ALTITUDE CONVERSIONS**********************************************/
-        if (strcmp(fmp->key, "ALT_FEET") == 0) {
+        case XT_ALT_FEET:
             /* altitude in feet as a decimal value */
             writebuff(buff, fmp->printfc,
               METERS_TO_FEET(wpt->altitude));
-        } else
-        if (strcmp(fmp->key, "ALT_METERS") == 0) {
+            break;
+        case XT_ALT_METERS:
             /* altitude in meters as a decimal value */
             writebuff(buff, fmp->printfc,
               wpt->altitude);
-        } else
+            break;
                
         /* DISTANCE CONVERSIONS**********************************************/
-       if (strcmp(fmp->key, "PATH_DISTANCE_MILES") == 0) {
+       case XT_PATH_DISTANCE_MILES:
             /* path (route/track) distance in miles */
             writebuff( buff, fmp->printfc, pathdist );
-       } else
-       if (strcmp(fmp->key, "PATH_DISTANCE_KM") == 0) {
+           break;
+       case XT_PATH_DISTANCE_KM:
             /* path (route/track) distance in  */
             writebuff( buff, fmp->printfc, pathdist * 5280*12*2.54/100/1000 );
-       } else
-       if (strcmp(fmp->key, "PATH_SPEED") == 0) {
+           break;
+       case XT_PATH_SPEED:
             writebuff( buff, fmp->printfc, wpt->speed );
-       } else
-       if (strcmp(fmp->key, "PATH_SPEED_KPH") == 0) {
+           break;
+       case XT_PATH_SPEED_KPH:
             writebuff( buff, fmp->printfc, MPS_TO_KPH(wpt->speed));
-       } else
-       if (strcmp(fmp->key, "PATH_SPEED_MPH") == 0) {
+           break;
+       case XT_PATH_SPEED_MPH:
             writebuff( buff, fmp->printfc, MPS_TO_MPH(wpt->speed));
-       } else
-       if (strcmp(fmp->key, "PATH_SPEED_KNOTS") == 0) {
+           break;
+       case XT_PATH_SPEED_KNOTS:
             writebuff( buff, fmp->printfc, MPS_TO_KNOTS(wpt->speed));
-       } else
-       if (strcmp(fmp->key, "PATH_COURSE") == 0) {
+           break;
+       case XT_PATH_COURSE:
             writebuff( buff, fmp->printfc, wpt->course );
-       } else
+           break;
 
         /* HEART RATE CONVERSION***********************************************/
-        if (strcmp(fmp->key, "HEART_RATE") == 0) {
+        case XT_HEART_RATE:
             writebuff(buff, fmp->printfc, wpt->heartrate);
-        } else
+            break;
         /* CADENCE CONVERSION***********************************************/
-        if (strcmp(fmp->key, "CADENCE") == 0) {
+        case XT_CADENCE:
             writebuff(buff, fmp->printfc, wpt->cadence);
-        } else
+            break;
         /* TIME CONVERSIONS**************************************************/
-        if (strcmp(fmp->key, "EXCEL_TIME") == 0) {
+        case XT_EXCEL_TIME:
             /* creation time as an excel (double) time */
             writebuff(buff, fmp->printfc, TIMET_TO_EXCEL(wpt->creation_time));
-        } else
-        if (strcmp(fmp->key, "TIMET_TIME") == 0) {
+            break;
+        case XT_TIMET_TIME:
             /* time as a time_t variable */
             writebuff(buff, fmp->printfc, wpt->creation_time);
-        } else
-        if (strcmp(fmp->key, "YYYYMMDD_TIME") == 0) {
+            break;
+        case XT_YYYYMMDD_TIME:
            writebuff(buff, fmp->printfc, time_to_yyyymmdd(wpt->creation_time));
-       } else
-       if (strcmp(fmp->key, "GMT_TIME") == 0) {
+           break;
+       case XT_GMT_TIME:
            writetime(buff, sizeof buff, fmp->printfc, wpt->creation_time, 1 );
-       } else
-        if (strcmp(fmp->key, "LOCAL_TIME") == 0) {
+           break;
+        case XT_LOCAL_TIME:
             writetime(buff, sizeof buff, fmp->printfc, wpt->creation_time, 0 );
-       } else
-        if (strcmp(fmp->key, "HMSG_TIME") == 0) {
+           break;
+        case XT_HMSG_TIME:
             writehms(buff, sizeof buff, fmp->printfc, wpt->creation_time, 1 );
-       } else
-        if (strcmp(fmp->key, "HMSL_TIME") == 0) {
+           break;
+        case XT_HMSL_TIME:
             writehms(buff, sizeof buff, fmp->printfc, wpt->creation_time, 0 );
-       } else
-       if (strcmp(fmp->key, "ISO_TIME") == 0) {
+           break;
+       case XT_ISO_TIME:
             writetime(buff, sizeof buff, "%Y-%m-%dT%H:%M:%SZ", wpt->creation_time, 1 );
-       } else
-       if (strcmp(fmp->key, "ISO_TIME_MS") == 0) {
+           break;
+       case XT_ISO_TIME_MS:
             xml_fill_in_time(buff, wpt->creation_time, 
                wpt->microseconds, XML_LONG_TIME);
-       } else
-        if (strcmp(fmp->key, "GEOCACHE_LAST_FOUND") == 0) {
+           break;
+        case XT_GEOCACHE_LAST_FOUND:
            writebuff(buff, fmp->printfc, time_to_yyyymmdd(wpt->gc_data.last_found));
-       } else
+           break;
 
         /* GEOCACHE STUFF **************************************************/
-        if (strcmp(fmp->key, "GEOCACHE_DIFF") == 0) {
+        case XT_GEOCACHE_DIFF:
             /* Geocache Difficulty as a double */
             writebuff(buff, fmp->printfc, wpt->gc_data.diff / 10.0);
            field_is_unknown = !wpt->gc_data.diff;
-        } else
-        if (strcmp(fmp->key, "GEOCACHE_TERR") == 0) {
+            break;
+        case XT_GEOCACHE_TERR:
             /* Geocache Terrain as a double */
             writebuff(buff, fmp->printfc, wpt->gc_data.terr / 10.0);
            field_is_unknown = !wpt->gc_data.terr;
-        } else
-        if (strcmp(fmp->key, "GEOCACHE_CONTAINER") == 0) {
+            break;
+        case XT_GEOCACHE_CONTAINER:
             /* Geocache Container */
             writebuff(buff, fmp->printfc, gs_get_container(wpt->gc_data.container));
            field_is_unknown = wpt->gc_data.container == gc_unknown;
-       } else
-       if (strcmp(fmp->key, "GEOCACHE_TYPE") == 0) {
+           break;
+       case XT_GEOCACHE_TYPE:
             /* Geocache Type */
             writebuff(buff, fmp->printfc, gs_get_cachetype(wpt->gc_data.type));
            field_is_unknown = wpt->gc_data.type == gt_unknown;
-        } else 
-       if (strcmp(fmp->key, "GEOCACHE_HINT") == 0) {
+            break; 
+       case XT_GEOCACHE_HINT:
            writebuff(buff, fmp->printfc, NONULL(wpt->gc_data.hint));
            field_is_unknown = !wpt->gc_data.hint;
-        } else 
-       if (strcmp(fmp->key, "GEOCACHE_PLACER") == 0) {
+            break; 
+       case XT_GEOCACHE_PLACER:
            writebuff(buff, fmp->printfc, NONULL(wpt->gc_data.placer));
            field_is_unknown = !wpt->gc_data.placer;
-        } else
+            break;
+       case XT_GEOCACHE_ISAVAILABLE:
+           if ( wpt->gc_data.is_available == status_false )
+             writebuff(buff, fmp->printfc, "False");
+           else if ( wpt->gc_data.is_available == status_true )
+             writebuff(buff, fmp->printfc, "True");
+                       else
+                               writebuff(buff, fmp->printfc, "Unknown");
+            break;
+       case XT_GEOCACHE_ISARCHIVED:
+           if ( wpt->gc_data.is_archived == status_false )
+             writebuff(buff, fmp->printfc, "False");
+           else if ( wpt->gc_data.is_archived == status_true )
+               writebuff(buff, fmp->printfc, "True");
+           else
+               writebuff(buff, fmp->printfc, "Unknown");
+            break;
        /* Tracks and Routes ***********************************************/
-       if (strcmp(fmp->key, "TRACK_NAME") == 0) {
+       case XT_TRACK_NAME:
            if (csv_track) writebuff(buff, fmp->printfc, NONULL(csv_track->rte_name));
-        } else
-       if (strcmp(fmp->key, "ROUTE_NAME") == 0) {
+            break;
+       case XT_ROUTE_NAME:
            if (csv_route) writebuff(buff, fmp->printfc, NONULL(csv_route->rte_name));
-        } else
+            break;
        
        /* GPS STUFF *******************************************************/
-       if (strcmp(fmp->key, "GPS_HDOP") == 0) {
+       case XT_GPS_HDOP:
             writebuff(buff, fmp->printfc, wpt->hdop);
            field_is_unknown = !wpt->hdop;
-        } else
-       if (strcmp(fmp->key, "GPS_VDOP") == 0) {
+            break;
+       case XT_GPS_VDOP:
             writebuff(buff, fmp->printfc, wpt->vdop);
            field_is_unknown = !wpt->vdop;
-        } else
-       if (strcmp(fmp->key, "GPS_PDOP") == 0) {
+            break;
+       case XT_GPS_PDOP:
             writebuff(buff, fmp->printfc, wpt->pdop);
            field_is_unknown = !wpt->pdop;
-        } else
-       if (strcmp(fmp->key, "GPS_SAT") == 0) {
+            break;
+       case XT_GPS_SAT:
             writebuff(buff, fmp->printfc, wpt->sat);
            field_is_unknown = !wpt->sat;
-        } else
-       if (strcmp(fmp->key, "GPS_FIX") == 0) {
+            break;
+       case XT_GPS_FIX: {
                char *fix = NULL;
                switch (wpt->fix) {
                        case fix_unknown:
@@ -1569,11 +1761,56 @@ xcsv_waypt_pr(const waypoint *wpt)
                                break;
                }
                writebuff(buff, fmp->printfc, fix);
-        } else {
-                       warning( MYNAME ": Unknown style directive: %s\n", fmp->key);
-        }
-       
-
+               }
+               break;
+       /* GMSD ************************************************************/
+       case XT_COUNTRY: {
+               garmin_fs_t *gmsd = GMSD_FIND(wpt);
+               writebuff(buff, fmp->printfc, GMSD_GET(country, ""));
+               }
+               break;
+       case XT_STATE: {
+               garmin_fs_t *gmsd = GMSD_FIND(wpt);
+               writebuff(buff, fmp->printfc, GMSD_GET(state, ""));
+               }
+               break;
+       case XT_CITY: {
+               garmin_fs_t *gmsd = GMSD_FIND(wpt);
+               writebuff(buff, fmp->printfc, GMSD_GET(city, ""));
+               }
+               break;
+       case XT_POSTAL_CODE: {
+               garmin_fs_t *gmsd = GMSD_FIND(wpt);
+               writebuff(buff, fmp->printfc, GMSD_GET(postal_code, ""));
+               }
+               break;
+       case XT_STREET_ADDR: {
+               garmin_fs_t *gmsd = GMSD_FIND(wpt);
+               writebuff(buff, fmp->printfc, GMSD_GET(addr, ""));
+               }
+               break;
+       case XT_PHONE_NR: {
+               garmin_fs_t *gmsd = GMSD_FIND(wpt);
+               writebuff(buff, fmp->printfc, GMSD_GET(phone_nr, ""));
+               }
+               break;
+       case XT_FACILITY: {
+               garmin_fs_t *gmsd = GMSD_FIND(wpt);
+               writebuff(buff, fmp->printfc, GMSD_GET(facility, ""));
+               }
+               break;
+       case -1:
+               if (strncmp(fmp->key, "LON_10E", 7) == 0) {
+                       writebuff(buff, fmp->printfc, lon * pow((double)10, atof(fmp->key+7)));
+               } else 
+               if (strncmp(fmp->key, "LAT_10E", 7) == 0) {
+                       writebuff(buff, fmp->printfc, lat * pow((double)10, atof(fmp->key+7)));
+               }
+               break;
+       default:
+               warning( MYNAME ": Unknown style directive: %s\n", fmp->key);
+               break;
+       }
         obuff = csv_stringclean(buff, xcsv_file.badchars);
 
        if (field_is_unknown && fmp->options & OPTIONS_OPTIONAL) {
@@ -1592,7 +1829,7 @@ xcsv_waypt_pr(const waypoint *wpt)
 
 next:
        xfree(obuff);
-    }
+       }
 
     gbfprintf (xcsv_file.xcsvfp, "%s", xcsv_file.record_delimiter);
 
index e8659a82b13f7f2fece8c127a4c561519bb8ff4b..ab29e3771430c8587a1c26f44d518cd575c2b5f1 100644 (file)
@@ -81,6 +81,7 @@ typedef struct field_map {
        char * key;
        char * val;
        char * printfc;
+       int hashed_key;
        int options;
 } field_map_t;
 
diff --git a/defs.h b/defs.h
index eb109dd217c3ef59bec76cdc7c69ad55732d93c9..40b487eefbf0c5ad81fbafc14ccb4bf41becf941 100644 (file)
--- a/defs.h
+++ b/defs.h
 #  define NORETURN void
 #endif
 
+#ifndef HAVE_VA_COPY
+#  ifdef __va_copy
+#    define va_copy(DEST,SRC) __va_copy((DEST),(SRC))
+#  else
+#    ifdef HAVE_VA_LIST_AS_ARRAY
+#      define va_copy(DEST,SRC) (*(DEST) = *(SRC))
+#    else
+#      define va_copy(DEST,SRC) ((DEST) = (SRC))
+#    endif
+#  endif
+#endif
+
 /*
  * Common definitions.   There should be no protocol or file-specific
  * data in this file.
@@ -138,6 +150,12 @@ typedef enum {
        fix_pps
 } fix_type;
 
+typedef enum {
+       status_unknown=0,
+       status_true,
+       status_false
+} status_type;
+        
 /*
  * Define globally on which kind of data gpsbabel is working.
  * Important for "file types" that are essentially a communication
@@ -180,6 +198,7 @@ extern global_options global_opts;
 extern const char gpsbabel_version[];
 extern time_t gpsbabel_now;    /* gpsbabel startup-time; initialized in main.c with time() */
 extern time_t gpsbabel_time;   /* gpsbabel startup-time; initialized in main.c with current_time(), ! ZERO within testo ! */
+extern int geocaches_present;
 
 #define MILLI_TO_MICRO(t) (t * 1000)  /* Milliseconds to Microseconds */
 #define MICRO_TO_MILLI(t) (t / 1000)  /* Microseconds to Milliseconds*/
@@ -233,13 +252,15 @@ typedef struct {
        geocache_container container:4;
        unsigned int diff:6; /* (multiplied by ten internally) */
        unsigned int terr:6; /* (likewise) */
+       status_type is_archived:2;
+       status_type is_available:2;
        time_t exported;
        time_t last_found;
        char *placer; /* Placer name */
        int placer_id; /* Placer id */
        char *hint; /* all these UTF8, XML entities removed, May be not HTML. */
        utf_string desc_short;
-       utf_string desc_long; 
+       utf_string desc_long;
 } geocache_data ;
 
 typedef struct xml_tag {
@@ -302,6 +323,7 @@ typedef struct {
        unsigned int icon_descr_is_dynamic:1; 
        unsigned int shortname_is_synthetic:1;
        unsigned int cet_converted:1;           /* strings are converted to UTF8; interesting only for input */
+       unsigned int fmt_use:1;                 /* lightweight "extra data" */
        /* "flagged fields" */
        unsigned int temperature:1;             /* temperature field is set */
        unsigned int proximity:1;               /* proximity field is set */
@@ -316,7 +338,7 @@ typedef struct {
 } wp_flags;
 
 #define WAYPT_SET(wpt,member,val) { wpt->member = (val); wpt->wpt_flags.member = 1; }
-#define WAYPT_GET(wpt,member,def) (wpt->wpt_flags.member) ? (wpt->member) : (def)
+#define WAYPT_GET(wpt,member,def) ((wpt->wpt_flags.member) ? (wpt->member) : (def))
 #define WAYPT_UNSET(wpt,member) wpt->wpt_flags.member = 0
 #define WAYPT_HAS(wpt,member) (wpt->wpt_flags.member)
 /*
@@ -698,6 +720,10 @@ void waypt_disp(const waypoint *);
 void waypt_status_disp(int total_ct, int myct);
 double waypt_time(const waypoint *wpt);
 double waypt_speed(const waypoint *A, const waypoint *B);
+double waypt_speed_ex(const waypoint *A, const waypoint *B);
+double waypt_course(const waypoint *A, const waypoint *B);
+double waypt_distance(const waypoint *A, const waypoint *B);
+double waypt_distance_ex(const waypoint *A, const waypoint *B);
 
 NORETURN fatal(const char *, ...) PRINTFLIKE(1, 2);
 void is_fatal(const int condition, const char *, ...) PRINTFLIKE(2, 3);
@@ -773,6 +799,7 @@ char *xstrrstr(const char *s1, const char *s2);
 void rtrim(char *s);
 char * lrtrim(char *s);
 int xasprintf(char **strp, const char *fmt, ...);
+int xvasprintf(char **strp, const char *fmt, va_list ap);
 char *strupper(char *src);
 char *strlower(char *src);
 signed int get_tz_offset(void);
@@ -851,7 +878,9 @@ typedef struct {
 signed int be_read16(const void *p);
 signed int be_read32(const void *p);
 signed int le_read16(const void *p);
+unsigned int le_readu16(const void *p);
 signed int le_read32(const void *p);
+unsigned int le_readu32(const void *p);
 void le_read64(void *dest, const void *src);
 void be_write16(void *pp, const unsigned i);
 void be_write32(void *pp, const unsigned i);
@@ -891,17 +920,23 @@ typedef enum {
        grid_lat_lon_dmm = 1,
        grid_lat_lon_dms = 2,
        grid_bng = 3,
-       grid_utm = 4
+       grid_utm = 4,
+       grid_swiss = 5
 } grid_type;
 
 #define GRID_INDEX_MIN grid_lat_lon_ddd
-#define GRID_INDEX_MAX grid_utm
+#define GRID_INDEX_MAX grid_swiss
 
 #define DATUM_OSGB36   86
 #define DATUM_WGS84    118
 
+/*
+ *  From parse.c
+ */
 int parse_coordinates(const char *str, int datum, const grid_type grid,
        double *latitude, double *longitude, const char *module);
+int parse_distance(const char *str, double *val, double scale, const char *module);
+int parse_speed(const char *str, double *val, const double scale, const char *module);
 
 /*
  *  From util_crc.c
index 6f6e1fc2bd65e0f4bb0a88b5d7f77c3ab6b92587..37dac7ac24bc9ae86ea7f8f7db8007e2b78499ea 100644 (file)
--- a/delgpl.c
+++ b/delgpl.c
@@ -38,13 +38,13 @@ typedef struct gpl_point {
        unsigned int dummy3;
 } gpl_point_t;
 
-static FILE *gplfile_in;
-static FILE *gplfile_out;
+static gbfile *gplfile_in;
+static gbfile *gplfile_out;
 
 static void
 gpl_rd_init(const char *fname)
 {
-       gplfile_in = xfopen(fname, "rb", MYNAME);
+       gplfile_in = gbfopen_le(fname, "rb", MYNAME);
        if (sizeof(struct gpl_point) != 56) {
                fatal(MYNAME ": gpl_point is %lu instead of 56.\n", 
                                (unsigned long) sizeof(struct gpl_point));
@@ -62,7 +62,7 @@ gpl_read(void)
        track_head = route_head_alloc();
        track_add_head(track_head);
 
-       while (fread(&gp, sizeof(gp), 1, gplfile_in) > 0) {
+       while (gbfread(&gp, sizeof(gp), 1, gplfile_in) > 0) {
                wpt_tmp = waypt_new();
                wpt_tmp->latitude = le_read_double(&gp.lat);
                wpt_tmp->longitude = le_read_double(&gp.lon);
@@ -84,19 +84,19 @@ gpl_read(void)
 static void
 gpl_rd_deinit(void)
 {
-       fclose(gplfile_in);
+       gbfclose(gplfile_in);
 }
 
 static void
 gpl_wr_init(const char *fname)
 {
-       gplfile_out = xfopen(fname, "wb", MYNAME);
+       gplfile_out = gbfopen_le(fname, "wb", MYNAME);
 }
 
 static void
 gpl_wr_deinit(void)
 {
-       fclose(gplfile_out);
+       gbfclose(gplfile_out);
 }
 
 static void
@@ -117,7 +117,7 @@ gpl_trackpt(const waypoint *wpt)
        le_write_double(&gp.heading, heading );
        le_write32(&gp.tm, wpt->creation_time);
 
-       fwrite(&gp, sizeof(gp), 1, gplfile_out);
+       gbfwrite(&gp, sizeof(gp), 1, gplfile_out);
 }
 
 static void
diff --git a/destinator.c b/destinator.c
new file mode 100644 (file)
index 0000000..59b3c32
--- /dev/null
@@ -0,0 +1,588 @@
+/*
+
+    Support for Destinator POI's, Itineraries and Tracklogs.
+    ( as described at "http://mozoft.com/d3log.html" )
+    
+    Copyright (C) 2008 Olaf Klein, o.b.klein@gpsbabel.org
+
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+ */
+
+#include "defs.h"
+#include "cet.h"
+#include "garmin_fs.h"
+#include "strptime.h"
+#include <ctype.h>
+#include <time.h>
+
+#define MYNAME                 "destinator"
+#define DST_DYN_POI    "Dynamic POI"
+#define DST_ITINERARY  "City->Street"
+
+static
+arglist_t destinator_args[] = {
+       ARG_TERMINATOR
+};
+
+static gbfile *fin, *fout;
+static gpsdata_type data_type;
+
+
+/*******************************************************************************/
+/*                                   READER                                    */
+/*-----------------------------------------------------------------------------*/
+
+static garmin_fs_t *
+gmsd_init(waypoint *wpt)
+{
+       garmin_fs_t *gmsd = GMSD_FIND(wpt);
+       if (gmsd == NULL) {
+               gmsd = garmin_fs_alloc(-1);
+               fs_chain_add(&wpt->fs, (format_specific_data *) gmsd);
+       }
+       return gmsd;
+}
+
+static char *
+read_wcstr(const int discard)
+{
+       short *buff = NULL, c;
+       int size = 0, pos = 0;
+       
+       while ((c = gbfgetint16(fin))) {
+               if (size == 0) {
+                       size = 16;
+                       buff = xmalloc(size * 2);
+               }
+               else if (pos == size) {
+                       size += 16;
+                       buff = xrealloc(buff, size * 2);
+               }
+               buff[pos] = c;
+               pos += 1;
+       }
+
+       if (pos != 0) {
+               char *res;
+               if (discard) res = NULL;
+               else {
+                       res = cet_str_uni_to_utf8(buff, pos);
+                       res = lrtrim(res);
+                       if (*res == '\0') {
+                               xfree(res);
+                               res = NULL;
+                       }
+               }
+               xfree(buff);
+               return res;
+       }
+       else
+               return NULL;
+}
+
+static void
+write_wcstr(const char *str)
+{
+       if (str && *str) {
+               int bytes, value;
+               char *cin = (char *)str;
+               char *ce = cin + strlen(cin);
+               while (cin < ce) {
+                       cet_utf8_to_ucs4(cin, &bytes, &value);
+                       cin += bytes;
+                       gbfputint16(value, fout);
+               }
+       }
+       gbfputint16(0, fout);
+}
+
+static int
+read_until_wcstr(const char *str)
+{
+       char *buff;
+       int len, sz;
+       int eos = 0, res = 0;
+       
+       len = strlen(str);
+       sz = (len + 1) * 2;
+       buff = xcalloc(sz, 1);
+       
+       while (! gbfeof(fin)) {
+
+               char c = gbfgetc(fin);
+               memmove(buff, buff + 1, sz - 1);
+               buff[sz - 1] = c;
+
+               if (c == 0) {
+                       eos++;
+                       if (eos >= 2) { /* two or more zero bytes => end of string */
+                               char *test = cet_str_uni_to_utf8((short *)buff, len);
+                               if (test) {
+                                       res = (strcmp(str, test) == 0);
+                                       xfree(test);
+                                       if (res) break;
+                               }
+                       }
+               }
+               else eos = 0;
+       }
+       xfree(buff);
+       return res;
+}
+
+static void
+destinator_read_poi(void)
+{
+       waypoint *wpt;
+       int count = 0;
+       
+       gbfrewind(fin);
+       
+       while (! (gbfeof(fin))) {
+               char *str, *hnum;
+               double ll;
+               garmin_fs_t *gmsd;
+               
+               if (count == 0) {
+                       str = read_wcstr(0);
+                       if ((str == NULL) || (strcmp(str, DST_DYN_POI) != 0))
+                               fatal(MYNAME "_poi: Invalid record header!\n");
+                       xfree(str);
+               }
+               else if (! read_until_wcstr(DST_DYN_POI)) break;
+
+               count++;
+                       
+               wpt = waypt_new();
+               
+               wpt->shortname = read_wcstr(0);
+               wpt->notes = read_wcstr(0);             /* comment */
+
+               hnum = read_wcstr(0);                   /* house number */
+
+               str = read_wcstr(0);                    /* street */
+               if (!str) {
+                       str = hnum;
+                       hnum = NULL;
+               }
+               if (str) {
+                       gmsd = gmsd_init(wpt);
+                       if (hnum) {
+                               str = xstrappend(str, " ");
+                               str = xstrappend(str, hnum);
+                       }
+                       GMSD_SET(addr, str);
+               }
+
+               if ((str = read_wcstr(0))) {            /* city */
+                       gmsd = gmsd_init(wpt);
+                       GMSD_SET(city, str);
+               }
+
+               if (hnum) xfree(hnum);
+
+               (void) read_wcstr(1);                   /* unknown */
+
+               if ((str = read_wcstr(0))) {            /* postcode */
+                       gmsd = gmsd_init(wpt);
+                       GMSD_SET(postal_code, str);
+               }
+
+               (void) read_wcstr(1);                   /* unknown */
+
+               (void) gbfgetdbl(fin);
+               
+               wpt->longitude = gbfgetdbl(fin);
+               wpt->latitude = gbfgetdbl(fin);
+               ll = gbfgetdbl(fin);
+               if (ll != wpt->longitude)
+                       fatal(MYNAME "_poi: Invalid file!\n");
+               ll = gbfgetdbl(fin);
+               if (ll != wpt->latitude)
+                       fatal(MYNAME "_poi: Invalid file!\n");
+               
+               waypt_add(wpt);
+       }
+}
+
+static void
+destinator_read_rte(void)
+{
+       int count = 0;
+       route_head *rte = NULL;
+
+       gbfrewind(fin);
+       
+       while (! (gbfeof(fin))) {
+               char *str;
+               waypoint *wpt;
+               
+               if (count == 0) {
+                       str = read_wcstr(0);
+                       if ((str == NULL) || (strcmp(str, DST_ITINERARY) != 0))
+                               fatal(MYNAME "_itn: Invalid record header!\n");
+                       xfree(str);
+               }
+               else if (! read_until_wcstr(DST_ITINERARY)) break;
+
+               count++;
+               
+               wpt = waypt_new();
+
+               wpt->shortname = read_wcstr(0);
+               wpt->notes = read_wcstr(0);
+
+               (void) gbfgetint32(fin);
+               (void) gbfgetdbl(fin);
+               (void) gbfgetdbl(fin);
+
+               wpt->longitude = gbfgetdbl(fin);
+               wpt->latitude = gbfgetdbl(fin);
+               if (gbfgetdbl(fin) != wpt->longitude)
+                       fatal(MYNAME "_itn: Invalid file!\n");
+               if (gbfgetdbl(fin) != wpt->latitude)
+                       fatal(MYNAME "_itn: Invalid file!\n");
+               
+               if (! rte) {
+                       rte = route_head_alloc();
+                       route_add_head(rte);
+               }
+               route_add_wpt(rte, wpt);
+
+               (void) gbfgetdbl(fin);
+               (void) gbfgetdbl(fin);
+       }
+}
+
+static void
+destinator_read_trk(void)
+{
+       char TXT[4] = "TXT";
+       int recno = -1;
+       route_head *trk = NULL;
+       
+       gbfrewind(fin);
+
+       while (! (gbfeof(fin))) {
+               waypoint *wpt;
+               struct tm tm;
+               char buff[20];
+               int date;
+               double time;
+               
+               recno++;
+               
+               if (gbfeof(fin)) break;
+               
+               wpt = waypt_new();
+
+               wpt->longitude = gbfgetdbl(fin);
+               wpt->latitude = gbfgetdbl(fin);
+               wpt->altitude = gbfgetdbl(fin);
+
+               (void) gbfgetdbl(fin);                          /* unknown */
+               (void) gbfgetdbl(fin);                          /* unknown */
+               (void) gbfgetdbl(fin);                          /* unknown */
+
+               wpt->fix = gbfgetint32(fin);
+               wpt->sat = gbfgetint32(fin);
+
+               gbfseek(fin, 12 * sizeof(gbint32), SEEK_CUR);   /* SAT info */
+
+               date = gbfgetint32(fin);
+               time = gbfgetflt(fin);
+
+               gbfseek(fin, 2 * 12, SEEK_CUR);                 /* SAT info */
+
+               gbfread(TXT, 1, 3, fin);
+               if (strcmp(TXT, "TXT") != 0)
+                       fatal(MYNAME "_trk: No (or unknown) file!\n");
+
+               gbfseek(fin, 13, SEEK_CUR);                     /* unknown */
+
+               memset(&tm, 0, sizeof(tm));
+                       
+               snprintf(buff, sizeof(buff), "%06d%.f", date, time);
+               strptime(buff, "%d%m%y%H%M%S", &tm);
+               wpt->creation_time = mkgmtime(&tm);
+               wpt->microseconds = ((int)time % 1000) * 1000;
+                       
+               if ((wpt->sat > 0) && (wpt->fix > 0)) {
+                       
+                       wpt->fix++;
+                       
+                       if (! trk) {
+                               trk = route_head_alloc();
+                               track_add_head(trk);
+                       }
+                       
+                       track_add_wpt(trk, wpt);
+               }
+               else
+                       waypt_free(wpt);
+       }
+}
+
+static void
+destinator_read(void)
+{
+       int i0, i1;
+       double d0, d1;
+       char buff[16];
+       
+       gbfread(buff, sizeof(buff), 1, fin);
+       i0 = le_read32(&buff[0]);
+       i1 = le_read32(&buff[4]);
+       
+       if ((i0 == 0x690043) && (i1 == 0x790074)) {
+               if (data_type != rtedata)
+                       warning(MYNAME ": Using Destinator Itinerary Format!\n");
+               destinator_read_rte();
+       }
+       else if ((i0 == 0x790044) && (i1 == 0x61006e)) {
+               if (data_type != wptdata)
+                       warning(MYNAME ": Using Destinator POI Format!\n");
+               destinator_read_poi();
+       }
+       else {
+               if (data_type != trkdata)
+                       warning(MYNAME ": Using Destinator Tracklog Format!\n");
+               
+               le_read64(&d0, &buff[0]);
+               le_read64(&d1, &buff[8]);
+               if ((fabs(d0) > 180) || (fabs(d1) > 90))
+                       fatal(MYNAME ": No Destinator (.dat) file!\n");
+               destinator_read_trk();
+       }
+}
+
+/*******************************************************************************/
+/*                                   WRITER                                    */
+/*-----------------------------------------------------------------------------*/
+
+static void
+destinator_wpt_disp(const waypoint *wpt)
+{
+       garmin_fs_t *gmsd = GMSD_FIND(wpt);
+
+       write_wcstr(DST_DYN_POI);
+       write_wcstr((wpt->shortname) ? wpt->shortname : "WPT");
+       write_wcstr((wpt->notes) ? wpt->notes : wpt->description);
+
+       write_wcstr(NULL);                              /* house number */
+       write_wcstr(GMSD_GET(addr, NULL));              /* street */
+       write_wcstr(GMSD_GET(city, NULL));              /* city */
+       write_wcstr(NULL);                              /* unknown */
+       write_wcstr(GMSD_GET(postal_code, NULL));       /* postcode */
+       write_wcstr(NULL);                              /* unknown */
+
+       gbfputint32(0, fout);
+       gbfputint32(0, fout);
+
+       gbfputdbl(wpt->longitude, fout);
+       gbfputdbl(wpt->latitude, fout);
+       gbfputdbl(wpt->longitude, fout);
+       gbfputdbl(wpt->latitude, fout);
+
+       gbfputdbl(0, fout);
+       gbfputdbl(0, fout);
+}
+
+static void
+destinator_trkpt_disp(const waypoint *wpt)
+{
+       int i;
+       
+       gbfputdbl(wpt->longitude, fout);
+       gbfputdbl(wpt->latitude, fout);
+       gbfputdbl(wpt->altitude, fout);
+       gbfputdbl(0, fout);
+       gbfputdbl(0, fout);
+       gbfputdbl(0, fout);
+       gbfputint32(wpt->fix > fix_unknown ? wpt->fix - 1 : 0, fout);
+       gbfputint32(wpt->sat, fout);
+       for (i = 0; i < 12; i++) gbfputint32(0, fout);
+       
+       if (wpt->creation_time) {
+               struct tm tm;
+               double time;
+               int date;
+
+               tm = *gmtime(&wpt->creation_time);
+               tm.tm_mon += 1;
+               tm.tm_year -= 100;
+               date = ((int)tm.tm_mday * 10000) + ((int)tm.tm_mon * 100) + tm.tm_year;
+               gbfputint32(date, fout);
+               
+               time = ((int)tm.tm_hour * 10000) + ((int)tm.tm_min * 100) + tm.tm_sec;
+               time = (time * 1000) + (wpt->microseconds / 1000);
+               gbfputflt(time, fout);
+       }
+       else {
+               gbfputint32(0, fout);   /* Is this invalid ? */
+               gbfputflt(0, fout);
+       }
+
+       for (i = 0; i < 12; i++) gbfputint16(0, fout);
+       gbfputcstr("TXT", fout);
+       for (i = 0; i < 12; i++) gbfputc(0, fout);
+}
+
+static void
+destinator_rtept_disp(const waypoint *wpt)
+{
+       write_wcstr(DST_ITINERARY);
+       write_wcstr((wpt->shortname) ? wpt->shortname : "RTEPT");
+       write_wcstr((wpt->notes) ? wpt->notes : wpt->description);
+
+       gbfputint32(0, fout);
+       gbfputdbl(0, fout);
+       gbfputdbl(0, fout);
+
+       gbfputdbl(wpt->longitude, fout);
+       gbfputdbl(wpt->latitude, fout);
+       gbfputdbl(wpt->longitude, fout);
+       gbfputdbl(wpt->latitude, fout);
+
+       gbfputdbl(0, fout);
+       gbfputdbl(0, fout);
+}
+
+/*******************************************************************************
+* %%%        global callbacks called by gpsbabel main process              %%% *
+*******************************************************************************/
+
+static void
+destinator_rd_init(const char *fname)
+{
+       fin = gbfopen_le(fname, "rb", MYNAME);
+}
+
+static void 
+destinator_rd_deinit(void)
+{
+       gbfclose(fin);
+}
+
+static void
+destinator_read_poi_wrapper(void)
+{
+       data_type = wptdata;
+       destinator_read();
+}
+
+static void
+destinator_read_rte_wrapper(void)
+{
+       data_type = rtedata;
+       destinator_read();
+}
+
+static void
+destinator_read_trk_wrapper(void)
+{
+       data_type = trkdata;
+       destinator_read();
+}
+
+static void
+destinator_wr_init(const char *fname)
+{
+       fout = gbfopen_le(fname, "wb", MYNAME);
+}
+
+static void
+destinator_wr_deinit(void)
+{
+       gbfclose(fout);
+}
+
+static void
+destinator_write_poi(void)
+{
+       waypt_disp_all(destinator_wpt_disp);
+}
+
+static void
+destinator_write_rte(void)
+{
+       route_disp_all(NULL, NULL, destinator_rtept_disp);
+}
+
+static void
+destinator_write_trk(void)
+{
+       track_disp_all(NULL, NULL, destinator_trkpt_disp);
+}
+
+/**************************************************************************/
+
+ff_vecs_t destinator_poi_vecs = {
+       ff_type_file,
+       { 
+               ff_cap_read | ff_cap_write      /* waypoints */, 
+               ff_cap_none                     /* tracks */, 
+               ff_cap_none                     /* routes */
+       },
+       destinator_rd_init,     
+       destinator_wr_init,     
+       destinator_rd_deinit,   
+       destinator_wr_deinit,   
+       destinator_read_poi_wrapper,
+       destinator_write_poi,
+       NULL,
+       destinator_args,
+       CET_CHARSET_UTF8, 1                     /* fixed */
+};
+
+ff_vecs_t destinator_itn_vecs = {
+       ff_type_file,
+       { 
+               ff_cap_none                     /* waypoints */, 
+               ff_cap_none                     /* tracks */, 
+               ff_cap_read | ff_cap_write      /* routes */
+       },
+       destinator_rd_init,     
+       destinator_wr_init,     
+       destinator_rd_deinit,   
+       destinator_wr_deinit,   
+       destinator_read_rte_wrapper,
+       destinator_write_rte,
+       NULL,
+       destinator_args,
+       CET_CHARSET_UTF8, 1                     /* fixed */
+};
+
+ff_vecs_t destinator_trl_vecs = {
+       ff_type_file,
+       { 
+               ff_cap_none                     /* waypoints */, 
+               ff_cap_read | ff_cap_write      /* tracks */, 
+               ff_cap_none                     /* routes */
+       },
+       destinator_rd_init,     
+       destinator_wr_init,     
+       destinator_rd_deinit,   
+       destinator_wr_deinit,   
+       destinator_read_trk_wrapper,
+       destinator_write_trk,
+       NULL,
+       destinator_args,
+       CET_CHARSET_UTF8, 1                     /* fixed */
+};
+
+/**************************************************************************/
diff --git a/dg-100.c b/dg-100.c
new file mode 100644 (file)
index 0000000..0518578
--- /dev/null
+++ b/dg-100.c
@@ -0,0 +1,689 @@
+/*
+
+    GlobalSat DG-100 GPS data logger download.
+
+    Copyright (C) 2007  Mirko Parthey, mirko.parthey@informatik.tu-chemnitz.de
+    Copyright (C) 2005-2008  Robert Lipe, robertlipe@gpsbabel.org
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+ */
+
+/*
+    DG-100 communication protocol specification:
+    http://www.usglobalsat.com/forum/topic.asp?TOPIC_ID=607#1375
+ */
+
+#include "defs.h"
+#include <ctype.h>
+
+#include "gbser.h"
+#include <assert.h>
+#include <string.h>
+
+#define MYNAME "DG-100"
+
+static void *serial_handle;
+
+/* maximum frame size observed so far: 1817 bytes
+ *   (dg100cmd_getfileheader returning 150 entries)
+ * dg100cmd_getfileheader is the only answer type of variable length,
+ * answers of other types are always shorter than 1817 bytes */
+#define FRAME_MAXLEN 4096
+
+enum dg100_command_id {
+       dg100cmd_getconfig     = 0xB7,
+       dg100cmd_setconfig     = 0xB8,
+       dg100cmd_getfileheader = 0xBB,
+       dg100cmd_getfile       = 0xB5,
+       dg100cmd_erase         = 0xBA,
+       dg100cmd_getid         = 0xBF,
+       dg100cmd_setid         = 0xC0,
+       dg100cmd_gpsmouse      = 0xBC
+};
+
+struct dg100_command {
+       int  id;
+       int  sendsize;
+       int  recvsize;
+       int  trailing_bytes;
+       const char *text;       /* Textual description for debugging */
+};
+
+struct dg100_command dg100_commands[] = {
+       { dg100cmd_getconfig,      0,   44+2,    2, "getconfig" },
+       { dg100cmd_setconfig,     41,    4+2,    2, "setconfig"  },
+       /* the getfileheader answer has variable length, -1 is a dummy value */
+       { dg100cmd_getfileheader,  2,   -1  ,    2, "getfileheader"  },
+       { dg100cmd_getfile,        2, 1024+2,    2, "getfile" },
+       { dg100cmd_erase,          2,    4+2,    2, "erase" },
+       { dg100cmd_getid,          0,    8+2,    2, "getid" },
+       { dg100cmd_setid,          8,    4+2,    2, "setid" },
+       { dg100cmd_gpsmouse,       1,    0  ,    0, "gpsmouse" }
+};
+const unsigned dg100_numcommands = sizeof(dg100_commands) / sizeof(dg100_commands[0]);
+
+/* TODO: use obstacks or vmem_t instead? */
+struct dynarray16 {
+       unsigned count; /* number of elements used */
+       unsigned limit; /* number of elements allocated */
+       gbint16 *data;
+};
+
+/* helper functions */
+static struct dg100_command *
+dg100_findcmd(int id)
+{
+       unsigned int i;
+
+       /* linear search should be OK as long as dg100_numcommands is small */
+       for (i = 0; i < dg100_numcommands; i++) {
+               if (dg100_commands[i].id == id)
+                       return(&dg100_commands[i]);
+       }
+
+       return NULL;
+}
+
+static void
+dynarray16_init(struct dynarray16 *a, unsigned limit)
+{
+       a->count = 0;
+       a->limit = limit;
+       a->data = xmalloc(sizeof(a->data[0]) * a->limit);
+}
+
+static gbint16 *
+dynarray16_alloc(struct dynarray16 *a, unsigned n)
+{
+       unsigned int i;
+       unsigned int need;
+       const unsigned elements_per_chunk = 4096 / sizeof(a->data[0]);
+       
+       i = a->count;
+       a->count += n;
+       
+       need = a->count - a->limit;
+       if (need > 0) {
+               need = (need > elements_per_chunk) ? need : elements_per_chunk;
+               a->limit += need;
+               xrealloc(a->data, sizeof(a->data[0]) * a->limit);
+       }
+       return(a->data + i);
+}
+
+static time_t
+bintime2utc(int date, int time)
+{
+       struct tm gpstime;
+
+       gpstime.tm_sec   = time % 100;
+       time /= 100;
+       gpstime.tm_min   = time % 100;
+       time /= 100;
+       gpstime.tm_hour  = time;
+
+       /*
+        * GPS year: 2000+; struct tm year: 1900+
+        * GPS month: 1-12, struct tm month: 0-11
+        */
+       gpstime.tm_year  = date % 100 + 100;
+       date /= 100;
+       gpstime.tm_mon   = date % 100 - 1;
+       date /= 100;
+       gpstime.tm_mday  = date;
+
+       return(mkgmtime(&gpstime));
+}
+
+static void 
+dg100_debug(const char *hdr, int include_nl, size_t sz, unsigned char *buf)
+{
+       unsigned int i;
+
+       /* Only give byte dumps for higher debug levels */
+       if (global_opts.debug_level < 5) {
+               return;
+       }
+
+       fprintf(stderr, "%s", hdr);
+
+       for (i = 0; i < sz; i++)  {
+               fprintf(stderr, "%02x ", buf[i]);
+       }
+
+       if (include_nl) {
+               fprintf(stderr, "\n");
+       }
+}
+
+static void
+dg100_log(const char *fmt, ...)
+{
+       va_list ap;
+       va_start (ap, fmt);
+       if (global_opts.debug_level < 1) {
+               return;
+       }
+       
+       vfprintf(stderr, fmt, ap);
+       va_end(ap);
+}
+
+
+/* TODO: check whether negative lat/lon (West/South) are handled correctly */
+static float
+bin2deg(int val)
+{
+       /* Assume that val prints in decimal digits as [-]dddmmffff
+        * ddd:  degrees
+        * mm:   the integer part of minutes
+        * ffff: the fractional part of minutes (decimal fraction 0.ffff)
+        */
+
+       float deg;
+       int deg_int, min_scaled, isneg;
+       unsigned absval;
+       
+       /* avoid division of negative integers,
+        * which has platform-dependent results */
+       absval = abs(val);
+       isneg = (val < 0);
+
+       deg_int = absval / 1000000;      /* extract ddd */
+       min_scaled = absval % 1000000;   /* extract mmffff (minutes * 10^4) */
+       deg = deg_int + (double) min_scaled / (10000 * 60);
+
+       /* restore the sign */
+       deg = isneg ? -deg : deg;
+       return(deg);
+}
+
+static void
+process_gpsfile(gbuint8 data[], route_head *track)
+{
+       const int recordsizes[3] = {8, 20, 32};
+       int i, style, recsize;
+       int lat, lon, bintime, bindate;
+       waypoint *wpt;
+
+       /* the first record of each file is always full-sized; its style field
+        * determines the format of all subsequent records in the file */
+       style = be_read32(data + 28);
+       if (style > 2) {
+               fprintf(stderr, "unknown GPS record style %d", style);
+               return;
+       }
+       recsize = recordsizes[style];
+
+       for (i = 0; i <= 2048 - recsize; i += (i == 0) ? 32 : recsize) {
+
+               lat = be_read32(data + i + 0);
+               lon = be_read32(data + i + 4);
+
+               /* skip invalid trackpoints (blank records) */
+               if (lat == -1 && lon == -1) {
+                       continue;
+               }
+
+               wpt = waypt_new();
+               wpt->latitude = bin2deg(lat);
+               wpt->longitude = bin2deg(lon);
+
+               if (style >= 1) {
+                       bintime = be_read32(data + i +  8);
+                       bindate = be_read32(data + i + 12);
+                       wpt->creation_time = bintime2utc(bindate, bintime);
+                       /* The device presents the speed as a fixed-point number
+                        * with a scaling factor of 100, in km/h.
+                        * The waypoint struct wants the speed as a
+                        * floating-point number, in m/s. */
+                       wpt->speed = KPH_TO_MPS(be_read32(data + i + 16) / 100.0);
+                       wpt->wpt_flags.speed = 1;
+               }
+
+               if (style >= 2) {
+                       wpt->altitude = be_read32(data + i + 20) / 10000.0;
+               }
+
+               track_add_wpt(track, wpt);
+       }
+}
+
+static gbuint16
+dg100_checksum(gbuint8 buf[], int count)
+{
+       gbuint16 sum = 0;
+       int i;
+
+       for (i = 0; i < count; i++) {
+               sum += buf[i];
+       }
+       sum &= (1<<15) - 1;
+
+       return(sum);
+}
+
+/* communication functions */
+static size_t
+dg100_send(gbuint8 cmd, const void *payload, size_t count)
+{
+       gbuint8 frame[FRAME_MAXLEN];
+       gbuint16 checksum, payload_len;
+       size_t framelen, param_len;
+       int n;
+       
+       param_len = count;
+       payload_len = 1 + count;
+       /* Frame length calculation:
+        * frame start sequence(2), payload length field(2), command id(1),
+        * param(variable length),
+        * checksum(2), frame end sequence(2) */
+       framelen = 2 + 2 + 1 + count + 2 + 2;
+       assert(framelen <= FRAME_MAXLEN);
+
+       /* create frame head + command */
+       be_write16(frame + 0, 0xA0A2);
+       be_write16(frame + 2, payload_len);
+       frame[4] = cmd;
+
+       /* copy payload */
+       memcpy(frame + 5, payload, count);
+
+       /* create frame tail */
+       checksum = dg100_checksum(frame + 4, framelen - 8);
+       be_write16(frame + framelen - 4, checksum);
+       be_write16(frame + framelen - 2, 0xB0B3);
+
+       n = gbser_write(serial_handle, frame, framelen);
+
+       if (global_opts.debug_level) {
+               struct dg100_command *cmdp = dg100_findcmd(cmd);
+
+               dg100_debug(n == 0 ? "Sent: " : "Error Sending:", 
+                       1, framelen, frame);
+               dg100_log("TX: Frame Start %02x %02x Payload_Len %04x Cmd: %s\n", 
+                       frame[0], frame[1], payload_len, cmdp->text);
+       }
+       
+       if (n == gbser_ERROR) {
+               fatal("dg_100_send: write failed\n");
+       }
+       return (n);
+}
+
+static int
+dg100_recv_byte()
+{
+       int result;
+
+       /* allow for a delay of 40s; 
+        *  erasing the whole DG-100 memory takes about 21s */
+       result = gbser_readc_wait(serial_handle, 40000);
+       switch(result){
+               case gbser_ERROR:
+                       fatal("dg100_recv_byte(): error reading one byte\n");
+               case gbser_NOTHING:
+                       fatal("dg100_recv_byte(): read timeout\n");
+       }
+       return result;
+}
+
+/* payload returns a pointer into a static buffer (which also contains the
+ * framing around the data), so the caller must copy the data before calling
+ * this function again */
+static int
+dg100_recv_frame(struct dg100_command **cmdinfo_result, gbuint8 **payload)
+{
+       static gbuint8 buf[FRAME_MAXLEN];
+       gbuint16 frame_start_seq, payload_len_field;
+       gbuint16 payload_end_seq, payload_checksum, frame_end_seq;
+       gbuint16 frame_head, numheaders, sum;
+       gbuint8 c, cmd;
+       int i, param_len, frame_len;
+       struct dg100_command *cmdinfo;
+
+       /* consume input until frame head sequence 0xA0A2 was received */
+       frame_head = 0;
+       dg100_debug("Receiving ", 0, 0, NULL);
+       do {
+               c = dg100_recv_byte();
+               dg100_debug("", 0, 1, &c);
+               frame_head <<= 8;
+               frame_head |= c;
+
+       } while (frame_head != 0xA0A2);
+
+       be_write16(buf + 0, frame_head);
+
+       /* To read the remaining data, we need to know how long the frame is.
+        *
+        * The obvious source of this information would be the payload length
+        * field, but the spec says that this field should be ignored in answers.
+        * Indeed, its value differs from the actual payload length.
+        *
+        * We could scan for the frame end sequences,
+        * but there is no guarantee that they do not appear within valid data.
+        *
+        * This means we can only calculate the length using information from
+        * the beginning of the frame, other than the payload length.
+        *
+        * The solution implemented here is to derive the frame length from the
+        * Command ID field, which is more of an answer ID. This is possible
+        * since for each answer ID, the frame length is either constant or it
+        * can be derived from the first two bytes of payload data.
+        */
+
+       /* read Payload Length, Command ID, and two further bytes */
+       for (i = 2; i < 7; i++) {
+               buf[i] = dg100_recv_byte();
+               dg100_debug("", 0, 1, &buf[i]);
+       }
+
+       payload_len_field = be_read16(buf + 2);
+       cmd = buf[4];
+
+       /*
+        * getconfig/setconfig have the same answer ID -
+        * this seems to be a firmware bug we must work around.
+        * Distinguish them by the (otherwise ignored) Payload Len field,
+        * which was observed as 53 for getconfig and 5 for setconfig.
+        */
+       if (cmd == dg100cmd_getconfig && payload_len_field <= 20) {
+               cmd = dg100cmd_setconfig;
+       }
+
+       cmdinfo = dg100_findcmd(cmd);
+       if (!cmdinfo) {
+               /* TODO: consume data until frame end signature,
+                * then report failure to the caller? */
+               fatal("unknown answer ID %02x\n", cmd);
+       }
+
+       param_len = cmdinfo->recvsize;
+
+       /*
+        * the getfileheader answer has a varying param_len,
+        * we need to calculate it
+        */
+       if (cmd == dg100cmd_getfileheader) {
+               numheaders = be_read16(buf + 5);
+               param_len = 2 + 2 + 12 * numheaders + 2;
+       }
+
+       /* Frame length calculation:
+        * frame start sequence(2), payload length field(2), command id(1),
+        * param(variable length),
+        * payload end seqence(2), checksum(2), frame end sequence(2) */
+       frame_len = 2 + 2 + 1 + param_len + 2 + 2 + 2;
+        
+       if (frame_len > FRAME_MAXLEN) {
+               fatal("frame too large (frame_len=%d, FRAME_MAXLEN=%d)\n",
+                               frame_len, FRAME_MAXLEN);
+       }
+
+       /* TODO: Since we know how long the frame should be, we could try to
+        * read the rest of the frame at once using gbser_read_wait(). */
+#if 0
+       for (i = 7; i < frame_len; i++) {
+               buf[i] = dg100_recv_byte();
+               dg100_debug("", 0, 1, &buf[i]);
+       }
+#else
+       i = gbser_read_wait(serial_handle, &buf[7], frame_len - 7, 1000);
+       dg100_debug("", 0, frame_len - 7, &buf[7]);
+       if (i < frame_len - 7) {
+               fatal("Expected to read %d bytes, but got %d\n", 
+                       frame_len - 7, i);
+       }
+#endif
+
+       frame_start_seq   = be_read16(buf + 0);
+       payload_len_field = be_read16(buf + 2);
+       payload_end_seq   = be_read16(buf + frame_len - 6);
+       payload_checksum  = be_read16(buf + frame_len - 4);
+       frame_end_seq     = be_read16(buf + frame_len - 2);
+
+       dg100_log("RX: Start %04x Len %04x Cmd: %s\n",
+               frame_start_seq, payload_len_field, cmdinfo->text);
+
+       /* calculate checksum */
+       sum = dg100_checksum(buf + 4, frame_len - 8);
+       if (sum != payload_checksum) {
+               fatal("checksum mismatch: data sum is 0x%04x, checksum received is 0x%04x\n",
+                               sum, payload_checksum);
+       }
+
+       /*
+        * TODO: check signatures;
+        * on failure, flush input or scan for end sequence
+        */
+
+       *cmdinfo_result = cmdinfo;
+       *payload = buf + 5;
+       dg100_debug("\n", 0, 0, &buf[i]);
+       return(param_len);
+}
+
+/* return value: number of bytes copied into buf, -1 on error */
+static int
+dg100_recv(gbuint8 expected_id, void *buf, unsigned int len)
+{
+       int n;
+       struct dg100_command *cmdinfo;
+       gbuint8 *data;
+       unsigned int copysize, trailing_bytes;
+
+       n = dg100_recv_frame(&cmdinfo, &data);
+
+       /* check whether the received frame matches the expected answer type */
+       if (cmdinfo->id != expected_id) {
+               fprintf(stderr, "ERROR: answer type %02x, expecting %02x", cmdinfo->id, expected_id);
+               return -1;
+       }
+
+       trailing_bytes = cmdinfo->trailing_bytes;
+       copysize = n - trailing_bytes;
+
+       /* check for buffer overflow */
+       if (len < copysize) {
+               fprintf(stderr, "ERROR: buffer too small, size=%d, need=%d", len, copysize);
+               return -1;
+       }
+
+       memcpy(buf, data, copysize);
+       return(copysize);
+}
+
+/* the number of bytes to be sent is determined by cmd,
+ * count is the size of recvbuf */
+static int
+dg100_request(gbuint8 cmd, const void *sendbuf, void *recvbuf, size_t count)
+{
+       struct dg100_command *cmdinfo;
+       int n, i, frames, fill;
+       gbuint8 *buf;
+
+       cmdinfo = dg100_findcmd(cmd);
+       assert (cmdinfo != NULL);
+       dg100_send(cmd, sendbuf, cmdinfo->sendsize);
+
+       /* the number of frames the answer will comprise */
+       frames = (cmd == dg100cmd_getfile) ? 2 : 1;
+       /* alias pointer for easy typecasting */
+       buf = recvbuf;
+       fill = 0;
+       for (i = 0; i < frames; i++) {
+               n = dg100_recv(cmd, buf + fill, count - fill);
+               if (n < 0)
+                       return(-1);
+               fill += n;
+       }
+       return(fill);
+}
+
+/* higher level communication functions */
+static void
+dg100_getfileheaders(struct dynarray16 *headers)
+{
+       gbuint8 request[2];
+       gbuint8 answer[FRAME_MAXLEN];
+       int seqnum;
+       gbint16 numheaders, nextheader, *h;
+       int i, offset;
+
+       nextheader = 0;
+       do {
+               /* request the next batch of headers */
+               be_write16(request, nextheader);
+               dg100_request(dg100cmd_getfileheader, request, answer, sizeof(answer));
+
+               /* process the answer */
+               numheaders = be_read16(answer);
+               nextheader = be_read16(answer + 2);
+               dg100_log("found %d headers, nextheader=%d\n",
+                       numheaders, nextheader);
+
+               h = dynarray16_alloc(headers, numheaders);
+               for (i = 0; i < numheaders; i++) {
+                       offset = 4 + i * 12;
+                       seqnum = be_read32(answer + offset + 8);
+                       h[i] = seqnum;
+                       if (global_opts.debug_level) {
+                               int time   = be_read32(answer + offset);
+                               int date   = be_read32(answer + offset + 4);
+                               time_t ti = bintime2utc(date, time);
+                               dg100_log("Header #%d: Seq: %d Time: %s", 
+                                       i, seqnum, ctime(&ti));
+                       }
+               }
+       } while (nextheader != 0);
+}
+
+static void
+dg100_getfile(gbint16 num, route_head *track)
+{
+       gbuint8 request[2];
+       gbuint8 answer[2048];
+
+       be_write16(request, num);
+       dg100_request(dg100cmd_getfile, request, answer, sizeof(answer));
+       process_gpsfile(answer, track);
+}
+
+static void
+dg100_getfiles()
+{
+       unsigned int i;
+       int filenum;
+       struct dynarray16 headers;
+       route_head *track;
+
+       track = route_head_alloc();
+       track->rte_name = xstrdup("DG-100 tracklog");
+       track->rte_desc = xstrdup("DG-100 GPS tracklog data");
+       track_add_head(track);      
+
+       /* maximum number of headers observed so far: 672
+        * if necessary, the dynarray will grow even further */
+       dynarray16_init(&headers, 1024);
+
+       dg100_getfileheaders(&headers);
+
+       for (i = 0; i < headers.count; i++) {
+               filenum = headers.data[i];
+               dg100_getfile(filenum, track);
+       }
+}
+
+static int
+dg100_erase()
+{
+       gbuint8 request[2] = { 0xFF, 0xFF };
+       gbuint8 answer[4];
+
+       dg100_request(dg100cmd_erase, request, answer, sizeof(answer));
+       if (be_read32(answer) != 1) {
+               fprintf(stderr, "dg100_erase() FAILED\n");
+               return(-1);
+       }
+       return(0);
+}
+
+/* GPSBabel integration */
+
+static char *erase;
+
+static
+arglist_t dg100_args[] = {
+       { "erase", &erase, "Erase device data after download", 
+               "0", ARGTYPE_BOOL, ARG_NOMINMAX }, 
+       ARG_TERMINATOR
+};
+
+/*******************************************************************************
+* %%%        global callbacks called by gpsbabel main process              %%% *
+*******************************************************************************/
+
+static void
+dg100_rd_init(const char *fname)
+{
+       if (serial_handle = gbser_init(fname), NULL == serial_handle) {
+               fatal(MYNAME ": Can't open port '%s'\n", fname);
+       }
+       if (gbser_set_speed(serial_handle, 115200) != gbser_OK) {
+               fatal(MYNAME ": Can't configure port '%s'\n", fname);
+       }
+}
+
+static void 
+dg100_rd_deinit(void)
+{
+       gbser_deinit(serial_handle);
+       serial_handle = NULL;
+}
+
+static void
+dg100_read(void)
+{
+       dg100_getfiles();
+       if (*erase == '1') {
+               dg100_erase();
+       }
+}
+
+/**************************************************************************/
+
+// capabilities below means: we can only read tracks
+
+ff_vecs_t dg100_vecs = {
+       ff_type_serial,
+       { 
+               ff_cap_none                     /* waypoints */, 
+               ff_cap_read                     /* tracks */, 
+               ff_cap_none                     /* routes */
+       },
+       dg100_rd_init,  
+       NULL,   
+       dg100_rd_deinit,        
+       NULL,   
+       dg100_read,
+       NULL,
+       NULL,
+       dg100_args,
+       CET_CHARSET_ASCII, 0                    /* ascii is the expected character set */
+                                               /* not fixed, can be changed through command line parameter */
+};
+/**************************************************************************/
index d8f1942c58d7c885c57c1970f6097ba7e7d83fd2..0a8d29e4d3fda902ea0d4411637ee89033e47e64 100644 (file)
--- a/discard.c
+++ b/discard.c
 static char *hdopopt = NULL;
 static char *vdopopt = NULL;
 static char *andopt = NULL;
+static char *satopt = NULL;
 static double hdopf;
 static double vdopf;
+static int satpf;
 static gpsdata_type what;
 static route_head *head;
 
@@ -39,6 +41,8 @@ arglist_t fix_args[] = {
                "-1.0", ARGTYPE_END_REQ | ARGTYPE_FLOAT, ARG_NOMINMAX},
        {"hdopandvdop", &andopt, "Link hdop and vdop supression with AND",
                NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       {"sat", &satopt, "Minimium sats to keep waypoints",
+               "-1.0", ARGTYPE_BEGIN_REQ | ARGTYPE_INT, ARG_NOMINMAX},
        ARG_TERMINATOR
 };
 
@@ -51,6 +55,7 @@ fix_process_wpt(const waypoint *wpt)
        int del = 0;
        int delh = 0;
        int delv = 0;
+       
        waypoint *waypointp = (waypoint *) wpt;
 
        if ((hdopf >= 0.0) && (waypointp->hdop > hdopf))
@@ -62,6 +67,9 @@ fix_process_wpt(const waypoint *wpt)
                del = delh && delv;
        else
                del = delh || delv;
+               
+        if ((satpf >= 0) && (waypointp->sat < satpf))
+               del = 1;
 
        if (del) {
                switch(what) {
@@ -116,6 +124,12 @@ fix_init(const char *args)
                vdopf = atof(vdopopt);
        else
                vdopf = -1.0;
+       
+       if (satopt)
+               satpf = atoi(satopt);
+       else
+               satpf = -1;
+               
 }
 
 filter_vecs_t discard_vecs = {
index 9a88c50aa08879f435d6ca15937e3f964aed3a6e..0d11cf2cab9b0832cbde3de4885976d63f13ac0e 100644 (file)
--- a/dmtlog.c
+++ b/dmtlog.c
@@ -2,7 +2,7 @@
 
     Support for TrackLogs digital mapping (.trl) files,
 
-    Copyright (C) 2006 Olaf Klein, o.b.klein@gpsbabel.org
+    Copyright (C) 2006,2007 Olaf Klein, o.b.klein@gpsbabel.org
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -308,14 +308,51 @@ tlog3b_xgcb_wpten(const char *args, const char **unused)
 }
 
 
+static char *
+read_str(gbfile *f)
+{
+       int i;
+       char *res;
+
+       i = gbfgetc(f);
+       if (i == 0xff) i = gbfgetint16(f);
+       
+       res = xmalloc(i + 1);
+       res[i] = '\0';
+       if (i) gbfread(res, 1, i, f);
+       
+       return res;
+}
+
+static void
+write_str(const char *str, gbfile *f)
+{
+       if (str && *str) {
+               int len = strlen(str);
+               if (len > 0xfe) {
+#if 0
+                       if (len > 0x7fff) len = 0x7fff;
+                       gbfputc((unsigned char) 0xff, f);
+                       gbfputint16(len, f);
+#else
+                       len = 0xfe;
+                       gbfputc(len, f);
+#endif
+               }
+               else gbfputc(len, f);
+               gbfwrite(str, len, 1, f);
+       }
+       else gbfputc(0, f);
+}
+
 static int
 read_datum(gbfile *f)
 {
        int res;
        char *d, *g;
        
-       d = gbfgetpstr(f);
-       g = gbfgetpstr(f);
+       d = read_str(f);
+       g = read_str(f);
        
        res = GPS_Lookup_Datum_Index(d);
        
@@ -348,10 +385,9 @@ read_CTrackFile(const int version)
        if ((u1 != 0x0a) || (strncmp("CTrackFile", buf, 10) != 0))
                fatal(MYNAME ": Unknown or invalid track file.\n");
 
-       if (version == 8) {
-               for (i = 1; i <= 9; i++)
-                       gbfread(buf, 1, 4, fin);
-       }
+       if (version == 8)
+               gbfseek(fin, 36, SEEK_CUR);     /* skip unknown 36 bytes */
+
        ver = gbfgetint32(fin);
        if (ver != version)
                fatal(MYNAME ": Unknown or invalid track file (%d).\n", ver);
@@ -365,8 +401,8 @@ read_CTrackFile(const int version)
        
        /* S1 .. S9: comments, hints, jokes, aso */
        for (i = 0; i < 9; i++) {
-               int c = gbfgetc(fin);
-               gbfseek(fin, c, SEEK_CUR);
+               char *s = read_str(fin);
+               xfree(s);
        }
        
        tcount = gbfgetint32(fin);
@@ -401,17 +437,55 @@ read_CTrackFile(const int version)
                track_add_wpt(track, wpt);
                
                if (version == 8)
-                       gbfseek(fin, 34, SEEK_CUR);
+                       gbfseek(fin, 34, SEEK_CUR);     /* skip unknown 34 bytes */
        }
 
-       wcount = gbfgetint32(fin);
-       
-       if (wcount == 0) return;
-
        if (version == 8) {
-               warning(MYNAME ": We don't yet support waypoints for this file version!\n");
+
+               i = gbfgetint16(fin);
+               i = gbfgetc(fin);
+               if (i == 0) return;
+               
+               gbfungetc(i, fin);
+               datum = read_datum(fin);
+
+               (void) gbfgetint16(fin);
+               (void) gbfgetint32(fin);
+               
+               gbfread(buf, 1, 9, fin);
+               if (strncmp(buf, "CWayPoint", 9) != 0) {
+                       warning(MYNAME ": Unsupported waypoint structure!\n");
+                       return;
+               }
+               
+               while (! gbfeof(fin)) {
+                       waypoint *wpt;
+
+                       i = gbfgetc(fin);
+                       if (i == 0) break;
+                       
+                       gbfungetc(i, fin);
+                       datum = read_datum(fin);
+
+                       wpt = waypt_new();
+               
+                       wpt->latitude = gbfgetdbl(fin);
+                       wpt->longitude = gbfgetdbl(fin);
+                       wpt->altitude = gbfgetdbl(fin);
+                       
+                       gbfseek(fin, 36, SEEK_CUR);     /* skip unknown 36 bytes */
+                       
+                       wpt->notes = read_str(fin);
+                       wpt->description = read_str(fin);
+                       (void) gbfgetint16(fin);
+                       
+                       waypt_add(wpt);
+               }
                return;
        }
+
+       wcount = gbfgetint32(fin);
+       if (wcount == 0) return;
                
        datum = read_datum(fin);
 
@@ -421,9 +495,6 @@ read_CTrackFile(const int version)
                
                wcount--;
 
-               if (version == 8)
-                       datum = read_datum(fin);
-               
                wpt = waypt_new();
                
                wpt->latitude = gbfgetdbl(fin);
@@ -437,7 +508,9 @@ read_CTrackFile(const int version)
                // variants of shortname
                
                for (i = 0; i < namect; i++) {
-                       char *name = gbfgetpstr(fin);
+                       char *name;
+                       
+                       name = read_str(fin);
                        if (name && *name) {
                                switch(i) {
                                        case 0: wpt->description = xstrdup(name); break;
@@ -446,9 +519,7 @@ read_CTrackFile(const int version)
                        }
                        xfree(name);
                }
-               if (version == 8)
-                       gbfseek(fin, 34, SEEK_CUR);
-               
+
                waypt_add(wpt);
        }
 }
@@ -619,18 +690,18 @@ write_header(const route_head *trk)
                queue *curr, *prev;
                QUEUE_FOR_EACH(&trk->waypoint_list, curr, prev) count++;
        }
-       gbfputpstr(trk && trk->rte_name && *trk->rte_name ? trk->rte_name : "Name", fout);
+       write_str(trk && trk->rte_name && *trk->rte_name ? trk->rte_name : "Name", fout);
        
        xasprintf(&cout, "%d trackpoints and %d waypoints", count, waypt_count());
-       gbfputpstr(cout, fout);
+       write_str(cout, fout);
        xfree(cout);
        
        for (i = 3; i <= 8; i++) gbfputc(ZERO, fout);
-       gbfputpstr("GPSBabel", fout);
+       write_str("GPSBabel", fout);
        gbfputint32(count, fout);
        if (count > 0) {
-               gbfputpstr("WGS84", fout);
-               gbfputpstr("WGS84", fout);
+               write_str("WGS84", fout);
+               write_str("WGS84", fout);
        }
 }
 
@@ -670,8 +741,8 @@ wpt_cb(const waypoint *wpt)
        names = 1;
        if (wpt->description && *wpt->description) names = 2;
        gbfputint32(names, fout);
-       if (names > 1) gbfputpstr(wpt->description, fout);
-       gbfputpstr(wpt->shortname && *wpt->shortname ? wpt->shortname : "Name", fout);
+       if (names > 1) write_str(wpt->description, fout);
+       write_str(wpt->shortname && *wpt->shortname ? wpt->shortname : "Name", fout);
 }
 
 static void
@@ -695,8 +766,8 @@ dmtlog_write(void)
                write_header(NULL);
        gbfputint32(waypt_count(), fout);
        if (waypt_count() > 0) {
-               gbfputpstr("WGS84", fout);
-               gbfputpstr("WGS84", fout);
+               write_str("WGS84", fout);
+               write_str("WGS84", fout);
                waypt_disp_all(wpt_cb);
        }
 }
diff --git a/exif.c b/exif.c
new file mode 100644 (file)
index 0000000..d81e210
--- /dev/null
+++ b/exif.c
@@ -0,0 +1,490 @@
+/*
+
+    Support for embedded Exif-GPS information.
+    
+    Copyright (C) 2008 Olaf Klein, o.b.klein@gpsbabel.org
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+ */
+
+#include "defs.h"
+#include "config.h"
+#include "garmin_tables.h"
+#include "jeeps/gpsmath.h"
+#include "strptime.h"
+#include <ctype.h>
+
+#define MYNAME "exif"
+
+#define UNKNOWN_TIMESTAMP 999999999
+
+typedef struct exif_tag_s {
+       gbuint16 tag;
+       gbuint16 type;
+       gbint32 count;
+       gbuint32 offs;
+} exif_tag_t;
+
+static gbfile *fin;
+static gbsize_t exif_ifd, gps_ifd;
+static char byte_order;
+static waypoint *wpt;
+static gbsize_t fileoffs;
+static char *opt_filename;
+static time_t timestamp;
+static
+arglist_t exif_args[] = {
+       {"filename", &opt_filename, "Set waypoint name to source filename.", "Y", ARGTYPE_BOOL, ARG_NOMINMAX}, 
+       ARG_TERMINATOR
+};
+
+#define EXIF_IFD       -1
+#define GPS_IFD                -2
+
+/*******************************************************************************
+* %%%        global callbacks called by gpsbabel main process              %%% *
+*******************************************************************************/
+
+static void
+exif_rd_init(const char *fname)
+{
+       fin = gbfopen_le(fname, "rb", MYNAME);
+}
+
+static void 
+exif_rd_deinit(void)
+{
+       gbfclose(fin);
+}
+
+#if 0
+static int
+exif_tag_size(const exif_tag_t *tag)
+{
+       int size;
+       
+       switch(tag->type) {
+               case 1:
+               case 2: 
+               case 7: size = 1; break;
+               case 3: size = 2; break;
+               case 4:
+               case 9: size = 4; break;
+               case 5:
+               case 10: size = 8; break;
+               default:
+                       return 0;
+       }
+       return size * tag->count;
+}
+#endif
+
+static double
+exif_read_double(const gbsize_t offs)
+{
+       unsigned int num, den;
+       
+       if (offs) gbfseek(fin, fileoffs + offs, SEEK_SET);
+       
+       num = gbfgetuint32(fin);
+       den = gbfgetuint32(fin);
+       if (den == 0) den = 1;
+       
+       return (double)num / den;
+}
+
+static double
+exif_read_coord(const exif_tag_t *tag)
+{
+               double deg, min, sec;
+               
+               deg = exif_read_double(tag->offs);
+               if (tag->count == 1) return deg;
+
+               min = exif_read_double(0);
+               deg += (min / 60);
+               if (tag->count == 2) return deg;
+
+               sec = exif_read_double(0);
+               deg += (sec / 3600);
+
+               return deg;
+}
+
+static char *
+exif_read_string(const exif_tag_t *tag)
+{
+       if (tag->count > 4) {
+               gbfseek(fin, fileoffs + tag->offs, SEEK_SET);
+               return gbfgetcstr(fin);
+       }
+       else {
+               char buff[5];
+               if (fin->big_endian) be_write32(buff, tag->offs);
+               else le_write32(buff, tag->offs);
+               if (tag->count < 5) buff[tag->count] = '\0';
+               else buff[4] = '\0';
+               return xstrdup(buff);
+       }
+}
+
+static time_t
+exif_read_timestamp(const exif_tag_t *tag)
+{
+       double hour, min, sec;
+       
+       hour = exif_read_double(tag->offs);
+       min = exif_read_double(0);
+       sec = exif_read_double(0);
+       
+       return ((int)hour * SECONDS_PER_HOUR) + ((int)min * 60) + (int)sec;
+}
+
+static int
+exif_sort_tags_cb(const void *a, const void *b)
+{
+       const exif_tag_t *ea = a;
+       const exif_tag_t *eb = b;
+       return (int)ea->offs - (int)eb->offs;
+}
+
+static gbsize_t
+exif_read_tags(const int ifd)
+{
+       int entries;
+       exif_tag_t *tags = NULL;
+       gbsize_t next_ifd = 0;
+       double gpsdop = unknown_alt;
+       char speed_ref = 'K';
+       char lat_ref = '*';
+       char lon_ref = '*';
+       char mode = 'N';
+       int datum = DATUM_WGS84;
+       
+       entries = gbfgetint16(fin);
+       if (entries > 0) {
+               int i;
+               tags = xmalloc(entries * sizeof(*tags));
+               for (i = 0; i < entries; i++) {
+                       tags[i].tag = gbfgetuint16(fin);
+                       tags[i].type = gbfgetuint16(fin);
+                       tags[i].count = gbfgetint32(fin);
+                       tags[i].offs = gbfgetuint32(fin);
+               }
+       }
+
+       next_ifd = gbfgetuint32(fin);
+
+       if (entries > 0) {
+               int i;
+               char *str, *c;
+               struct tm tm;
+
+               if (entries > 1) /* avoid backward seek */
+                       qsort(tags, entries, sizeof(*tags), exif_sort_tags_cb);
+
+               for (i = 0; i < entries; i++) {
+                       exif_tag_t *tag = &tags[i];
+                       
+                       switch(ifd) {
+                               case 0:
+                                       switch(tag->tag) {
+                                               case 0x8769: 
+                                                       exif_ifd = tag->offs;
+                                                       break;
+                                               case 0x8825: 
+                                                       gps_ifd = tag->offs;
+                                                       break;
+                                       }
+                                       break;
+                               case 1:         /* IFD1 */
+                                       break;
+                               case -1:        /* Exif */
+                                       switch(tag->tag) {
+
+                                               case 0x9003: /* DateTimeOriginal */
+                                                       str = exif_read_string(tag);
+                                                       c = strptime(str, "%Y:%m:%d %H:%M:%S", &tm);
+                                                       if (c && (*c == '\0'))
+                                                               wpt->creation_time = mklocaltime(&tm);
+                                                       xfree(str);
+                                                       break;
+                                       }
+                                       break;
+                               case -2:        /* GPS */
+                                       switch(tag->tag) {
+
+                                               case 0x0001: /* GPSLatitudeRef */
+                                                       str = exif_read_string(tag);
+                                                       lat_ref = *str & 127;
+                                                       xfree(str);
+                                                       break;
+
+                                               case 0x0002: /* GPSLatitude */ 
+                                                       wpt->latitude = exif_read_coord(tag);
+                                                       break;
+
+                                               case 0x0003: /* GPSLongitudeRef */
+                                                       str = exif_read_string(tag);
+                                                       lon_ref = *str & 127;
+                                                       xfree(str);
+                                                       break;
+
+                                               case 0x0004: /* GPSLongitude */ 
+                                                       wpt->longitude = exif_read_coord(tag);
+                                                       break;
+
+                                               case 0x0005: /* GPSAltitudeRef */ 
+                                                       break;
+
+                                               case 0x0006: /* GPSAltitude */
+                                                       wpt->altitude = exif_read_double(tag->offs);
+                                                       break;
+
+                                               case 0x0007: /* GPSTimeStamp */
+                                                       timestamp = exif_read_timestamp(tag);
+                                                       break;
+
+                                               case 0x0008: /* GPSSatellites */
+                                                       str = exif_read_string(tag);
+                                                       wpt->sat = atoi(str);
+                                                       xfree(str);
+                                                       break;
+                                                       
+                                               case 0x000a: /* GPSMeasureMode */
+                                                       str = exif_read_string(tag);
+                                                       mode = *str & 127;
+                                                       xfree(str);
+                                                       break;
+                                                       
+                                               case 0x000b: /* GPSDOP */
+                                                       gpsdop = exif_read_double(tag->offs);
+                                                       break;
+
+                                               case 0x000c: /* GPSSpeedRef */
+                                                       str = exif_read_string(tag);
+                                                       speed_ref = *str & 127;
+                                                       xfree(str);
+                                                       break;
+
+                                               case 0x000d: /* GPSSpeed */
+                                                       WAYPT_SET(wpt, speed, exif_read_double(tag->offs));
+                                                       break;
+
+                                               case 0x0012: /* GPSMapDatum */
+                                                       str = exif_read_string(tag);
+                                                       datum = gt_lookup_datum_index(str, MYNAME);
+                                                       if (datum < 0)
+                                                               fatal(MYNAME ": Unknown GPSMapDatum \"%s\"!\n", str);
+                                                       xfree(str);
+                                                       break;
+                                       }
+                                       break;
+                       }
+               }
+               xfree(tags);
+       }
+
+       if (ifd == GPS_IFD) {
+
+               /* Did we get our minimum data ? */
+               if ((wpt->latitude == unknown_alt) || (wpt->longitude == unknown_alt)) {
+                       warning(MYNAME ": GPSLatitude and/or GPSLongitude not set!\n");
+                       waypt_free(wpt);
+                       wpt = NULL;
+                       return 0;
+               }
+               
+               if WAYPT_HAS(wpt, speed) {
+                       switch(speed_ref) {
+                               case 'K':
+                                       wpt->speed = KPH_TO_MPS(wpt->speed);
+                                       break;
+                               case 'M':
+                                       wpt->speed = MPH_TO_MPS(wpt->speed);
+                                       break;
+                               case 'N':
+                                       wpt->speed = KNOTS_TO_MPS(wpt->speed);
+                                       break;
+                               default:
+                                       wpt->speed = 0;
+                                       WAYPT_UNSET(wpt, speed);
+                                       warning(MYNAME ": Unknown GPSSpeedRef unit %c (0x%02x)!\n", speed_ref, speed_ref);
+                       }
+               }
+               
+               if (lat_ref == 'S') wpt->latitude *= -1;
+               else if (lat_ref != 'N') warning(MYNAME ": GPSLatitudeRef not set! Using N(orth).\n");
+               if (lon_ref == 'W') wpt->longitude *= -1;
+               else if (lon_ref != 'E') warning(MYNAME ": GPSLongitudeRef not set! Using E(east).\n");
+               
+               if (datum != DATUM_WGS84) {
+                       double alt;
+                       GPS_Math_WGS84_To_Known_Datum_M(wpt->latitude, wpt->longitude, 0.0,
+                               &wpt->latitude, &wpt->longitude, &alt, datum);
+               }
+               
+               if (mode == '2') {
+                       wpt->fix = fix_2d;
+                       if (gpsdop != unknown_alt) wpt->hdop = gpsdop;
+               }
+               else if (mode == '3') {
+                       wpt->fix = fix_3d;
+                       if (gpsdop != unknown_alt) wpt->pdop = gpsdop;
+               }
+       }
+
+       return next_ifd;
+}
+
+static void
+exif_read(void)
+{
+       gbint32 code = 0;
+       
+       fileoffs = 0;
+       wpt = NULL;
+       
+       while (!gbfeof(fin)) {
+
+               unsigned char c = (unsigned)gbfgetc(fin);
+
+               code = (code << 8) | c;
+               if (code == 0x45786966) { /* Look for "Exif" */
+                       
+                       gbsize_t next_ifd;
+                       gbint32 ifd;
+                       
+                       int order = gbfgetint32(fin);
+                       switch(order) {
+                               case 0x49490000: /* "II" - Intel */
+                                       byte_order = 'I';
+                                       break;
+                               case 0x4D4D0000: /* "MM" - Motorola */
+                                       byte_order = 'M';
+                                       break;
+                               
+                               default:
+                                       continue;
+                       }
+                       fin->big_endian = (byte_order == 'M');
+                       if (gbfgetint16(fin) != 0x002a) continue;
+
+                       fileoffs = gbftell(fin) - 4;
+                       
+                       next_ifd = gbfgetuint32(fin);
+                       if (! next_ifd) continue;       /* No IFD0 ? */
+                       
+                       ifd = gps_ifd = exif_ifd = 0;
+                       timestamp = UNKNOWN_TIMESTAMP;
+
+                       /* we need the wpt not only during GPS IFD */
+                       wpt = waypt_new();
+                       wpt->latitude = unknown_alt;
+                       wpt->longitude = unknown_alt;
+
+                       while (next_ifd) {
+                               gbfseek(fin, fileoffs + next_ifd, SEEK_SET);
+                               next_ifd = exif_read_tags(ifd++);
+                       }
+                       if (exif_ifd) {
+                               gbfseek(fin, fileoffs + exif_ifd, SEEK_SET);
+                               (void) exif_read_tags(EXIF_IFD);
+                       }
+                       if (gps_ifd) {
+                               gbfseek(fin, fileoffs + gps_ifd, SEEK_SET);
+                               (void) exif_read_tags(GPS_IFD);
+                       }
+                       else {
+                               warning(MYNAME ": No Exif-GPS information in file \"%s\"!\n", fin->name);
+                               waypt_free(wpt);
+                               wpt = NULL;
+                       }
+                       
+                       if (! wpt) return;
+                       
+                       if (wpt->creation_time && (timestamp != UNKNOWN_TIMESTAMP)) {
+                               struct tm tm;
+                               tm = *gmtime(&wpt->creation_time);
+                               tm.tm_hour = 0;
+                               tm.tm_min = 0;
+                               tm.tm_sec = 0;
+                               wpt->creation_time = mkgmtime(&tm) + timestamp;
+                       }
+
+                       if (opt_filename) {
+                               char *c, *cx;
+                               char *str = xstrdup(fin->name);
+
+                               cx = str;
+                               if ((c = strrchr(cx, ':'))) cx = c + 1;
+                               if ((c = strrchr(cx, '\\'))) cx = c + 1;
+                               if ((c = strrchr(cx, '/'))) cx = c + 1;
+                               if (((c = strchr(cx, '.'))) && (c != cx)) *c = '\0';
+
+                               if (wpt->shortname) xfree(wpt->shortname);
+                               wpt->shortname = xstrdup(cx);
+                               xfree(str);
+                       }
+                       waypt_add(wpt);
+                       
+                       return;
+               }
+       }
+       warning(MYNAME ": No Exif header in file \"%s\"!\n", fin->name);
+}
+
+#if 0
+static void
+exif_wr_init(const char *fname)
+{
+       fout = gbfopen(fname, "w", MYNAME);
+}
+
+static void
+exif_wr_deinit(void)
+{
+       gbfclose(fout);
+}
+
+static void
+exif_write(void)
+{
+}
+#endif
+
+/**************************************************************************/
+
+ff_vecs_t exif_vecs = {
+       ff_type_file,
+       { 
+               ff_cap_read     /* waypoints */, 
+               ff_cap_none     /* tracks */, 
+               ff_cap_none     /* routes */
+       },
+       exif_rd_init,
+       NULL,                   /* exif_wr_init, */
+       exif_rd_deinit, 
+       NULL,                   /* exif_wr_deinit, */
+       exif_read,
+       NULL,                   /* exif_write */
+       NULL,
+       exif_args,
+       CET_CHARSET_ASCII, 0
+};
+
+/**************************************************************************/
index 75e4a5e1c36cfe89e033a5ad13e4a2a7a901a7ff..10d4670d985dbec086fc42ffc5e4a069711e320e 100644 (file)
@@ -1,7 +1,7 @@
 /*
     Describe vectors containing filter operations.
  
-    Copyright (C) 2002,2004,2005,2006 Robert Lipe, robertlipe@usa.net
+    Copyright (C) 2002,2004,2005,2006,2007 Robert Lipe, robertlipe@usa.net
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@
 #include "defs.h"
 #include "filterdefs.h"
 #include "inifile.h"
+#include "gbversion.h"
 
 typedef struct {
        filter_vecs_t *vec;
@@ -267,14 +268,25 @@ alpha (const void *a, const void *b)
         return case_ignore_strcmp(ap->desc , bp->desc);
 }
 
+static 
+void disp_help_url(const fl_vecs_t *vec, arglist_t *arg)
+{
+       printf("\t" WEB_DOC_DIR "/fmt_%s.html", vec->name);
+       if (arg) {
+               printf("#fmt_%s_o_%s",vec->name, arg->argstring);
+       }
+}
+
 static void
 disp_v1(const fl_vecs_t *vec)
 {
        arglist_t *ap;
        
+       disp_help_url(vec, NULL);
+       printf("\n");
        for (ap = vec->vec->args; ap && ap->argstring; ap++) {
-               if ( !(ap->argtype & ARGTYPE_HIDDEN))
-                       printf("option\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",
+               if ( !(ap->argtype & ARGTYPE_HIDDEN)) {
+                       printf("option\t%s\t%s\t%s\t%s\t%s\t%s\t%s",
                                vec->name, 
                                ap->argstring, 
                                ap->helpstring, 
@@ -282,6 +294,9 @@ disp_v1(const fl_vecs_t *vec)
                                ap->defaultvalue? ap->defaultvalue : "",
                                ap->minvalue? ap->minvalue : "",
                                ap->maxvalue? ap->maxvalue : "");
+                       disp_help_url(vec, ap);
+                       printf("\n");
+               }
        }
 }
 
@@ -305,9 +320,12 @@ disp_filters(int version)
        case 0:
        case 1:
                for (vec = filter_vec_list; vec->vec; vec++) {
-                       printf("%s\t%s\n", vec->name, vec->desc);
-                       if (version > 0)
+                       if (version == 0) {
+                               printf("%s\t%s\n", vec->name, vec->desc);
+                       } else {
+                               printf("%s\t%s", vec->name, vec->desc);
                                disp_v1(vec);
+                       }
                }
                break;
        default:
index c06f995dd472e7fcdfb3afbd701ca58eddeb1c2a..7ee0126cf96c278f4b2a67a931c9bc00910fb440 100644 (file)
--- a/garmin.c
+++ b/garmin.c
@@ -35,12 +35,16 @@ static GPS_PWay *tx_routelist;
 static GPS_PWay *cur_tx_routelist_entry;
 static GPS_PTrack *tx_tracklist;
 static GPS_PTrack *cur_tx_tracklist_entry;
+static int my_track_count = 0;
 static char *getposn = NULL;
 static char *poweroff = NULL;
+static char *resettime = NULL;
 static char *snlen = NULL;
 static char *snwhiteopt = NULL;
 static char *deficon = NULL;
 static char *category = NULL;
+static char *categorybitsopt = NULL;
+static int categorybits;
 
 #define MILITANT_VALID_WAYPT_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
 
@@ -58,8 +62,12 @@ arglist_t garmin_args[] = {
                NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        { "power_off", &poweroff, "Command unit to power itself down", 
                NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       { "resettime", &resettime, "Sync GPS time to computer time", 
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        { "category", &category, "Category number to use for written waypoints", 
                NULL, ARGTYPE_INT, "1", "16"},
+       { "bitscategory", &categorybitsopt, "Bitmap of categories", 
+               NULL, ARGTYPE_INT, "1", "65535"},
        ARG_TERMINATOR
 };
 
@@ -90,6 +98,20 @@ rw_init(const char *fname)
                return;
        }
 
+       /*
+        * THis is Gross. The B&W Vista sometimes sets its time decades into
+        * the future with no way to reset it.  This apparently can "cure"
+        * an affected unit.
+        */
+       if (resettime) {
+               GPS_Command_Send_Time(fname, current_time());
+               return;
+       }
+
+       if (categorybitsopt) {
+               categorybits = strtol(categorybitsopt, NULL, 0);
+       }
+
         if (GPS_Init(fname) < 0) {
                fatal(MYNAME ":Can't init %s\n", fname);
        }
@@ -135,8 +157,8 @@ rw_init(const char *fname)
                                case 130:       /* Garmin Etrex (yellow) */
                                        receiver_short_length = 6;
                                        break;
-                               case 295:
-                                       /* eTrex (yellow, firmware v. 3.30) */
+                               case 295:       /* eTrex (yellow, fw v. 3.30) */
+                               case 696:       /* eTrex HC */
                                        receiver_short_length = 6;
                                        valid_waypt_chars =
                                          MILITANT_VALID_WAYPT_CHARS " +-";
@@ -152,14 +174,22 @@ rw_init(const char *fname)
                                        receiver_short_length = 30;
                                        receiver_must_upper = 0;
                                        break;
-                               case 292: /* (60|76)C[s]X series */
-                               case 421: /* Vista|Legend CX */
+                               case 292: /* (60|76)C[S]x series */
+                               case 421: /* Vista|Legend Cx */
+                               case 694: /* Legend HCx */
+                               case 695: /* Vista HCx */
+                               case 786: /* HC model */
                                        receiver_short_length = 14;
                                        snwhiteopt = xstrdup("1");
                                        receiver_must_upper = 0;
                                        /* This might be 8859-1 */
                                        receiver_charset = CET_CHARSET_MS_ANSI;
                                        break;
+                               case 291: /* GPSMAP 60CS, probably others */
+                                       receiver_short_length = 10;
+                                       valid_waypt_chars = MILITANT_VALID_WAYPT_CHARS " +-";
+                                       setshort_badchars(mkshort_handle, "\"$.,'!");
+                                       break;
                                case 231: /* Quest */
                                case 463: /* Quest 2 */
                                        receiver_must_upper = 0;
@@ -210,6 +240,8 @@ rw_init(const char *fname)
 
        if (receiver_charset)
                cet_convert_init(receiver_charset, 1);
+
+
 }
 
 static void
@@ -236,13 +268,15 @@ static void
 waypt_read(void)
 {
        int i,n;
-       GPS_PWay *way;
+       GPS_PWay *way = NULL;
 
        if (getposn) {
                waypoint *wpt = waypt_new();
                wpt->latitude = gps_save_lat;
                wpt->longitude = gps_save_lon;
                wpt->shortname = xstrdup("Position");
+               if (gps_save_time)
+                       wpt->creation_time = gps_save_time;
                waypt_add(wpt);
                return;
        }
@@ -295,7 +329,9 @@ waypt_read(void)
                waypt_add(wpt_tmp);
                GPS_Way_Del(&way[i]);
        }
-       xfree(way);
+       if (way) {
+               xfree(way);
+       }
 }
 
 static
@@ -729,16 +765,27 @@ waypoint_write(void)
                }
                way[i]->ident[sizeof(way[i]->ident)-1] = 0;
 
-               if (global_opts.smart_names && 
-                    wpt->gc_data.diff && wpt->gc_data.terr) {
-                       snprintf(obuf, sizeof(obuf), "%s%d/%d %s", 
-                                       get_gc_info(wpt),
-                                       wpt->gc_data.diff, wpt->gc_data.terr, 
-                                       src);
-                       memcpy(way[i]->cmnt, obuf, strlen(obuf));
-               } else  {
-                       memcpy(way[i]->cmnt, src, strlen(src));
+               // If we were explictly given a comment from GPX, use that. 
+               if (wpt->description) {
+                       memcpy(way[i]->cmnt, wpt->description, strlen(wpt->description));
+               } else {
+                       if (global_opts.smart_names && 
+                            wpt->gc_data.diff && wpt->gc_data.terr) {
+#if 0
+xasprintf(&src, "%s %s", &wpt->shortname[2], src);
+#endif
+                               snprintf(obuf, sizeof(obuf), "%s%d/%d %s", 
+                                               get_gc_info(wpt),
+                                               wpt->gc_data.diff, wpt->gc_data.terr, 
+                                               src);
+                               memcpy(way[i]->cmnt, obuf, strlen(obuf));
+                       } else  {
+                               memcpy(way[i]->cmnt, src, strlen(src));
+                       }
                }
+
+               
+
                way[i]->lon = wpt->longitude;
                way[i]->lat = wpt->latitude;
 
@@ -772,6 +819,9 @@ waypoint_write(void)
                if (category) {
                        way[i]->category = 1 << (atoi(category) - 1);
                }
+               if (categorybits) {
+                       way[i]->category = categorybits;
+               }
 #if SOON
                garmin_fs_garmin_before_write(wpt, way[i], gps_waypt_type);
 #endif
@@ -807,6 +857,7 @@ static void
 route_waypt_pr(const waypoint *wpt)
 {
        GPS_PWay rte = *cur_tx_routelist_entry;
+       char *s, *d;
 
        /*
         * As stupid as this is, libjeeps seems to want an empty 
@@ -830,7 +881,20 @@ route_waypt_pr(const waypoint *wpt)
                rte->alt_is_unknown = 1;
                rte->alt = 0;
        }
-       strncpy(rte->ident, wpt->shortname, sizeof(rte->ident));
+
+       // Garmin protocol spec says no spaces, no lowercase, etc. in a route.
+       // enforce that here, since jeeps doesn't.
+       // 
+       // This was strncpy(rte->ident, wpt->shortname, sizeof(rte->ident));
+       d = rte->ident;
+       for (s = wpt->shortname; *s; s++) {
+               int c = *s;
+               if (isalpha(c)) c = toupper(c);
+               if (strchr(MILITANT_VALID_WAYPT_CHARS, c)) {
+                       *d++ = c;
+               }
+       }
+       
        rte->ident[sizeof(rte->ident)-1] = 0;
 
        if (wpt->description) {
@@ -872,8 +936,11 @@ track_hdr_pr(const route_head *trk_head)
        if ( trk_head->rte_name ) {
                strncpy((*cur_tx_tracklist_entry)->trk_ident, trk_head->rte_name, sizeof((*cur_tx_tracklist_entry)->trk_ident));
                (*cur_tx_tracklist_entry)->trk_ident[sizeof((*cur_tx_tracklist_entry)->trk_ident)-1] = 0;
-       }
+       } else {
+               sprintf((*cur_tx_tracklist_entry)->trk_ident, "TRACK%02d", my_track_count);
+        }
        cur_tx_tracklist_entry++;
+       my_track_count++;
 }
 
 static void
@@ -901,7 +968,7 @@ track_write(void)
        for (i = 0; i < n; i++) {
                tx_tracklist[i] = GPS_Track_New();
        }
-
+       my_track_count = 0;
        track_disp_all(track_hdr_pr, route_noop, track_waypt_pr);
 
        GPS_Command_Send_Track(portname, tx_tracklist, n);
index 3fa634eb419871db97fce6a8282b632fa6b719ab..76a65aa8d31ca7d8156413489443b3550c41c8e6 100644 (file)
@@ -2,7 +2,7 @@
   
     Implementation of special data used by Garmin products.
     
-    Copyright (C) 2006 Olaf Klein, o.b.klein@gpsbabel.org
+    Copyright (C) 2006, 2007, 2008 Olaf Klein, o.b.klein@gpsbabel.org
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -133,6 +133,7 @@ garmin_fs_xml_fprint(gbfile *ofd, const waypoint *waypt)
        
        if (gmsd == NULL) return;
        
+       /* Find out if there is at least one field set */
        addr = GMSD_GET(addr, "");
        if (! *addr) addr = GMSD_GET(city, "");
        if (! *addr) addr = GMSD_GET(country, "");
@@ -189,24 +190,42 @@ garmin_fs_xml_fprint(gbfile *ofd, const waypoint *waypt)
                        gbfprintf(ofd, "%*s</gpxx:Categories>\n", --space * 2, "");
                }
                if (*addr) {
-                       char *str;
+                       char *str, *tmp;
                        gbfprintf(ofd, "%*s<gpxx:Address>\n", space++ * 2, "");
 
-                       if ((str = GMSD_GET(addr, NULL)))
-                               gbfprintf(ofd, "%*s<gpxx:StreetAddress>%s</gpxx:StreetAddress>\n", space * 2, "", str);
-                       if ((str = GMSD_GET(city, NULL)))
-                               gbfprintf(ofd, "%*s<gpxx:City>%s</gpxx:City>\n", space * 2, "", str);
-                       if ((str = GMSD_GET(state, NULL)))
-                               gbfprintf(ofd, "%*s<gpxx:State>%s</gpxx:State>\n", space * 2, "", str);
-                       if ((str = GMSD_GET(country, NULL)))
-                               gbfprintf(ofd, "%*s<gpxx:Country>%s</gpxx:Country>\n", space * 2, "", str);
-                       if ((str = GMSD_GET(postal_code, NULL)))
-                               gbfprintf(ofd, "%*s<gpxx:PostalCode>%s</gpxx:PostalCode>\n", space * 2, "", str);
+                       if ((str = GMSD_GET(addr, NULL))) {
+                               tmp = xml_entitize(str);
+                               gbfprintf(ofd, "%*s<gpxx:StreetAddress>%s</gpxx:StreetAddress>\n", space * 2, "", tmp);
+                               xfree(tmp);
+                       }
+                       if ((str = GMSD_GET(city, NULL))) {
+                               tmp = xml_entitize(str);
+                               gbfprintf(ofd, "%*s<gpxx:City>%s</gpxx:City>\n", space * 2, "", tmp);
+                               xfree(tmp);
+                       }
+                       if ((str = GMSD_GET(state, NULL))) {
+                               tmp = xml_entitize(str);
+                               gbfprintf(ofd, "%*s<gpxx:State>%s</gpxx:State>\n", space * 2, "", tmp);
+                               xfree(tmp);
+                       }
+                       if ((str = GMSD_GET(country, NULL))) {
+                               tmp = xml_entitize(str);
+                               gbfprintf(ofd, "%*s<gpxx:Country>%s</gpxx:Country>\n", space * 2, "", tmp);
+                               xfree(tmp);
+                       }
+                       if ((str = GMSD_GET(postal_code, NULL))) {
+                               tmp = xml_entitize(str);
+                               gbfprintf(ofd, "%*s<gpxx:PostalCode>%s</gpxx:PostalCode>\n", space * 2, "", tmp);
+                               xfree(tmp);
+                       }
 
                        gbfprintf(ofd, "%*s</gpxx:Address>\n", --space * 2, "");
                }
+
                if (*phone) {
-                       gbfprintf(ofd, "%*s<gpxx:PhoneNumber>%s</gpxx:PhoneNumber>\n", space * 2, "", phone);
+                       char *tmp = xml_entitize(phone);
+                       gbfprintf(ofd, "%*s<gpxx:PhoneNumber>%s</gpxx:PhoneNumber>\n", space * 2, "", tmp);
+                       xfree(tmp);
                }
 
                gbfprintf(ofd, "%*s</gpxx:WaypointExtension>\n", --space * 2, "");
index 26536684ee620eda48c4af818d24710d4d2d678e..e2b9ec07ff8efcacb590047db8a8158f037c6c3a 100644 (file)
                      avoid endless loop in group splitting
        * 2007/07/10: put address fields (i.e. city) into GMSD
        * 2007/07/12: add write support for new address fields
+       * 2007/10/20: add option unique
+       * 2007/12/02: support speed and proximity distance (+ alerts)
+       * 2008/01/14: fix structure error after adding speed/proximity
+       * 2008/03/22: add options "speed" and "proximity" (default values) and "sleep"
 
        ToDo:
        
        * Display mode ("Symbol & Name") ??? not in gpi ???
-       * decode speed/proximity
        * support category from GMSD "Garmin Special Data"
 */
 
 #define GPI_ADDR_ADDR          16
 
 static char *opt_cat, *opt_pos, *opt_notes, *opt_hide_bitmap, *opt_descr, *opt_bitmap;
+static char *opt_unique, *opt_alerts, *opt_units, *opt_speed, *opt_proximity, *opt_sleep;
+static double defspeed, defproximity;
+static int alerts;
 
 static arglist_t garmin_gpi_args[] = {
+       {"alerts", &opt_alerts, "Enable alerts on speed or proximity distance", 
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"bitmap", &opt_bitmap, "Use specified bitmap on output", 
                NULL, ARGTYPE_FILE, ARG_NOMINMAX},
        {"category", &opt_cat, "Default category on output", 
@@ -80,6 +88,16 @@ static arglist_t garmin_gpi_args[] = {
                NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
        {"position", &opt_pos, "Write position to address field", 
                NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+       {"proximity", &opt_proximity, "Default proximity", 
+               NULL, ARGTYPE_FLOAT, ARG_NOMINMAX},
+       {"sleep", &opt_sleep, "After output job done sleep n second(s)", 
+               NULL, ARGTYPE_INT, "1", NULL},
+       {"speed", &opt_speed, "Default speed", 
+               NULL, ARGTYPE_FLOAT, ARG_NOMINMAX},
+       {"unique", &opt_unique, "Create unique waypoint names (default = yes)", 
+               "Y", ARGTYPE_BOOL, ARG_NOMINMAX},
+       {"units", &opt_units, "Units used for names with @speed ('s'tatute or 'm'etric)", 
+               "m", ARGTYPE_STRING, ARG_NOMINMAX},
        ARG_TERMINATOR
 };
 
@@ -97,6 +115,7 @@ typedef struct writer_data_s {
        queue Q;
        int ct;
        int sz;
+       int alert;
        bounds bds;
        struct writer_data_s *top_left;
        struct writer_data_s *top_right;
@@ -145,6 +164,7 @@ typedef struct {
 
 typedef struct {
        int sz;
+       int alerts;
        short mask;
        char addr_is_dynamic;
        char *addr;
@@ -160,6 +180,8 @@ static gbint32 codepage;    /* code-page, i.e. 1252 */
 static reader_data_t *rdata;
 static writer_data_t *wdata;
 static short_handle short_h;
+static char units;
+static time_t gpi_timestamp = 0;
 
 #ifdef GPI_DBG
 # define PP warning("@%1$6x (%1$8d): ", gbftell(fin))
@@ -411,7 +433,8 @@ read_poi_group(const int sz, const int tag)
 static int
 read_tag(const char *caller, const int tag, waypoint *wpt)
 {
-       int pos, sz;
+       int pos, sz, dist;
+       double speed;
        short mask;
        char *str;
        garmin_fs_t *gmsd;
@@ -426,7 +449,29 @@ read_tag(const char *caller, const int tag, waypoint *wpt)
        if ((tag >= 0x80000) && (tag <= 0x800ff)) sz += 4;
        
        switch(tag) {
-               case 0x3:       /* size = 12 ? sound */
+               case 0x3:       /* size = 12 */
+                       
+                       dist = gbfgetint16(fin);                /* proximity distance in meters */
+                       speed = (double)gbfgetint16(fin) / 100; /* speed in meters per second */
+                       
+                       if (dist > 0) WAYPT_SET(wpt, proximity, dist);
+                       if (speed > 0) {
+                               /* speed isn't part of a normal waypoint
+                               WAYPT_SET(wpt, speed, speed);
+                               */
+                               if ((wpt->shortname == NULL) || (! strchr(wpt->shortname, '@'))) {
+                                       if (units == 's') speed = MPS_TO_MPH(speed);
+                                       else speed = MPS_TO_KPH(speed);
+                                       xasprintf(&str, "%s@%.f", wpt->shortname ? wpt->shortname : "WPT", speed);
+                                       if (wpt->shortname) xfree(wpt->shortname);
+                                       wpt->shortname = str;
+                               }
+                       }
+
+                       (void) gbfgetint32(fin);
+                       (void) gbfgetint32(fin);
+                       break;
+
                case 0x4:       /* size = 2  ? */
                case 0x6:       /* size = 2  ? */
                        break;
@@ -687,8 +732,38 @@ wdata_compute_size(writer_data_t *data)
                res += 12;              /* tag/sz/sub-sz */
                res += 19;              /* poi fixed size */
                res += strlen(wpt->shortname);
-               res += 10;              /* tag(4) */
+               if (! opt_hide_bitmap) res += 10;               /* tag(4) */
+
+               dt = xcalloc(1, sizeof(*dt));
+               wpt->extra_data = dt;
                
+               if (alerts) {
+                       char *pos;
+                       
+                       if ((pos = strchr(wpt->shortname, '@'))) {
+                               double speed, scale;
+                               if (units == 's') scale = MPH_TO_MPS(1);
+                               else scale = KPH_TO_MPS(1);
+                               parse_speed(pos + 1, &speed, scale, MYNAME);
+                               if (speed > 0) WAYPT_SET(wpt, speed, speed);
+#if 0                          
+                               if (pos > wpt->shortname) wpt->shortname[pos - wpt->shortname] = '\0';
+#endif
+                       }
+                       else if ((opt_speed) && (! WAYPT_HAS(wpt, speed)))
+                               WAYPT_SET(wpt, speed, defspeed);
+                       
+                       if ((opt_proximity) && (! WAYPT_HAS(wpt, proximity)))
+                               WAYPT_SET(wpt, proximity, defproximity);
+
+                       if ((WAYPT_HAS(wpt, speed) && (wpt->speed > 0)) || 
+                           (WAYPT_HAS(wpt, proximity) && (wpt->proximity > 0))) {
+                               data->alert = 1;
+                               dt->alerts++;
+                               res += 20;              /* tag(3) */
+                       }
+               }
+
                str = NULL;
                if (opt_descr) {
                        if (wpt->description && *wpt->description)
@@ -701,8 +776,6 @@ wdata_compute_size(writer_data_t *data)
                else if (opt_pos)
                        str = pretty_deg_format(wpt->latitude, wpt->longitude, 's', " ", 0);
                        
-               dt = xcalloc(1, sizeof(*dt));
-               wpt->extra_data = dt;
                
                if (str) {
                        dt->addr_is_dynamic = 1;
@@ -741,6 +814,7 @@ wdata_compute_size(writer_data_t *data)
                
                str = wpt->description;
                if (! str) str = wpt->notes;
+//             if (str && (strcmp(str, wpt->shortname) == 0)) str = NULL;
                if (str) res += (12 + 4 + strlen(str));
        }
 
@@ -769,11 +843,9 @@ wdata_write(const writer_data_t *data)
        gbfputint32(GPS_Math_Deg_To_Semi(data->bds.min_lat), fout);
        gbfputint32(GPS_Math_Deg_To_Semi(data->bds.min_lon), fout);
        
-       gbfputc(0, fout);               /* three unknown bytes */
-       gbfputc(0, fout);               /* ? should be zero ? */
-       gbfputc(0, fout);
-       
-       gbfputint32(0x1000100, fout);   /* ? const 0x1000100 ? */
+       gbfputint32(0, fout);
+       gbfputint16(1, fout);
+       gbfputc(data->alert, fout);
        
        QUEUE_FOR_EACH(&data->Q, elem, tmp) {
                char *str;
@@ -783,14 +855,16 @@ wdata_write(const writer_data_t *data)
                
                str = wpt->description;
                if (! str) str = wpt->notes;
+//             if (str && (strcmp(str, wpt->shortname) == 0)) str = NULL;
 
                gbfputint32(0x80002, fout);             
                
                s0 = s1 = 19 + strlen(wpt->shortname);
-               s0 += 10;                               /* tag(4) */
+               if (! opt_hide_bitmap) s0 += 10;        /* tag(4) */
                if (str) s0 += (12 + 4 + strlen(str));  /* descr */
                if (dt->sz) s0 += (12 + dt->sz);        /* address part */
                if (dt->phone_nr) s0 += (12 + 4 + strlen(dt->phone_nr));
+               if (dt->alerts) s0 += 20;               /* tag(3) */
 
                gbfputint32(s0, fout);  /* size of following data (tag) */
                gbfputint32(s1, fout);  /* basic size (without options) */
@@ -802,11 +876,38 @@ wdata_write(const writer_data_t *data)
                gbfputc(0, fout);       /* seems to be 1 when extra options present */
                
                write_string(wpt->shortname, 1);
-               
-               gbfputint32(4, fout);   /* tag(4) */
-               gbfputint32(2, fout);   /* ? always 2 == version ??? */
-               if (opt_hide_bitmap) gbfputint16(0x3ff, fout);  /* values != 0 hides the bitmap */
-               else gbfputint16(0, fout);
+
+               if (dt->alerts) {
+                       char flag = 0;
+                       
+                       gbfputint32(3, fout);   /* tag(3) */
+                       gbfputint32(12, fout);  /* always 12 */
+                       
+                       if (WAYPT_HAS(wpt, proximity) && (wpt->proximity > 0)) {
+                               gbfputint16((int) wpt->proximity, fout);
+                               flag = 4;
+                       }
+                       else
+                               gbfputint16(0, fout);
+                       if (WAYPT_HAS(wpt, speed) && (wpt->speed > 0)) {
+                               gbfputint16((int) (wpt->speed * 100), fout);
+                               flag = 5;
+                       }
+                       else
+                               gbfputint16(0, fout);
+
+                       gbfputint32(0x100100, fout);    /* ??? */
+                       gbfputc(1, fout);               /* ??? */
+                       gbfputc(1, fout);               /* ??? */
+                       gbfputc(flag, fout);
+                       gbfputc(0x10, fout);            /* ??? */
+               }
+
+               if (! opt_hide_bitmap) {
+                       gbfputint32(4, fout);   /* tag(4) */
+                       gbfputint32(2, fout);   /* ? always 2 == version ??? */
+                       gbfputint16(0, fout);
+               }
                
                if (str) {
                        gbfputint32(0xa, fout);
@@ -872,10 +973,11 @@ write_category(const char *category, const char *image, const int image_sz)
 static void
 write_header(void)
 {
-       time_t time = gpsbabel_time;    /* !!! ZERO during leaktest !!! */
+       time_t time = gpi_timestamp;
 
        if (time != 0) {
-               struct tm tm = *gmtime(&time);
+               struct tm tm;
+               tm = *gmtime(&time);
                tm.tm_year -= 20;
                time = mkgmtime(&tm);
                time += SECONDS_PER_DAY;
@@ -919,9 +1021,11 @@ enum_waypt_cb(const waypoint *ref)
        
        wpt = waypt_dupe(ref);
 
-       str = mkshort(short_h, wpt->shortname);
-       xfree(wpt->shortname);
-       wpt->shortname = str;
+       if (*opt_unique == '1') {
+               str = mkshort(short_h, wpt->shortname);
+               xfree(wpt->shortname);
+               wpt->shortname = str;
+       }
 
        wdata_add_wpt(wdata, wpt);
 }
@@ -959,6 +1063,10 @@ load_bitmap_from_file(const char *fname, char **data, int *data_sz)
        src_h.used_colors = gbfgetint32(f);
        src_h.important_colors = gbfgetint32(f);
 
+       /* Workaround for indexed BMP's with used_colors = 0 */
+       if ((src_h.bpp == 8) && (src_h.used_colors == 0))
+               src_h.used_colors = (src_h.image_offset - gbftell(f)) / 4;
+
 #ifdef GPI_DBG
        printf("data size:             0x%1$x (%1$d)\n", src_h.size);
        printf("image data offset:     0x%1$x (%1$d)\n", src_h.image_offset);
@@ -974,6 +1082,7 @@ load_bitmap_from_file(const char *fname, char **data, int *data_sz)
        printf("number of colors:      0x%1$x (%1$d)\n", src_h.used_colors);
        printf("important colors:      0x%1$x (%1$d)\n", src_h.important_colors);
 #endif
+               
        /* sort out unsupported files */
        if (! ((src_h.width <= 24) && (src_h.height <= 24) &&
               (src_h.width > 0) && (src_h.height > 0)))
@@ -1082,6 +1191,10 @@ garmin_gpi_rd_init(const char *fname)
                cet_convert_init(cp, 1);
        }
        else warning(MYNAME ": Unsupported code page (%d).\n", codepage);
+
+       units = tolower(opt_units[0]);
+       if ((units != 'm') && (units != 's'))
+               fatal(MYNAME ": Unknown units parameter (%c).\n", opt_units[0]);
 }
 
 
@@ -1092,6 +1205,16 @@ garmin_gpi_wr_init(const char *fname)
        cet_cs_vec_t *vec;
        int i;
        
+       if (gpi_timestamp != 0) {                       /* not the first gpi output session */ 
+               time_t t = time(NULL);
+               if (t <= gpi_timestamp)
+                       gpi_timestamp++;                /* don't create files with same timestamp */
+               else
+                       gpi_timestamp = t;
+       }
+       else
+               gpi_timestamp = gpsbabel_time;          /* always ZERO during 'testo' */
+       
        fout = gbfopen_le(fname, "wb", MYNAME);
        
        short_h = mkshort_new_handle();
@@ -1120,6 +1243,27 @@ garmin_gpi_wr_init(const char *fname)
                fatal(MYNAME ": Valid values are CP1250 to CP1257.\n");
        }
 
+       units = tolower(opt_units[0]);
+       if ((units != 'm') && (units != 's'))
+               fatal(MYNAME ": Unknown units parameter (%c).\n", opt_units[0]);
+
+       alerts = (opt_alerts) ? 1 : 0;
+
+       if (opt_speed) {
+               double scale;
+               alerts = 1;                                     /* Force alerts to be enabled */
+               if (units == 's') scale = MPH_TO_MPS(1);        /* We need speed in meters per second */
+               else scale = KPH_TO_MPS(1);
+               parse_speed(opt_speed, &defspeed, scale, MYNAME);
+       }
+
+       if (opt_proximity) {
+               double scale;
+               alerts = 1;                                     /* Force alerts to be enabled */
+               if (units == 's') scale = MILES_TO_METERS(1);   /* We need proximity in meters */
+               else scale = 1000.0;                            /* one kilometer in meters */
+               parse_distance(opt_proximity, &defproximity, scale, MYNAME);
+       }
        wdata = wdata_alloc();
 }
 
@@ -1140,6 +1284,15 @@ garmin_gpi_wr_deinit(void)
        wdata_free(wdata);
        mkshort_del_handle(&short_h);
        gbfclose(fout);
+
+       if ((opt_sleep) && (gpi_timestamp != 0)) {      /* don't sleep during 'testo' */
+               int sleep = atoi(opt_sleep);
+               if (sleep < 1) sleep = 1;
+               gpi_timestamp += sleep;
+               while (gpi_timestamp > time(NULL)) {
+                       gb_sleep(100);
+               }
+       }
 }
 
 
index 3bae4469ca7c8b31c4d110e2d531ac49690fb253..11a064ad05f4d6a72a39a7b39f1391a729ea6e2c 100644 (file)
@@ -184,7 +184,7 @@ icon_mapping_t garmin_icon_table[] = {
         * ....
         * {    -2,  8192, "Custom 511" },
         */
-#if 0
+#if 1
 /* Since Garmin is busily adding icons to new units, we have to hide
  * these so we can pass them through to the new entries.  6/2/07 robertl
  */
@@ -617,6 +617,7 @@ grid_mapping_t gt_mps_grid_names[] =
        { "dms",        "Lat/Lon hddd*mm'ss.s\"",       grid_lat_lon_dms },
        { "bng",        "British National Grid",        grid_bng },
        { "utm",        "UTM",                          grid_utm },
+       { "swiss",      "Swiss grid",                   grid_swiss },
        { NULL, NULL,   0 }
 };
 
index 97f7716c91a8d19b4ebbb7960fd2612bf9722a78..e17a9a6fcd991fc461b0263a5ca716821ef4fa3e 100644 (file)
@@ -73,7 +73,7 @@ typedef enum {
        unknown_header
 } header_type;
 
-#define MAX_HEADER_FIELDS 24
+#define MAX_HEADER_FIELDS 36
 
 static char *header_lines[unknown_header + 1][MAX_HEADER_FIELDS];
 static int header_fields[unknown_header + 1][MAX_HEADER_FIELDS];
@@ -133,7 +133,7 @@ static char *headers[] = {
                "Display Mode\tColor\tSymbol\tFacility\tCity\tState\tCountry\t"
                "Date Modified\tLink\tCategories",
        "Waypoint Name\tDistance\tLeg Length\tCourse",
-       "Position\tTime\tAltitude\tDepth\tLeg Length\tLeg Time\tLeg Speed\tLeg Course",
+       "Position\tTime\tAltitude\tDepth\tTemperature\tLeg Length\tLeg Time\tLeg Speed\tLeg Course",
        "Name\tLength\tCourse\tWaypoints\tLink",
        "Name\tStart Time\tElapsed Time\tLength\tAverage Speed\tLink",
        NULL
@@ -164,67 +164,17 @@ init_date_and_time_format(void)
        xfree(c);
 }
 
-static double
-distance(double lat1, double lon1, double lat2, double lon2)
-{
-       double res = radtometers(gcdist(RAD(lat1), RAD(lon1), RAD(lat2), RAD(lon2)));
-       if (res < 0.1) res = 0; /* calc. diffs on 32- and 64-bit hosts */
-       return res;
-}
-
-static double
-course_deg(double lat1, double lon1, double lat2, double lon2)
-{
-       return DEG(heading(RAD(lat1), RAD(lon1), RAD(lat2), RAD(lon2)));
-}
-
-static double
-waypt_distance(const waypoint *A, const waypoint *B)           /* !!! from A to B !!! */
-{
-       double dist = 0;
-       garmin_fs_p gmsd;
-       
-       if ((A == NULL) || (B == NULL)) return 0;
-       
-       gmsd = GMSD_FIND(A);
-       if ((gmsd != NULL) && (gmsd->ilinks != NULL))
-       {
-               garmin_ilink_t *link = gmsd->ilinks;
-               
-               dist = distance(A->latitude, A->longitude, link->lat, link->lon);
-               while (link->next != NULL)
-               {
-                       garmin_ilink_t *prev = link;
-                       link = link->next;
-                       dist += distance(prev->lat, prev->lon, link->lat, link->lon);
-               }
-               dist += distance(link->lat, link->lon, B->latitude, B->longitude);
-       } else 
-       {
-               dist = distance(A->latitude, A->longitude, B->latitude, B->longitude);
-       }
-       return dist;
-}
-
 static void
-convert_datum(waypoint *wpt, const int to_internal_wgs84, double *dest_lat, double *dest_lon)
+convert_datum(const waypoint *wpt, double *dest_lat, double *dest_lon)
 {
        double alt;
 
        if (datum_index == DATUM_WGS84 ) {
-               if (to_internal_wgs84 == 0) {
-                       *dest_lat = wpt->latitude;
-                       *dest_lon = wpt->longitude;
-               }
-               return;
+               *dest_lat = wpt->latitude;
+               *dest_lon = wpt->longitude;
        }
-               
-       if (to_internal_wgs84) { /* convert the waypoint himself */
-               GPS_Math_Known_Datum_To_WGS84_M(wpt->latitude, wpt->longitude, 0.0,
-                       &wpt->latitude, &wpt->longitude, &alt, datum_index);
-       } else
-               GPS_Math_WGS84_To_Known_Datum_M(wpt->latitude, wpt->longitude, 0.0,
-                       dest_lat, dest_lon, &alt, datum_index);
+       else GPS_Math_WGS84_To_Known_Datum_M(wpt->latitude, wpt->longitude, 0.0,
+               dest_lat, dest_lon, &alt, datum_index);
 }
 
 /* WRITER *****************************************************************/
@@ -298,7 +248,7 @@ prework_wpt_cb(const waypoint *wpt)
 
        if (prev != NULL) {
                cur_info->time += (wpt->creation_time - prev->creation_time);
-               cur_info->length += waypt_distance(prev, wpt);
+               cur_info->length += waypt_distance_ex(prev, wpt);
        }
        else {
                cur_info->first_wpt = (waypoint *)wpt;
@@ -315,14 +265,14 @@ prework_wpt_cb(const waypoint *wpt)
 static void
 print_position(const waypoint *wpt)
 {
-       int valid;
+       int valid = 1;
        double lat, lon, north, east;
        char latsig, lonsig;
        double  latmin, lonmin, latsec, lonsec;
        int     latint, lonint, zone;
        char map[3], zonec;
        
-       convert_datum((waypoint *)wpt, 0, &lat, &lon);
+       convert_datum(wpt, &lat, &lon);
 
        /* ----------------------------------------------------------------------------*/
        /*            the following code is from pretty_deg_format (util.c)            */
@@ -365,20 +315,33 @@ print_position(const waypoint *wpt)
        case grid_bng:
 
                valid = GPS_Math_WGS84_To_UKOSMap_M(wpt->latitude, wpt->longitude, &east, &north, map);
-               is_fatal(! valid, MYNAME ": Some (or all?) of the coordinates cannot be displayed using \"BNG\".");
-               gbfprintf(fout, "%s %5.0f %5.0f\t", map, east, north);
+               if (valid) gbfprintf(fout, "%s %5.0f %5.0f\t", map, east, north);
                break;
 
        case grid_utm:
 
                valid = GPS_Math_Known_Datum_To_UTM_EN(lat, lon,
                        &east, &north, &zone, &zonec, datum_index);
-               gbfprintf(fout, "%02d %c %.0f %.0f\t", zone, zonec, east, north);
+               if (valid) gbfprintf(fout, "%02d %c %.0f %.0f\t", zone, zonec, east, north);
+               break;
+
+       case grid_swiss:
+
+               valid = GPS_Math_WGS84_To_CH1903_NGEN(wpt->latitude, wpt->longitude, &east, &north);
+               if (valid) gbfprintf(fout, "%.f %.f\t", east, north);
                break;
 
        default:
                fatal("ToDo\n");
        }
+       
+       if (! valid) {
+               gbfprintf(fout, "#####\n");
+               fatal(MYNAME ": %s (%s) is outside of convertable area \"%s\"!\n",
+                       wpt->shortname ? wpt->shortname : "Waypoint",
+                       pretty_deg_format(wpt->latitude, wpt->longitude, 'd', NULL, 0),
+                       gt_get_mps_grid_longname(grid_index, MYNAME));
+       }
 }
 
 static void
@@ -387,6 +350,10 @@ print_date_and_time(const time_t time, const int time_only)
        struct tm tm;
        char tbuf[32];
        
+       if (time < 0) {
+               gbfprintf(fout, "\t");
+               return;
+       }
        if (time_only) {
                tm = *gmtime(&time);
                snprintf(tbuf, sizeof(tbuf), "%d:%02d:%02d", tm.tm_hour, tm.tm_min, tm.tm_sec);
@@ -440,16 +407,13 @@ print_course(const waypoint *A, const waypoint *B)                /* seems to be okay */
 {
        if ((A != NULL) && (B != NULL) && (A != B)) {
                int course;
-               course = si_round((double)360 - course_deg(A->latitude, A->longitude, B->latitude, B->longitude));
-               if (course >= 360) {
-                       course -= 360;
-               }
+               course = si_round(waypt_course(A, B));
                cet_gbfprintf(fout, &cet_cs_vec_cp1252, "%d%c true", course, 0xB0);
        }
 }
 
 static void
-print_distance(const double distance, const int no_scale, const int with_tab)
+print_distance(const double distance, const int no_scale, const int with_tab, const int decis)
 {
        double dist = distance;
        
@@ -457,7 +421,7 @@ print_distance(const double distance, const int no_scale, const int with_tab)
                dist = METERS_TO_FEET(dist);
        
                if ((dist < 5280) || no_scale)
-                       gbfprintf(fout, "%.f ft", dist);
+                       gbfprintf(fout, "%.*f ft", decis, dist);
                else {
                        dist = METERS_TO_MILES(distance);
                        if (dist < (double)100)
@@ -469,7 +433,7 @@ print_distance(const double distance, const int no_scale, const int with_tab)
        else
        {
                if ((dist < 1000) || no_scale)
-                       gbfprintf(fout, "%.f m", dist);
+                       gbfprintf(fout, "%.*f m", decis, dist);
                else {
                        dist = dist / (double)1000.0;
                        if (dist < (double)100)
@@ -511,6 +475,15 @@ print_speed(double *distance, time_t *time)
        gbfprintf(fout, "\t");
 }
 
+static void
+print_temperature(const float temperature)
+{
+       if (gtxt_flags.celsius)
+               gbfprintf(fout, "%.f C", temperature);
+       else
+               gbfprintf(fout, "%.f F", (temperature * 1.8) + 32);
+}
+
 static void
 print_string(const char *fmt, const char *string)
 {
@@ -573,26 +546,22 @@ write_waypt(const waypoint *wpt)
        print_position(wpt);
        
        if IS_VALID_ALT(wpt->altitude)
-               print_distance(wpt->altitude, 1, 0);
+               print_distance(wpt->altitude, 1, 0, 0);
        gbfprintf(fout, "\t");
        
        x = WAYPT_GET(wpt, depth, unknown_alt);
        if (x != unknown_alt)
-               print_distance(x, 1, 0);
+               print_distance(x, 1, 0, 1);
        gbfprintf(fout, "\t");
 
        x = WAYPT_GET(wpt, proximity, unknown_alt);
        if (x != unknown_alt)
-               print_distance(x, 0, 0);
+               print_distance(x, 0, 0, 0);
        gbfprintf(fout, "\t");
        
-       x = WAYPT_GET(wpt, temperature, unknown_alt);
-       if (x != unknown_alt) {
-               if (gtxt_flags.celsius)
-                       gbfprintf(fout, "%.f C", x);
-               else
-                       gbfprintf(fout, "%.f F", (x * 1.8) + 32);
-       }
+       x = WAYPT_GET(wpt, temperature, -999);
+       if (x != -999)
+               print_temperature(x);
        gbfprintf(fout, "\t%s\t", dspl_mode);
        
        gbfprintf(fout, "Unknown\t");                           /* Color is fixed: Unknown */
@@ -632,7 +601,7 @@ route_disp_hdr_cb(const route_head *rte)
        }
 
        print_string("\r\nRoute\t%s\t", current_trk->rte_name ? current_trk->rte_name : "");
-       print_distance(cur_info->length, 0, 1);
+       print_distance(cur_info->length, 0, 1, 0);
        print_course(cur_info->first_wpt, cur_info->last_wpt);
        gbfprintf(fout, "\t%d waypoints\t", cur_info->count);
        print_string("%s\r\n", rte->rte_url ? rte->rte_url : "");
@@ -655,14 +624,14 @@ route_disp_wpt_cb(const waypoint *wpt)
 
        if (prev != NULL)
        {
-               double dist = waypt_distance(prev, wpt);
+               double dist = waypt_distance_ex(prev, wpt);
                cur_info->total += dist;
-               print_distance(cur_info->total, 0, 1);
-               print_distance(dist, 0, 1);
+               print_distance(cur_info->total, 0, 1, 0);
+               print_distance(dist, 0, 1, 0);
                print_course(prev, wpt);
        }
        else 
-               print_distance(0, 1, 0);        
+               print_distance(0, 1, 0, 0);
 
        gbfprintf(fout, "\r\n");
        
@@ -686,7 +655,7 @@ track_disp_hdr_cb(const route_head *track)
        print_string("\r\nTrack\t%s\t", current_trk->rte_name ? current_trk->rte_name : "");
        print_date_and_time(cur_info->start, 0);
        print_date_and_time(cur_info->time, 1);
-       print_distance(cur_info->length, 0, 1);
+       print_distance(cur_info->length, 0, 1, 0);
        print_speed(&cur_info->length, &cur_info->time);
        print_string("%s", (track->rte_url != NULL) ? track->rte_url : "");
        gbfprintf(fout, "\r\n\r\nHeader\t%s\r\n\r\n", headers[trkpt_header]);
@@ -703,20 +672,30 @@ track_disp_wpt_cb(const waypoint *wpt)
 {
        waypoint *prev = cur_info->prev_wpt;
        time_t delta;
-       double dist;
+       double dist, depth;
        
        gbfprintf(fout, "Trackpoint\t");
 
        print_position(wpt);
        print_date_and_time(wpt->creation_time, 0);
        if IS_VALID_ALT(wpt->altitude)
-               print_distance(wpt->altitude, 1, 0);
-       gbfprintf(fout, "\t0.0 %s", (gtxt_flags.metric) ? "m" : "ft");
+               print_distance(wpt->altitude, 1, 0, 0);
+
+       gbfprintf(fout, "\t");
+       depth = WAYPT_GET(wpt, depth, unknown_alt);
+       if (depth != unknown_alt)
+               print_distance(depth, 1, 0, 1);
+
        if (prev != NULL) {
+               float temp;
                gbfprintf(fout, "\t");
                delta = wpt->creation_time - prev->creation_time;
-               dist = distance(prev->latitude, prev->longitude, wpt->latitude, wpt->longitude);
-               print_distance(dist, 0, 1);
+               temp = WAYPT_GET(wpt, temperature, -999);
+               if (temp != -999)
+                       print_temperature(temp);
+               gbfprintf(fout, "\t");
+               dist = waypt_distance_ex(prev, wpt);
+               print_distance(dist, 0, 1, 0);
                print_date_and_time(delta, 1);
                print_speed(&dist, &delta);
                print_course(prev, wpt);
@@ -767,6 +746,9 @@ garmin_txt_wr_init(const char *fname)
        case grid_bng: /* force datum to "Ord Srvy Grt Britn" */
                datum_index = DATUM_OSGB36;
                break;
+       case grid_swiss: /* force datum to "Ord Srvy Grt Britn" */
+               datum_index = DATUM_WGS84;
+               break;
        default:
                datum_index = gt_lookup_datum_index(datum_str, MYNAME);
        }
@@ -870,51 +852,6 @@ free_header(const header_type ht)
 
 /* data parsers */
 
-#if 0
-/* moved to util.c */
-static void
-parse_position(const char *str, waypoint *wpt)
-{
-......
-}
-#endif
-
-static int
-parse_distance(const char *str, double *value)
-{
-       double x;
-       char *buff;
-       
-       if ((str == NULL) || (*str == '\0')) return 0;
-       
-       buff = xmalloc(strlen(str) + 1);
-       sscanf(str, "%lf %s", &x, buff);
-       
-       if (case_ignore_strcmp(buff, "km") == 0) {
-               *value = x * (double)1000;
-       }
-       else if (case_ignore_strcmp(buff, "m") == 0) {          /* meters */
-               *value = x;
-       } 
-       else if (case_ignore_strcmp(buff, "ft") == 0) {         /* feet */
-               *value = FEET_TO_METERS(x);
-       }
-       else if (case_ignore_strcmp(buff, "nm") == 0) {         /* mile (nautical / geographical) */
-               *value = NMILES_TO_METERS(x);
-       }
-       else if (case_ignore_strcmp(buff, "mi") == 0) {         /* mile (statute) */
-               *value = MILES_TO_METERS(x);
-       }
-       else if (case_ignore_strcmp(buff, "fa") == 0) {         /* fathom */
-               *value = FATHOMS_TO_METERS(x);
-       }
-       else
-               fatal(MYNAME ": Unknown distance unit \"%s\" at line %d!\n", str, current_line);
-               
-       xfree(buff);
-       return 1;
-}
-
 static int
 parse_date_and_time(char *str, time_t *value)
 {
@@ -1051,7 +988,7 @@ bind_fields(const header_type ht)
                
                c = fields;
                field_no = 1;
-               while (c != NULL) {
+               while (*c) {
                        if (strcmp(c, name) == 0) {
                                header_fields[ht][i] = field_no;
 #if 0
@@ -1128,9 +1065,9 @@ parse_waypoint(void)
                                parse_coordinates(str, datum_index, grid_index,
                                        &wpt->latitude, &wpt->longitude, MYNAME);
                                break;
-                       case  5: if (parse_distance(str, &d)) wpt->altitude = d; break;
-                       case  6: if (parse_distance(str, &d)) WAYPT_SET(wpt, depth, d); break;
-                       case  7: if (parse_distance(str, &d)) WAYPT_SET(wpt, proximity, d); break;
+                       case  5: if (parse_distance(str, &d, 1, MYNAME)) wpt->altitude = d; break;
+                       case  6: if (parse_distance(str, &d, 1, MYNAME)) WAYPT_SET(wpt, depth, d); break;
+                       case  7: if (parse_distance(str, &d, 1, MYNAME)) WAYPT_SET(wpt, proximity, d); break;
                        case  8: if (parse_temperature(str, &d)) WAYPT_SET(wpt, temperature, d); break;
                        case  9: if (parse_display(str, &i)) GMSD_SET(display, i); break;
                        case 10: break; /* skip color */
@@ -1232,16 +1169,39 @@ parse_track_waypoint(void)
        wpt = waypt_new();
        
        while ((str = csv_lineparse(NULL, "\t", "", column++))) {
-               int field_no = header_fields[trkpt_header][column];
+               int field_no;
+               double x;
+               
+               if (! *str) continue;
+
+               field_no = header_fields[trkpt_header][column];
                switch(field_no) {
-                       case 1: parse_coordinates(str, datum_index, grid_index,
+                       case 1: 
+                               parse_coordinates(str, datum_index, grid_index,
                                        &wpt->latitude, &wpt->longitude, MYNAME);
                                break;
-                       case 2: parse_date_and_time(str, &wpt->creation_time); break;
-                       case 3: parse_distance(str, &wpt->altitude); break;
+                       case 2: 
+                               parse_date_and_time(str, &wpt->creation_time);
+                               break;
+                       case 3:
+                               if (parse_distance(str, &x, 1, MYNAME))
+                                       wpt->altitude = x;
+                               break;
+                       case 4:
+                               if (parse_distance(str, &x, 1, MYNAME)) WAYPT_SET(wpt, depth, x); 
+                               break;
+                       case 5:
+                               if (parse_temperature(str, &x)) WAYPT_SET(wpt, temperature, x); 
+                               break;
+                       case 8:
+                               if (parse_speed(str, &x, 1, MYNAME)) WAYPT_SET(wpt, speed, x);
+                               break;
+                       case 9:
+                               WAYPT_SET(wpt, course, atoi(str));
+                               break;
                }
        }
-       route_add_wpt(current_trk, wpt);
+       track_add_wpt(current_trk, wpt);
 }
 
 /***************************************************************/
@@ -1285,11 +1245,12 @@ garmin_txt_read(void)
                current_line++;
                cin = lrtrim(buff);
                if (*cin == '\0') continue;
-               
+
                cin = csv_lineparse(cin, "\t", "", 0);
                
                if (cin == NULL) continue;
-               else if (case_ignore_strcmp(cin, "Header") == 0) parse_header();
+               
+               if (case_ignore_strcmp(cin, "Header") == 0) parse_header();
                else if (case_ignore_strcmp(cin, "Grid") == 0) parse_grid();
                else if (case_ignore_strcmp(cin, "Datum") == 0) parse_datum();
                else if (case_ignore_strcmp(cin, "Waypoint") == 0) parse_waypoint();
index 3b3489e2a2e62f21d6d01565d8b84b5cb0663e05..6bb978599f8d84c2aaf447eb5990af0a71ecf05d 100644 (file)
--- a/gbfile.c
+++ b/gbfile.c
@@ -289,18 +289,17 @@ gbfread(void *buf, const gbsize_t size, const gbsize_t members, gbfile *file)
 }
 
 /*
- * gbfprintf: (as fprintf)
+ * gbvfprintf: (as vfprintf)
  */
  
-int 
-gbfprintf(gbfile *file, const char *format, ...)
+int gbvfprintf(gbfile *file, const char *format, va_list ap)
 {
        int len;
        
        for (;;) {
                va_list args;
                
-               va_start(args, format);
+               va_copy(args, ap);
                len = vsnprintf(file->buff, file->buffsz, format, args);
                va_end(args);
 
@@ -329,6 +328,23 @@ gbfprintf(gbfile *file, const char *format, ...)
        return gbfwrite(file->buff, 1, len, file);
 }
 
+/*
+ * gbfprintf: (as fprintf)
+ */
+int 
+gbfprintf(gbfile *file, const char *format, ...)
+{
+       va_list args;
+       int result;
+       
+       va_start(args, format);
+       result = gbvfprintf(file, format, args);
+       va_end(args);
+       
+       return result;
+}
+
 /*
  * gbfputc: (as fputc)
  */
@@ -377,9 +393,9 @@ gbfwrite(const void *buf, const gbsize_t size, const gbsize_t members, gbfile *f
        }
 
        if (result != members) {
-               fatal("%s: Could not write %u bytes to %s!\n", 
+               fatal("%s: Could not write %lld bytes to %s!\n", 
                        file->module,
-                       (members - result) * size,
+                       (long long int) (members - result) * size,
                        file->name);
        }
                
@@ -455,7 +471,7 @@ gbferror(gbfile *file)
 void
 gbfrewind(gbfile *file)
 {
-       (void)gbfseek(file, 0, SEEK_SET);
+       (void) gbfseek(file, 0, SEEK_SET);
        gbfclearerr(file);
 }
 
@@ -466,9 +482,9 @@ gbfrewind(gbfile *file)
 int
 gbfseek(gbfile *file, gbint32 offset, int whence)
 {
+       int result;
 
        if (file->gzapi) {
-               int result;
                
                assert(whence != SEEK_END);
 
@@ -485,10 +501,26 @@ gbfseek(gbfile *file, gbint32 offset, int whence)
                        fatal("%s: online compression not yet supported for this format!", file->module);
                }
                return 0;
-               
        }
        else {
-               return fseek(file->handle.std, offset, whence);
+               gbsize_t pos = 0;
+               
+               if (whence != SEEK_SET) pos = ftell(file->handle.std);
+
+               result = fseek(file->handle.std, offset, whence);
+               if (result != 0) {
+                       switch (whence) {
+                       case SEEK_CUR:
+                       case SEEK_END: pos = pos + offset; break;
+                       case SEEK_SET: pos = offset; break;
+                       default:
+                               fatal("%s: Unknown seek operation (%d) for file %s!\n",
+                                       file->module, whence, file->name);
+                       }
+                       fatal("%s: Unable to set file (%s) to position (%llu)!\n",
+                               file->module, file->name, (long long unsigned) pos);
+               }
+               return 0;
        }
 }
 
@@ -499,22 +531,27 @@ gbfseek(gbfile *file, gbint32 offset, int whence)
 gbsize_t 
 gbftell(gbfile *file)
 {
+       gbsize_t result;
+       
        if (file->gzapi) {
 #if !ZLIB_INHIBITED
-               gbsize_t result = gztell(file->handle.gz);
+               result = gztell(file->handle.gz);
                if (file->back != -1) {
 //                     file->back = -1;
                        result--;
                }
-               return result;
 #else
                fatal(NO_ZLIB);
-               return -1;
+               result = -1;
 #endif
        }
        else {
-               return ftell(file->handle.std);
+               result = ftell(file->handle.std);
        }
+       if ((signed) result == -1)
+               fatal("%s: Could not determine position of file '%s'!\n",
+                       file->module, file->name);
+       return result;
 }
 
 /*
@@ -532,7 +569,7 @@ gbfeof(gbfile *file)
 
                res  = gzeof(file->handle.gz);
                if (!res) {
-                       signed char test;
+                       unsigned char test;
                        int len = gzread(file->handle.gz, &test, 1);
                        if (len == 1) {
                                /* No EOF, put the single byte back into stream */
@@ -597,7 +634,8 @@ gbfgetint32(gbfile *file)
 {
        char buf[4];
        
-       gbfread(&buf, 1, sizeof(buf), file);
+       is_fatal((gbfread(&buf, 1, sizeof(buf), file) != sizeof(buf)),
+               "%s: Unexpected end of file (%s)!\n", file->module, file->name);
 
        if (file->big_endian)
                return be_read32(buf);
@@ -614,7 +652,8 @@ gbfgetint16(gbfile *file)
 {
        char buf[2];
        
-       gbfread(&buf, 1, sizeof(buf), file);
+       is_fatal((gbfread(&buf, 1, sizeof(buf), file) != sizeof(buf)),
+               "%s: Unexpected end of file (%s)!\n", file->module, file->name);
        
        if (file->big_endian)
                return be_read16(buf);
@@ -631,7 +670,8 @@ gbfgetdbl(gbfile *file)
 {
        char buf[8];
 
-       gbfread(&buf, 1, sizeof(buf), file);
+       is_fatal((gbfread(&buf, 1, sizeof(buf), file) != sizeof(buf)),
+               "%s: Unexpected end of file (%s)!\n", file->module, file->name);
 
        return endian_read_double(buf, ! file->big_endian);
 }
@@ -645,7 +685,8 @@ gbfgetflt(gbfile *file)
 {
        char buf[4];
        
-       gbfread(&buf, 1, sizeof(buf), file);
+       is_fatal((gbfread(&buf, 1, sizeof(buf), file) != sizeof(buf)),
+               "%s: Unexpected end of file (%s)!\n", file->module, file->name);
 
        return endian_read_float(buf, ! file->big_endian);
 }
index 7b1d28a7b68afac6ab57899cc3bb4c97ceec9f60..545ebfc687b27c89127bc13a8efcce1e71411e5d 100644 (file)
--- a/gbfile.h
+++ b/gbfile.h
@@ -60,6 +60,7 @@ gbsize_t gbfread(void *buf, const gbsize_t size, const gbsize_t members, gbfile
 int gbfgetc(gbfile *file);
 char *gbfgets(char *buf, int len, gbfile *file);
 
+int gbvfprintf(gbfile *file, const char *format, va_list ap);
 int gbfprintf(gbfile *file, const char *format, ...);
 int gbfputc(int c, gbfile *file);
 int gbfputs(const char *s, gbfile *file);
index c2c6cab3c663f42bfdac14c180dbc899dd554df3..4667ffce3d4a5e8e7b8f2e731f911ab93eebd78a 100644 (file)
@@ -305,7 +305,16 @@ int gbser__fill_buffer(void *handle, unsigned want, unsigned *ms) {
                     vmin  = want - h->inbuf_used;
                     vtime = (unsigned) time_left / 100;
                 }
-                if ((rc = set_rx_timeout(h, vmin, vtime), rc < 0) ||
+               // The commented out call to set_rx_timeout here is totally
+               // legal by POSIX standards but does result in a flurry of
+               // of tcsetattrs that slightly tweak VMIN/VTIME while there
+               // is incoming data.   This has been shown to trigger driver
+               // bugs in the Prolific drivers for Mac and in certain Linux
+               // kernels, thought the latter has since been fixed.  
+               // So althogh removing this means that the timeout behaviour
+               // is actually different on POSIX and WIN32, it triggers
+               // fewer buts this way.  2/12/2008 RJL
+                if (/* (rc = set_rx_timeout(h, vmin, vtime), rc < 0) || */
                     (rc = read(h->fd, h->inbuf + h->inbuf_used, 
                                       want - h->inbuf_used), rc < 0)) {
                     return gbser_ERROR;
index bcd591b2ed8b60c04824c9c6a54040a6e14f9f4a..070161cadb393659ebd0d0740c942ccb3c7c4cb4 100644 (file)
@@ -4,5 +4,5 @@
  *
  * Isn't simplification via automation grand?
  */
-#define VERSION "1.3.4"
-
+#define VERSION "1.3.5"
+#define WEB_DOC_DIR "http://www.gpsbabel.org/htmldoc-1.3.5"
index db491f99ee5810ea7a242d3997f2232d012e4fc0..e15e4bb1164df0bb3d25f257bee9dff28403ae50 100644 (file)
@@ -5,4 +5,4 @@
  * Isn't simplification via automation grand?
  */
 #define VERSION "@GBMAJOR@.@GBMINOR@.@GBMICRO@@PACKAGE_RELEASE@"
-
+#define WEB_DOC_DIR "http://www.gpsbabel.org/htmldoc-@DOCVERSION@"
diff --git a/gdb.c b/gdb.c
index e6fc0190c068b2bde40e5f0600fdadb986480b8a..7893dceec0e0fb48bc24513d450ab722de3340b4 100644 (file)
--- a/gdb.c
+++ b/gdb.c
@@ -1,7 +1,7 @@
 /*
        Garmin GPS Database Reader/Writer
        
-       Copyright (C) 2005,2006,2007 Olaf Klein, o.b.klein@gpsbabel.org
+       Copyright (C) 2005-2008 Olaf Klein, o.b.klein@gpsbabel.org
        Mainly based on mapsource.c,
        Copyright (C) 2005 Robert Lipe, robertlipe@usa.net
        
@@ -57,6 +57,8 @@
            2007/05/03: Add code for tricky V3 descriptions
            2007/06/18: Tweak some forgotten "flagged" fields
            2007/07/07: Better support for new fields since V3 (postal code/street address/instruction)
+           2008/01/09: Fix handling of option category (cat)
+           2008/04/27: Add zero to checklist of "unknown bytes"
 */
 
 #include <stdio.h>
 
 /*******************************************************************************/
 
-/* static char gdb_release[] = "$Revision: 1.58 $"; */
-static char gdb_release_date[] = "$Date: 2007/07/14 21:06:14 $";
+/* static char gdb_release[] = "$Revision: 1.65 $"; */
+static char gdb_release_date[] = "$Date: 2008/05/04 23:09:08 $";
 
 static gbfile *fin, *fout;
 static int gdb_ver, gdb_category, gdb_via, gdb_roadbook;
@@ -119,6 +121,7 @@ static char *gdb_opt_category;
 static char *gdb_opt_ver;
 static char *gdb_opt_via;
 static char *gdb_opt_roadbook;
+static char *gdb_opt_bitcategory;
 
 static int waypt_flag;
 static int route_flag;
@@ -441,6 +444,7 @@ read_waypoint(gt_waypt_classes_e *waypt_class_out)
        waypoint *res;
        garmin_fs_t *gmsd;
        char *str;
+       char *bufp = buf;
 #ifdef GMSD_EXPERIMENTAL
        char subclass[22];
 #endif
@@ -462,7 +466,7 @@ read_waypoint(gt_waypt_classes_e *waypt_class_out)
        if (wpt_class != 0) waypth_ct++;
        
        FREAD_STR(buf);                                 /* Country code */
-       GMSD_SETSTR(cc, buf);
+       GMSD_SETSTR(cc, bufp);
        
 #ifdef GMSD_EXPERIMENTAL
        FREAD(subclass, sizeof(subclass));
@@ -531,11 +535,11 @@ read_waypoint(gt_waypt_classes_e *waypt_class_out)
        icon = FREAD_i32;
        GMSD_SET(icon, icon);                   /* icon */
        FREAD_STR(buf);                         /* city */
-       GMSD_SETSTR(city, buf);
+       GMSD_SETSTR(city, bufp);
        FREAD_STR(buf);                         /* state */
-       GMSD_SETSTR(state, buf);
+       GMSD_SETSTR(state, bufp);
        FREAD_STR(buf);                         /* facility */
-       GMSD_SETSTR(facility, buf);
+       GMSD_SETSTR(facility, bufp);
 
        FREAD(buf, 1);
 
@@ -580,7 +584,7 @@ read_waypoint(gt_waypt_classes_e *waypt_class_out)
                waypt_flag = 0;
 
                FREAD_STR(buf);                         /* street address */
-               GMSD_SETSTR(addr, buf);
+               GMSD_SETSTR(addr, bufp);
 
                FREAD(buf, 5);                          /* instruction depended */
                res->description = FREAD_CSTR;          /* instruction */
@@ -636,13 +640,13 @@ read_waypoint(gt_waypt_classes_e *waypt_class_out)
        if (gdb_ver >= GDB_VER_3) {
                if (FREAD_i32 == 1) {
                        FREAD_STR(buf);         /* phone number */
-                       GMSD_SETSTR(phone_nr, buf);
+                       GMSD_SETSTR(phone_nr, bufp);
                        FREAD_STR(buf);         /* ?? fax / mobile ?? */
                }
                FREAD_STR(buf);                 /* country */
-               GMSD_SETSTR(country, buf);
+               GMSD_SETSTR(country, bufp);
                FREAD_STR(buf);                 /* postal code */
-               GMSD_SETSTR(postal_code, buf);
+               GMSD_SETSTR(postal_code, bufp);
        }
        
        res->icon_descr = gt_find_desc_from_icon_number(icon, GDB, &dynamic);
@@ -730,7 +734,8 @@ read_route(void)
                }
 
                FREAD(buf, 18);                 /* unknown 18 bytes; but first should be 0x01 or 0x03 */
-               if ((buf[0] != 0x01) && (buf[0] != 0x03)) {
+                                               /* seen also 0 with VER3 */
+               if ((buf[0] != 0x00) && (buf[0] != 0x01) && (buf[0] != 0x03)) {
                        int i;
                        
                        warnings++;
@@ -1199,7 +1204,10 @@ write_waypoint(
        FWRITE_LATLON(wpt->latitude);           /* latitude */
        FWRITE_LATLON(wpt->longitude);          /* longitude */
        FWRITE_DBL(wpt->altitude, unknown_alt); /* altitude */
-       FWRITE_CSTR(wpt->notes);
+       if (wpt->notes)
+               FWRITE_CSTR(wpt->notes);
+       else 
+               FWRITE_CSTR(wpt->description);
        FWRITE_DBL(WAYPT_GET(wpt, proximity, unknown_alt), unknown_alt);        /* proximity */
        FWRITE_i32(display);                    /* display */
        FWRITE_i32(0);                          /* color (colour) */
@@ -1625,6 +1633,16 @@ init_writer(const char *fname)
        gdb_category = (gdb_opt_category) ? atoi(gdb_opt_category) : 0;
        gdb_ver = (gdb_opt_ver && *gdb_opt_ver) ? atoi(gdb_opt_ver) : 0;
 
+       if (gdb_category) {
+               is_fatal((gdb_category < 1) || (gdb_category > 16),
+                       MYNAME ": cat must be between 1 and 16!");
+               gdb_category = 1 << (gdb_category - 1);
+       }
+
+       if (gdb_opt_bitcategory) {
+               gdb_category = strtol(gdb_opt_bitcategory, NULL, 0);
+       }
+
        if (gdb_ver >= GDB_VER_UTF8)
                cet_convert_init(CET_CHARSET_UTF8, 1);
        
@@ -1676,12 +1694,15 @@ write_data(void)
 #define GDB_OPT_VER            "ver"
 #define GDB_OPT_VIA            "via"
 #define GDB_OPT_CATEGORY       "cat"
+#define GDB_OPT_BITCATEGORY    "bitscategory"
 #define GDB_OPT_ROADBOOK       "roadbook"
 
 static arglist_t gdb_args[] = {
        {GDB_OPT_CATEGORY, &gdb_opt_category,
                "Default category on output (1..16)", 
                NULL, ARGTYPE_INT, "1", "16"},
+        {GDB_OPT_BITCATEGORY, &gdb_opt_bitcategory, "Bitmap of categories",
+                NULL, ARGTYPE_INT, "1", "65535"},
        {GDB_OPT_VER, &gdb_opt_ver, 
                "Version of gdb file to generate (1..3)",
                "2", ARGTYPE_INT, "1", "3"},
@@ -1691,6 +1712,7 @@ static arglist_t gdb_args[] = {
        {GDB_OPT_ROADBOOK, &gdb_opt_roadbook,
                "Include major turn points (with description) from calculated route",
                NULL, ARGTYPE_BOOL, ARG_NOMINMAX},
+
        ARG_TERMINATOR
 };
 
index 0496d64222071820cce05d694c561f015cb1e63c..889405696561a673885807a286c71e355873c86c 100644 (file)
--- a/google.c
+++ b/google.c
@@ -353,9 +353,8 @@ google_read(void)
                    panel = strstr( dict, "panel:\"");
                    panelofs = 7;
                  }
-                 
                  tmp = panel;
-                 while ( tmp ) {
+                 while ( tmp ) {                        
                    if ( qc == '"' ) {
                      char *tmp1 = strstr( tmp, "\"points\":\"" );
                      if ( !tmp1 ) {
@@ -420,6 +419,9 @@ google_read(void)
                  if ( panel ) {
                    panel += panelofs;
                    end = strstr( panel, "/table><div class=\\\"legal" );
+                   if ( !end ) {
+                     end = strstr( panel, "/table\\x3e\\x3cdiv class=\\\"legal" );
+                   } 
                    if ( !end ) {
                      end = strstr( panel, "/table><div class=\\042legal" );
                    }               
@@ -435,7 +437,6 @@ google_read(void)
                        strcpy( end, "/div></div>");
                      }
                    }
-                   
                    if ( end ) {                                      
                      char *to = panel;
                      char *from = panel;
@@ -472,6 +473,12 @@ google_read(void)
                          *to++='>';
                          from += 6;
                        }
+                       else if ( !strncmp( from, "\\x", 2)) {
+                         unsigned int c;
+                         sscanf(from+2, "%2x", &c);
+                         *to++ = (char)c;
+                         from += 4;
+                       }
                        else if ( !strncmp( from, "\\'", 2)) {
                          *to++ = '\'';
                          from += 2;
@@ -497,6 +504,7 @@ google_read(void)
 #if 0 
                      {
                        FILE *foo = fopen( "foo.xml", "w" );
+                       fprintf(foo, "<!DOCTYPE foo [%s]>\n", xhtml_entities );
                        fwrite( panel, sizeof(char), strlen(panel), foo );
                        fclose( foo );
                      }
index 2550b9dad7e30c86d6baf0ab2f88d483991ae4e0..bbdf18a2a8b54e2c9ccd87adf6803c4d899213cb 100644 (file)
@@ -1,37 +1,36 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>GPSBabel Documentation</title><link rel="stylesheet" href="http://www.gpsbabel.org/style3.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.72.0" /></head><body><div class="book" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="GPSBabel_Documentation_Book"></a>GPSBabel Documentation</h1></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#Introduction">Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="#The_Problem">The Problem: Too many incompatible GPS file formats</a></span></dt><dt><span class="section"><a href="#The_Solution">The Solution</a></span></dt></dl></dd><dt><span class="chapter"><a href="#Getting_and_Building">1. Getting it and Building it</a></span></dt><dt><span class="chapter"><a href="#Usage">2. Usage</a></span></dt><dd><dl><dt><span class="sect1"><a href="#Invocation">Invocation</a></span></dt><dt><span class="sect1"><a href="#Suboptions">Suboptions</a></span></dt><dt><span class="sect1"><a href="#Advanced_Usage">Advanced Usage</a></span></dt><dt><span class="sect1"><a href="#Route_And_Track_Modes">Route and Track Modes</a></span></dt><dt><span class="sect1"><a href="#inifile">Working with predefined options</a></span></dt><dt><span class="sect1"><a href="#tracking">Realtime tracking</a></span></dt><dt><span class="sect1"><a href="#batchfile">Batch mode (command files)</a></span></dt></dl></dd><dt><span class="chapter"><a href="#The_Formats">3. The Formats</a></span></dt><dd><dl><dt><span class="section"><a href="#fmt_xcsv">? Character Separated Values (xcsv)</a></span></dt><dt><span class="section"><a href="#fmt_alantrl">Alan Map500 tracklogs (.trl) (alantrl)</a></span></dt><dt><span class="section"><a href="#fmt_alanwpr">Alan Map500 waypoints and routes (.wpr) (alanwpr)</a></span></dt><dt><span class="section"><a href="#fmt_tabsep">All database fields on one tab-separated line (tabsep)</a></span></dt><dt><span class="section"><a href="#fmt_baroiq">Brauniger IQ Series Barograph Download (baroiq)</a></span></dt><dt><span class="section"><a href="#fmt_cambridge">Cambridge/Winpilot glider software (cambridge)</a></span></dt><dt><span class="section"><a href="#fmt_cst">CarteSurTable data file (cst)</a></span></dt><dt><span class="section"><a href="#fmt_cetus">Cetus for Palm/OS (cetus)</a></span></dt><dt><span class="section"><a href="#fmt_coastexp">CoastalExplorer XML (coastexp)</a></span></dt><dt><span class="section"><a href="#fmt_csv">Comma separated values (csv)</a></span></dt><dt><span class="section"><a href="#fmt_compegps">CompeGPS data files (.wpt/.trk/.rte) (compegps)</a></span></dt><dt><span class="section"><a href="#fmt_copilot">CoPilot Flight Planner for Palm/OS (copilot)</a></span></dt><dt><span class="section"><a href="#fmt_coto">cotoGPS for Palm/OS (coto)</a></span></dt><dt><span class="section"><a href="#fmt_custom">Custom "Everything" Style (custom)</a></span></dt><dt><span class="section"><a href="#fmt_axim_gpb">Dell Axim Navigation System (.gpb) file format (axim_gpb)</a></span></dt><dt><span class="section"><a href="#fmt_an1">DeLorme .an1 (drawing) file (an1)</a></span></dt><dt><span class="section"><a href="#fmt_gpl">DeLorme GPL (gpl)</a></span></dt><dt><span class="section"><a href="#fmt_saplus">DeLorme Street Atlas Plus (saplus)</a></span></dt><dt><span class="section"><a href="#fmt_saroute">DeLorme Street Atlas Route (saroute)</a></span></dt><dt><span class="section"><a href="#fmt_xmap">DeLorme XMap HH Native .WPT (xmap)</a></span></dt><dt><span class="section"><a href="#fmt_xmap2006">DeLorme XMap/SAHH 2006 Native .TXT (xmap2006)</a></span></dt><dt><span class="section"><a href="#fmt_xmapwpt">DeLorme XMat HH Street Atlas USA .WPT (PPC) (xmapwpt)</a></span></dt><dt><span class="section"><a href="#fmt_easygps">EasyGPS binary format (easygps)</a></span></dt><dt><span class="section"><a href="#fmt_igc">FAI/IGC Flight Recorder Data Format (igc)</a></span></dt><dt><span class="section"><a href="#fmt_gpssim">Franson GPSGate Simulation (gpssim)</a></span></dt><dt><span class="section"><a href="#fmt_fugawi">Fugawi (fugawi)</a></span></dt><dt><span class="section"><a href="#fmt_g7towin">G7ToWin data files (.g7t) (g7towin)</a></span></dt><dt><span class="section"><a href="#fmt_garmin301">Garmin 301 Custom position and heartrate (garmin301)</a></span></dt><dt><span class="section"><a href="#fmt_glogbook">Garmin Logbook XML (glogbook)</a></span></dt><dt><span class="section"><a href="#fmt_gdb">Garmin MapSource - gdb (gdb)</a></span></dt><dt><span class="section"><a href="#fmt_mapsource">Garmin MapSource - mps (mapsource)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_txt">Garmin MapSource - txt (tab delimited) (garmin_txt)</a></span></dt><dt><span class="section"><a href="#fmt_pcx">Garmin PCX5 (pcx)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_poi">Garmin POI database (garmin_poi)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_gpi">Garmin Points of Interest (.gpi) (garmin_gpi)</a></span></dt><dt><span class="section"><a href="#fmt_garmin">Garmin serial/USB protocol (garmin)</a></span></dt><dt><span class="section"><a href="#fmt_gtrnctr">Garmin Training Centerxml (gtrnctr)</a></span></dt><dt><span class="section"><a href="#fmt_geo">Geocaching.com .loc (geo)</a></span></dt><dt><span class="section"><a href="#fmt_gcdb">GeocachingDB for Palm/OS (gcdb)</a></span></dt><dt><span class="section"><a href="#fmt_ggv_log">Geogrid Viewer tracklogs (.log) (ggv_log)</a></span></dt><dt><span class="section"><a href="#fmt_geonet">GEOnet Names Server (GNS) (geonet)</a></span></dt><dt><span class="section"><a href="#fmt_geoniche">GeoNiche .pdb (geoniche)</a></span></dt><dt><span class="section"><a href="#fmt_kml">Google Earth (Keyhole) Markup Language (kml)</a></span></dt><dt><span class="section"><a href="#fmt_google">Google Maps XML (google)</a></span></dt><dt><span class="section"><a href="#fmt_gpilots">GpilotS (gpilots)</a></span></dt><dt><span class="section"><a href="#fmt_gtm">GPS TrackMaker (gtm)</a></span></dt><dt><span class="section"><a href="#fmt_arc">GPSBabel arc filter file (arc)</a></span></dt><dt><span class="section"><a href="#fmt_gpsdrive">GpsDrive Format (gpsdrive)</a></span></dt><dt><span class="section"><a href="#fmt_gpsdrivetrack">GpsDrive Format for Tracks (gpsdrivetrack)</a></span></dt><dt><span class="section"><a href="#fmt_gpsman">GPSman (gpsman)</a></span></dt><dt><span class="section"><a href="#fmt_gpspilot">GPSPilot Tracker for Palm/OS (gpspilot)</a></span></dt><dt><span class="section"><a href="#fmt_gpsutil">gpsutil (gpsutil)</a></span></dt><dt><span class="section"><a href="#fmt_gpx">GPX XML (gpx)</a></span></dt><dt><span class="section"><a href="#fmt_hiketech">HikeTech (hiketech)</a></span></dt><dt><span class="section"><a href="#fmt_holux">Holux (gm-100) .wpo Format (holux)</a></span></dt><dt><span class="section"><a href="#fmt_hsandv">HSA Endeavour Navigator export File (hsandv)</a></span></dt><dt><span class="section"><a href="#fmt_html">HTML Output (html)</a></span></dt><dt><span class="section"><a href="#fmt_ignrando">IGN Rando track files (ignrando)</a></span></dt><dt><span class="section"><a href="#fmt_ktf2">Kartex 5 Track File (ktf2)</a></span></dt><dt><span class="section"><a href="#fmt_kwf2">Kartex 5 Waypoint File (kwf2)</a></span></dt><dt><span class="section"><a href="#fmt_kompass_tk">Kompass (DAV) Track (.tk) (kompass_tk)</a></span></dt><dt><span class="section"><a href="#fmt_kompass_wp">Kompass (DAV) Waypoints (.wp) (kompass_wp)</a></span></dt><dt><span class="section"><a href="#fmt_psitrex">KuDaTa PsiTrex text (psitrex)</a></span></dt><dt><span class="section"><a href="#fmt_lowranceusr">Lowrance USR (lowranceusr)</a></span></dt><dt><span class="section"><a href="#fmt_maggeo">Magellan Explorist Geocaching (maggeo)</a></span></dt><dt><span class="section"><a href="#fmt_mapsend">Magellan Mapsend (mapsend)</a></span></dt><dt><span class="section"><a href="#fmt_magnav">Magellan NAV Companion for Palm/OS (magnav)</a></span></dt><dt><span class="section"><a href="#fmt_magellanx">Magellan SD files (as for eXplorist) (magellanx)</a></span></dt><dt><span class="section"><a href="#fmt_magellan">Magellan SD files (as for Meridian) (magellan)</a></span></dt><dt><span class="section"><a href="#fmt_magellan1">Magellan serial protocol (magellan)</a></span></dt><dt><span class="section"><a href="#fmt_tef">Map&amp;Guide 'TourExchangeFormat' XML (tef)</a></span></dt><dt><span class="section"><a href="#fmt_mag_pdb">Map&amp;Guide to Palm/OS exported files (.pdb) (mag_pdb)</a></span></dt><dt><span class="section"><a href="#fmt_mapconverter">Mapopolis.com Mapconverter CSV (mapconverter)</a></span></dt><dt><span class="section"><a href="#fmt_mxf">MapTech Exchange Format (mxf)</a></span></dt><dt><span class="section"><a href="#fmt_msroute">Microsoft AutoRoute 2002 (pin/route reader) (msroute)</a></span></dt><dt><span class="section"><a href="#fmt_msroute1">Microsoft Streets and Trips (pin/route reader) (msroute)</a></span></dt><dt><span class="section"><a href="#fmt_s_and_t">Microsoft Streets and Trips 2002-2006 (s_and_t)</a></span></dt><dt><span class="section"><a href="#fmt_bcr">Motorrad Routenplaner (Map&amp;Guide) .bcr files (bcr)</a></span></dt><dt><span class="section"><a href="#fmt_psp">MS PocketStreets 2002 Pushpin (psp)</a></span></dt><dt><span class="section"><a href="#fmt_tpg">National Geographic Topo .tpg (waypoints) (tpg)</a></span></dt><dt><span class="section"><a href="#fmt_tpo2">National Geographic Topo 2.x .tpo (tpo2)</a></span></dt><dt><span class="section"><a href="#fmt_tpo3">National Geographic Topo 3.x/4.x .tpo (tpo3)</a></span></dt><dt><span class="section"><a href="#fmt_navicache">Navicache.com XML (navicache)</a></span></dt><dt><span class="section"><a href="#fmt_nmn4">Navigon Mobile Navigator .rte files (nmn4)</a></span></dt><dt><span class="section"><a href="#fmt_dna">Navitrak DNA marker format (dna)</a></span></dt><dt><span class="section"><a href="#fmt_netstumbler">NetStumbler Summary File (text) (netstumbler)</a></span></dt><dt><span class="section"><a href="#fmt_nima">NIMA/GNIS Geographic Names File (nima)</a></span></dt><dt><span class="section"><a href="#fmt_nmea">NMEA 0183 sentences (nmea)</a></span></dt><dt><span class="section"><a href="#fmt_ozi">OziExplorer (ozi)</a></span></dt><dt><span class="section"><a href="#fmt_palmdoc">PalmDoc Output (palmdoc)</a></span></dt><dt><span class="section"><a href="#fmt_pathaway">PathAway Database for Palm/OS (pathaway)</a></span></dt><dt><span class="section"><a href="#fmt_quovadis">Quovadis (quovadis)</a></span></dt><dt><span class="section"><a href="#fmt_raymarine">Raymarine Waypoint File (.rwf) (raymarine)</a></span></dt><dt><span class="section"><a href="#fmt_cup">See You flight analysis data (cup)</a></span></dt><dt><span class="section"><a href="#fmt_sportsim">Sportsim track files (part of zipped .ssz files) (sportsim)</a></span></dt><dt><span class="section"><a href="#fmt_stmsdf">Suunto Trek Manager (STM) .sdf files (stmsdf)</a></span></dt><dt><span class="section"><a href="#fmt_stmwpp">Suunto Trek Manager (STM) WaypointPlus files (stmwpp)</a></span></dt><dt><span class="section"><a href="#fmt_openoffice">Tab delimited fields useful for OpenOffice, Ploticus etc. (openoffice)</a></span></dt><dt><span class="section"><a href="#fmt_text">Textual Output (text)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom_itn">TomTom Itineraries (.itn) (tomtom_itn)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom_asc">TomTom POI file (.asc) (tomtom_asc)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom">TomTom POI file (.ov2) (tomtom)</a></span></dt><dt><span class="section"><a href="#fmt_tmpro">TopoMapPro Places File (tmpro)</a></span></dt><dt><span class="section"><a href="#fmt_dmtlog">TrackLogs digital mapping (.trl) (dmtlog)</a></span></dt><dt><span class="section"><a href="#fmt_tiger">U.S. Census Bureau Tiger Mapping Service (tiger)</a></span></dt><dt><span class="section"><a href="#fmt_unicsv">Universal csv with field structure in first line (unicsv)</a></span></dt><dt><span class="section"><a href="#fmt_vcard">Vcard Output (for iPod) (vcard)</a></span></dt><dt><span class="section"><a href="#fmt_vitosmt">Vito Navigator II tracks (vitosmt)</a></span></dt><dt><span class="section"><a href="#fmt_vitovtt">Vito SmartMap tracks (.vtt) (vitovtt)</a></span></dt><dt><span class="section"><a href="#fmt_wfff">WiFiFoFum 2.0 for PocketPC XML (wfff)</a></span></dt><dt><span class="section"><a href="#fmt_wbt-bin">Wintec WBT-100/200 Binary File Format (wbt-bin)</a></span></dt><dt><span class="section"><a href="#fmt_wbt">Wintec WBT-100/200 GPS Download (wbt)</a></span></dt><dt><span class="section"><a href="#fmt_wbt-tk1">Wintec WBT-201/G-Rays 2 Binary File Format (wbt-tk1)</a></span></dt><dt><span class="section"><a href="#fmt_yahoo">Yahoo Geocode API data (yahoo)</a></span></dt></dl></dd><dt><span class="chapter"><a href="#Data_Filters">4. Data Filters</a></span></dt><dd><dl><dt><span class="section"><a href="#filter_polygon">Include Only Points Inside Polygon (polygon)</a></span></dt><dt><span class="section"><a href="#filter_arc">Include Only Points Within Distance of Arc (arc)</a></span></dt><dt><span class="section"><a href="#filter_radius">Include Only Points Within Radius (radius)</a></span></dt><dt><span class="section"><a href="#filter_interpolate">Interpolate between trackpoints (interpolate)</a></span></dt><dt><span class="section"><a href="#filter_track">Manipulate track lists (track)</a></span></dt><dt><span class="section"><a href="#filter_sort">Rearrange waypoints by resorting (sort)</a></span></dt><dt><span class="section"><a href="#filter_nuketypes">Remove all waypoints, tracks, or routes (nuketypes)</a></span></dt><dt><span class="section"><a href="#filter_duplicate">Remove Duplicates (duplicate)</a></span></dt><dt><span class="section"><a href="#filter_position">Remove Points Within Distance (position)</a></span></dt><dt><span class="section"><a href="#filter_discard">Remove unreliable points with high hdop or vdop (discard)</a></span></dt><dt><span class="section"><a href="#filter_reverse">Reverse stops within routes (reverse)</a></span></dt><dt><span class="section"><a href="#filter_stack">Save and restore waypoint lists (stack)</a></span></dt><dt><span class="section"><a href="#filter_simplify">Simplify routes (simplify)</a></span></dt><dt><span class="section"><a href="#filter_transform">Transform waypoints into a route, tracks into routes, ... (transform)</a></span></dt></dl></dd><dt><span class="appendix"><a href="#Datums">A. Supported Datums</a></span></dt><dt><span class="appendix"><a href="#GarminIcons">B. Garmin Icons</a></span></dt><dt><span class="appendix"><a href="#Styles">C. GPSBabel XCSV Style Files</a></span></dt><dd><dl><dt><span class="section"><a href="#styles_intro">Introduction</a></span></dt><dt><span class="section"><a href="#style_intro2">Style file overview</a></span></dt><dt><span class="section"><a href="#styles_internal_const">Internal Constants</a></span></dt><dt><span class="section"><a href="#style_global">Global Properties of the File</a></span></dt><dt><span class="section"><a href="#style_behavior">GPSBabel Behavior Directives</a></span></dt><dt><span class="section"><a href="#style_layout">Defining the Layout of the File</a></span></dt><dt><span class="section"><a href="#style_define">Defining Fields Within the File</a></span></dt><dt><span class="section"><a href="#style_examples">Examples</a></span></dt><dt><span class="section"><a href="#style_notes">Miscellaneous Notes</a></span></dt></dl></dd><dt><span class="glossary"><a href="#Glossary">Glossary</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>3.1. <a href="#garmin_grid">Grid values for garmin_txt</a></dt><dt>3.2. <a href="#id2984364">track file header (8 bytes)</a></dt><dt>3.3. <a href="#id2984418">track point (32 bytes)</a></dt></dl></div><div class="list-of-examples"><p><b>List of Examples</b></p><dl><dt>3.1. <a href="#gdb_roadbook_option">Using gdb option <code class="option">roadbook</code> to create simple html roadbook</a></dt><dt>3.2. <a href="#all_garmin_txt_options">Command showing garmin_txt output with all options</a></dt><dt>3.3. <a href="#all_garmin_gpi_options">Command showing garmin_gpi output example</a></dt><dt>3.4. <a href="#sample_bcr_command">Sample BCR command with all options</a></dt><dt>3.5. <a href="#text_splitoutput">Example for splitoutput option to text format</a></dt><dt>3.6. <a href="#wbt-bin-on-macos">Command showing conversion of a Wintec binary file to GPX</a></dt><dt>3.7. <a href="#wbt-on-macos">Command showing WBT-200 download and erase over Bluetooth on Mac OS X</a></dt><dt>3.8. <a href="#wbt-tk1">Command showing conversion of a Wintec binary file to GPX</a></dt><dt>4.1. <a href="#example_polygon_filter">Using the polygon filter</a></dt><dt>4.2. <a href="#example_in_or_close_to">Using the polygon and arc filters to find points in or nearly in a 
+<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>GPSBabel Documentation</title><link rel="stylesheet" href="http://www.gpsbabel.org/style3.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /></head><body><div class="book" lang="en" xml:lang="en"><div class="titlepage"><div><div><h1 class="title"><a id="GPSBabel_Documentation_Book"></a>GPSBabel Documentation</h1></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="#Introduction">Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="#The_Problem">The Problem: Too many incompatible GPS file formats</a></span></dt><dt><span class="section"><a href="#The_Solution">The Solution</a></span></dt></dl></dd><dt><span class="chapter"><a href="#Getting_and_Building">1. Getting it and Building it</a></span></dt><dt><span class="chapter"><a href="#Usage">2. Usage</a></span></dt><dd><dl><dt><span class="sect1"><a href="#Invocation">Invocation</a></span></dt><dt><span class="sect1"><a href="#Suboptions">Suboptions</a></span></dt><dt><span class="sect1"><a href="#Advanced_Usage">Advanced Usage</a></span></dt><dt><span class="sect1"><a href="#Route_And_Track_Modes">Route and Track Modes</a></span></dt><dt><span class="sect1"><a href="#inifile">Working with predefined options</a></span></dt><dt><span class="sect1"><a href="#tracking">Realtime tracking</a></span></dt><dt><span class="sect1"><a href="#batchfile">Batch mode (command files)</a></span></dt></dl></dd><dt><span class="chapter"><a href="#The_Formats">3. The Formats</a></span></dt><dd><dl><dt><span class="section"><a href="#fmt_xcsv">? Character Separated Values (xcsv)</a></span></dt><dt><span class="section"><a href="#fmt_alantrl">Alan Map500 tracklogs (.trl) (alantrl)</a></span></dt><dt><span class="section"><a href="#fmt_alanwpr">Alan Map500 waypoints and routes (.wpr) (alanwpr)</a></span></dt><dt><span class="section"><a href="#fmt_tabsep">All database fields on one tab-separated line (tabsep)</a></span></dt><dt><span class="section"><a href="#fmt_baroiq">Brauniger IQ Series Barograph Download (baroiq)</a></span></dt><dt><span class="section"><a href="#fmt_cambridge">Cambridge/Winpilot glider software (cambridge)</a></span></dt><dt><span class="section"><a href="#fmt_cst">CarteSurTable data file (cst)</a></span></dt><dt><span class="section"><a href="#fmt_cetus">Cetus for Palm/OS (cetus)</a></span></dt><dt><span class="section"><a href="#fmt_coastexp">CoastalExplorer XML (coastexp)</a></span></dt><dt><span class="section"><a href="#fmt_csv">Comma separated values (csv)</a></span></dt><dt><span class="section"><a href="#fmt_compegps">CompeGPS data files (.wpt/.trk/.rte) (compegps)</a></span></dt><dt><span class="section"><a href="#fmt_copilot">CoPilot Flight Planner for Palm/OS (copilot)</a></span></dt><dt><span class="section"><a href="#fmt_coto">cotoGPS for Palm/OS (coto)</a></span></dt><dt><span class="section"><a href="#fmt_custom">Custom "Everything" Style (custom)</a></span></dt><dt><span class="section"><a href="#fmt_axim_gpb">Dell Axim Navigation System (.gpb) file format (axim_gpb)</a></span></dt><dt><span class="section"><a href="#fmt_an1">DeLorme .an1 (drawing) file (an1)</a></span></dt><dt><span class="section"><a href="#fmt_gpl">DeLorme GPL (gpl)</a></span></dt><dt><span class="section"><a href="#fmt_saplus">DeLorme Street Atlas Plus (saplus)</a></span></dt><dt><span class="section"><a href="#fmt_saroute">DeLorme Street Atlas Route (saroute)</a></span></dt><dt><span class="section"><a href="#fmt_xmap">DeLorme XMap HH Native .WPT (xmap)</a></span></dt><dt><span class="section"><a href="#fmt_xmap2006">DeLorme XMap/SAHH 2006 Native .TXT (xmap2006)</a></span></dt><dt><span class="section"><a href="#fmt_xmapwpt">DeLorme XMat HH Street Atlas USA .WPT (PPC) (xmapwpt)</a></span></dt><dt><span class="section"><a href="#fmt_destinator_itn">Destinator Itineraries (.dat) (destinator_itn)</a></span></dt><dt><span class="section"><a href="#fmt_destinator_poi">Destinator Points of Interest (.dat) (destinator_poi)</a></span></dt><dt><span class="section"><a href="#fmt_destinator_trl">Destinator TrackLogs (.dat) (destinator_trl)</a></span></dt><dt><span class="section"><a href="#fmt_easygps">EasyGPS binary format (easygps)</a></span></dt><dt><span class="section"><a href="#fmt_exif">Embedded Exif-GPS data (.jpg) (exif)</a></span></dt><dt><span class="section"><a href="#fmt_igc">FAI/IGC Flight Recorder Data Format (igc)</a></span></dt><dt><span class="section"><a href="#fmt_gpssim">Franson GPSGate Simulation (gpssim)</a></span></dt><dt><span class="section"><a href="#fmt_fugawi">Fugawi (fugawi)</a></span></dt><dt><span class="section"><a href="#fmt_g7towin">G7ToWin data files (.g7t) (g7towin)</a></span></dt><dt><span class="section"><a href="#fmt_garmin301">Garmin 301 Custom position and heartrate (garmin301)</a></span></dt><dt><span class="section"><a href="#fmt_glogbook">Garmin Logbook XML (glogbook)</a></span></dt><dt><span class="section"><a href="#fmt_gdb">Garmin MapSource - gdb (gdb)</a></span></dt><dt><span class="section"><a href="#fmt_mapsource">Garmin MapSource - mps (mapsource)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_txt">Garmin MapSource - txt (tab delimited) (garmin_txt)</a></span></dt><dt><span class="section"><a href="#fmt_pcx">Garmin PCX5 (pcx)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_poi">Garmin POI database (garmin_poi)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_gpi">Garmin Points of Interest (.gpi) (garmin_gpi)</a></span></dt><dt><span class="section"><a href="#fmt_garmin">Garmin serial/USB protocol (garmin)</a></span></dt><dt><span class="section"><a href="#fmt_gtrnctr">Garmin Training Centerxml (gtrnctr)</a></span></dt><dt><span class="section"><a href="#fmt_geo">Geocaching.com .loc (geo)</a></span></dt><dt><span class="section"><a href="#fmt_gcdb">GeocachingDB for Palm/OS (gcdb)</a></span></dt><dt><span class="section"><a href="#fmt_ggv_log">Geogrid Viewer tracklogs (.log) (ggv_log)</a></span></dt><dt><span class="section"><a href="#fmt_geonet">GEOnet Names Server (GNS) (geonet)</a></span></dt><dt><span class="section"><a href="#fmt_geoniche">GeoNiche .pdb (geoniche)</a></span></dt><dt><span class="section"><a href="#fmt_dg-100">GlobalSat DG-100/BT-335 Download (dg-100)</a></span></dt><dt><span class="section"><a href="#fmt_kml">Google Earth (Keyhole) Markup Language (kml)</a></span></dt><dt><span class="section"><a href="#fmt_google">Google Maps XML (google)</a></span></dt><dt><span class="section"><a href="#fmt_gpilots">GpilotS (gpilots)</a></span></dt><dt><span class="section"><a href="#fmt_gtm">GPS TrackMaker (gtm)</a></span></dt><dt><span class="section"><a href="#fmt_arc">GPSBabel arc filter file (arc)</a></span></dt><dt><span class="section"><a href="#fmt_gpsdrive">GpsDrive Format (gpsdrive)</a></span></dt><dt><span class="section"><a href="#fmt_gpsdrivetrack">GpsDrive Format for Tracks (gpsdrivetrack)</a></span></dt><dt><span class="section"><a href="#fmt_gpsman">GPSman (gpsman)</a></span></dt><dt><span class="section"><a href="#fmt_gpspilot">GPSPilot Tracker for Palm/OS (gpspilot)</a></span></dt><dt><span class="section"><a href="#fmt_gpsutil">gpsutil (gpsutil)</a></span></dt><dt><span class="section"><a href="#fmt_gpx">GPX XML (gpx)</a></span></dt><dt><span class="section"><a href="#fmt_hiketech">HikeTech (hiketech)</a></span></dt><dt><span class="section"><a href="#fmt_holux">Holux (gm-100) .wpo Format (holux)</a></span></dt><dt><span class="section"><a href="#fmt_hsandv">HSA Endeavour Navigator export File (hsandv)</a></span></dt><dt><span class="section"><a href="#fmt_html">HTML Output (html)</a></span></dt><dt><span class="section"><a href="#fmt_ignrando">IGN Rando track files (ignrando)</a></span></dt><dt><span class="section"><a href="#fmt_ktf2">Kartex 5 Track File (ktf2)</a></span></dt><dt><span class="section"><a href="#fmt_kwf2">Kartex 5 Waypoint File (kwf2)</a></span></dt><dt><span class="section"><a href="#fmt_kompass_tk">Kompass (DAV) Track (.tk) (kompass_tk)</a></span></dt><dt><span class="section"><a href="#fmt_kompass_wp">Kompass (DAV) Waypoints (.wp) (kompass_wp)</a></span></dt><dt><span class="section"><a href="#fmt_psitrex">KuDaTa PsiTrex text (psitrex)</a></span></dt><dt><span class="section"><a href="#fmt_lowranceusr">Lowrance USR (lowranceusr)</a></span></dt><dt><span class="section"><a href="#fmt_maggeo">Magellan Explorist Geocaching (maggeo)</a></span></dt><dt><span class="section"><a href="#fmt_mapsend">Magellan Mapsend (mapsend)</a></span></dt><dt><span class="section"><a href="#fmt_magnav">Magellan NAV Companion for Palm/OS (magnav)</a></span></dt><dt><span class="section"><a href="#fmt_magellanx">Magellan SD files (as for eXplorist) (magellanx)</a></span></dt><dt><span class="section"><a href="#fmt_magellan">Magellan SD files (as for Meridian) (magellan)</a></span></dt><dt><span class="section"><a href="#fmt_magellan1">Magellan serial protocol (magellan)</a></span></dt><dt><span class="section"><a href="#fmt_ik3d">MagicMaps IK3D project file (.ikt) (ik3d)</a></span></dt><dt><span class="section"><a href="#fmt_tef">Map&amp;Guide 'TourExchangeFormat' XML (tef)</a></span></dt><dt><span class="section"><a href="#fmt_mag_pdb">Map&amp;Guide to Palm/OS exported files (.pdb) (mag_pdb)</a></span></dt><dt><span class="section"><a href="#fmt_mapconverter">Mapopolis.com Mapconverter CSV (mapconverter)</a></span></dt><dt><span class="section"><a href="#fmt_mxf">MapTech Exchange Format (mxf)</a></span></dt><dt><span class="section"><a href="#fmt_msroute">Microsoft AutoRoute 2002 (pin/route reader) (msroute)</a></span></dt><dt><span class="section"><a href="#fmt_msroute1">Microsoft Streets and Trips (pin/route reader) (msroute)</a></span></dt><dt><span class="section"><a href="#fmt_s_and_t">Microsoft Streets and Trips 2002-2007 (s_and_t)</a></span></dt><dt><span class="section"><a href="#fmt_bcr">Motorrad Routenplaner (Map&amp;Guide) .bcr files (bcr)</a></span></dt><dt><span class="section"><a href="#fmt_psp">MS PocketStreets 2002 Pushpin (psp)</a></span></dt><dt><span class="section"><a href="#fmt_mtk-bin">MTK Logger (iBlue 747,...) Binary File Format (mtk-bin)</a></span></dt><dt><span class="section"><a href="#fmt_mtk">MTK Logger (iBlue 747,Qstarz BT-1000,...) download (mtk)</a></span></dt><dt><span class="section"><a href="#fmt_tpg">National Geographic Topo .tpg (waypoints) (tpg)</a></span></dt><dt><span class="section"><a href="#fmt_tpo2">National Geographic Topo 2.x .tpo (tpo2)</a></span></dt><dt><span class="section"><a href="#fmt_tpo3">National Geographic Topo 3.x/4.x .tpo (tpo3)</a></span></dt><dt><span class="section"><a href="#fmt_navicache">Navicache.com XML (navicache)</a></span></dt><dt><span class="section"><a href="#fmt_nmn4">Navigon Mobile Navigator .rte files (nmn4)</a></span></dt><dt><span class="section"><a href="#fmt_navilink">NaviGPS GT-11/BGT-11 Download (navilink)</a></span></dt><dt><span class="section"><a href="#fmt_dna">Navitrak DNA marker format (dna)</a></span></dt><dt><span class="section"><a href="#fmt_netstumbler">NetStumbler Summary File (text) (netstumbler)</a></span></dt><dt><span class="section"><a href="#fmt_nima">NIMA/GNIS Geographic Names File (nima)</a></span></dt><dt><span class="section"><a href="#fmt_nmea">NMEA 0183 sentences (nmea)</a></span></dt><dt><span class="section"><a href="#fmt_lmx">Nokia Landmark Exchange (lmx)</a></span></dt><dt><span class="section"><a href="#fmt_osm">OpenStreetMap data files (osm)</a></span></dt><dt><span class="section"><a href="#fmt_ozi">OziExplorer (ozi)</a></span></dt><dt><span class="section"><a href="#fmt_palmdoc">PalmDoc Output (palmdoc)</a></span></dt><dt><span class="section"><a href="#fmt_pathaway">PathAway Database for Palm/OS (pathaway)</a></span></dt><dt><span class="section"><a href="#fmt_quovadis">Quovadis (quovadis)</a></span></dt><dt><span class="section"><a href="#fmt_raymarine">Raymarine Waypoint File (.rwf) (raymarine)</a></span></dt><dt><span class="section"><a href="#fmt_cup">See You flight analysis data (cup)</a></span></dt><dt><span class="section"><a href="#fmt_sportsim">Sportsim track files (part of zipped .ssz files) (sportsim)</a></span></dt><dt><span class="section"><a href="#fmt_stmsdf">Suunto Trek Manager (STM) .sdf files (stmsdf)</a></span></dt><dt><span class="section"><a href="#fmt_stmwpp">Suunto Trek Manager (STM) WaypointPlus files (stmwpp)</a></span></dt><dt><span class="section"><a href="#fmt_xol">Swiss Map # (.xol) format (xol)</a></span></dt><dt><span class="section"><a href="#fmt_openoffice">Tab delimited fields useful for OpenOffice, Ploticus etc. (openoffice)</a></span></dt><dt><span class="section"><a href="#fmt_text">Textual Output (text)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom_itn">TomTom Itineraries (.itn) (tomtom_itn)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom_asc">TomTom POI file (.asc) (tomtom_asc)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom">TomTom POI file (.ov2) (tomtom)</a></span></dt><dt><span class="section"><a href="#fmt_tmpro">TopoMapPro Places File (tmpro)</a></span></dt><dt><span class="section"><a href="#fmt_dmtlog">TrackLogs digital mapping (.trl) (dmtlog)</a></span></dt><dt><span class="section"><a href="#fmt_tiger">U.S. Census Bureau Tiger Mapping Service (tiger)</a></span></dt><dt><span class="section"><a href="#fmt_unicsv">Universal csv with field structure in first line (unicsv)</a></span></dt><dt><span class="section"><a href="#fmt_vcard">Vcard Output (for iPod) (vcard)</a></span></dt><dt><span class="section"><a href="#fmt_vidaone">VidaOne GPS for Pocket PC (.gpb) (vidaone)</a></span></dt><dt><span class="section"><a href="#fmt_vitosmt">Vito Navigator II tracks (vitosmt)</a></span></dt><dt><span class="section"><a href="#fmt_vitovtt">Vito SmartMap tracks (.vtt) (vitovtt)</a></span></dt><dt><span class="section"><a href="#fmt_wfff">WiFiFoFum 2.0 for PocketPC XML (wfff)</a></span></dt><dt><span class="section"><a href="#fmt_wbt-bin">Wintec WBT-100/200 Binary File Format (wbt-bin)</a></span></dt><dt><span class="section"><a href="#fmt_wbt">Wintec WBT-100/200 GPS Download (wbt)</a></span></dt><dt><span class="section"><a href="#fmt_wbt-tk1">Wintec WBT-201/G-Rays 2 Binary File Format (wbt-tk1)</a></span></dt><dt><span class="section"><a href="#fmt_yahoo">Yahoo Geocode API data (yahoo)</a></span></dt></dl></dd><dt><span class="chapter"><a href="#Data_Filters">4. Data Filters</a></span></dt><dd><dl><dt><span class="section"><a href="#filter_polygon">Include Only Points Inside Polygon (polygon)</a></span></dt><dt><span class="section"><a href="#filter_arc">Include Only Points Within Distance of Arc (arc)</a></span></dt><dt><span class="section"><a href="#filter_radius">Include Only Points Within Radius (radius)</a></span></dt><dt><span class="section"><a href="#filter_interpolate">Interpolate between trackpoints (interpolate)</a></span></dt><dt><span class="section"><a href="#filter_track">Manipulate track lists (track)</a></span></dt><dt><span class="section"><a href="#filter_sort">Rearrange waypoints by resorting (sort)</a></span></dt><dt><span class="section"><a href="#filter_nuketypes">Remove all waypoints, tracks, or routes (nuketypes)</a></span></dt><dt><span class="section"><a href="#filter_duplicate">Remove Duplicates (duplicate)</a></span></dt><dt><span class="section"><a href="#filter_position">Remove Points Within Distance (position)</a></span></dt><dt><span class="section"><a href="#filter_discard">Remove unreliable points with high hdop or vdop (discard)</a></span></dt><dt><span class="section"><a href="#filter_reverse">Reverse stops within routes (reverse)</a></span></dt><dt><span class="section"><a href="#filter_stack">Save and restore waypoint lists (stack)</a></span></dt><dt><span class="section"><a href="#filter_simplify">Simplify routes (simplify)</a></span></dt><dt><span class="section"><a href="#filter_transform">Transform waypoints into a route, tracks into routes, ... (transform)</a></span></dt></dl></dd><dt><span class="appendix"><a href="#Datums">A. Supported Datums</a></span></dt><dt><span class="appendix"><a href="#GarminIcons">B. Garmin Icons</a></span></dt><dt><span class="appendix"><a href="#Styles">C. GPSBabel XCSV Style Files</a></span></dt><dd><dl><dt><span class="section"><a href="#styles_intro">Introduction</a></span></dt><dt><span class="section"><a href="#style_intro2">Style file overview</a></span></dt><dt><span class="section"><a href="#styles_internal_const">Internal Constants</a></span></dt><dt><span class="section"><a href="#style_global">Global Properties of the File</a></span></dt><dt><span class="section"><a href="#style_behavior">GPSBabel Behavior Directives</a></span></dt><dt><span class="section"><a href="#style_layout">Defining the Layout of the File</a></span></dt><dt><span class="section"><a href="#style_define">Defining Fields Within the File</a></span></dt><dt><span class="section"><a href="#style_examples">Examples</a></span></dt><dt><span class="section"><a href="#style_notes">Miscellaneous Notes</a></span></dt></dl></dd><dt><span class="glossary"><a href="#Glossary">Glossary</a></span></dt></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>3.1. <a href="#garmin_grid">Grid values for garmin_txt</a></dt><dt>3.2. <a href="#distance_units">Supported distance units</a></dt><dt>3.3. <a href="#speed_units">Supported speed units</a></dt><dt>3.4. <a href="#id2780734">track file header (8 bytes)</a></dt><dt>3.5. <a href="#id2782515">track point (32 bytes)</a></dt></dl></div><div class="list-of-examples"><p><b>List of Examples</b></p><dl><dt>2.1. <a href="#id2737478">Command showing Linux download from Magellan serial and writing to .loc file</a></dt><dt>2.2. <a href="#id2737497">Command showing Windows download from Magellan serial and writing to .loc file</a></dt><dt>2.3. <a href="#id2737666">Merging multiple files into one</a></dt><dt>2.4. <a href="#id2737685">Merging multiple files of differing types.</a></dt><dt>2.5. <a href="#id2737700">Writing the same data in multiple output formats.</a></dt><dt>2.6. <a href="#id2738059">Read realtime positioning from Garmin USB, write to Keyhole Markup</a></dt><dt>3.1. <a href="#id2742458">Example 'csv' file</a></dt><dt>3.2. <a href="#gdb_bitscategory">Example for gdb bitcategory option to put all waypoints in categories 1 and 16.</a></dt><dt>3.3. <a href="#gdb_roadbook_option">Using gdb option <code class="option">roadbook</code> to create simple html roadbook</a></dt><dt>3.4. <a href="#all_garmin_txt_options">Command showing garmin_txt output with all options</a></dt><dt>3.5. <a href="#all_garmin_gpi_options">Command showing garmin_gpi output example</a></dt><dt>3.6. <a href="#garmin_gpi_speedcams">Read GPX file, create GPI to alert when you're 1/2 mile from a speed camera.</a></dt><dt>3.7. <a href="#garmin_bitcategory">Example for garmin bitcategory option to put all waypoints in categories 1 and 16.</a></dt><dt>3.8. <a href="#dg-100-on-linux">Command showing DG-100 download and erase on Linux</a></dt><dt>3.9. <a href="#sample_bcr_command">Sample BCR command with all options</a></dt><dt>3.10. <a href="#mtk-bin-on-linux">Convert MTK binary trackpoints to GPX</a></dt><dt>3.11. <a href="#mtk-on-linux">Command showing MTK download track and waypoints and erase on Linux</a></dt><dt>3.12. <a href="#text_splitoutput">Example for splitoutput option to text format</a></dt><dt>3.13. <a href="#wbt-bin-on-macos">Command showing conversion of a Wintec binary file to GPX</a></dt><dt>3.14. <a href="#wbt-on-macos">Command showing WBT-200 download and erase over Bluetooth on Mac OS X</a></dt><dt>3.15. <a href="#wbt-tk1">Command showing conversion of a Wintec binary file to GPX</a></dt><dt>4.1. <a href="#example_polygon_filter">Using the polygon filter</a></dt><dt>4.2. <a href="#example_in_or_close_to">Using the polygon and arc filters to find points in or nearly in a 
 polygon</a></dt><dt>4.3. <a href="#example_arc_filter">Using the arc filter</a></dt><dt>4.4. <a href="#radius_to_find_points_close">Using the radius filter to find points close to a given point</a></dt><dt>4.5. <a href="#example_interpolate_filter">Using the interpolate filter</a></dt><dt>4.6. <a href="#ex_track_move">Time-shifting a track with the track filter</a></dt><dt>4.7. <a href="#ex_track_merge">Merging tracks with the track filter</a></dt><dt>4.8. <a href="#ex_track_startstop">Extracting a period of time with the track filter</a></dt><dt>4.9. <a href="#example_nuketypes_filter">Filtering data types with nuketypes</a></dt><dt>4.10. <a href="#duplicate_to_suppress_points">Using the duplicate filter to suppress points with the same 
          name and location</a></dt><dt>4.11. <a href="#duplicate_to_ignore">Using the duplicate filter to implement an "ignore list."</a></dt><dt>4.12. <a href="#Correcting_Cache_Locations">Using the duplicate filter to correct the locations of "puzzle"
-geocaches</a></dt><dt>4.13. <a href="#posn_to_suppress_close_points">Using the position filter to suppress close points</a></dt><dt>4.14. <a href="#example_discard_filter">Using the discard filter</a></dt><dt>4.15. <a href="#transform_to_wpt">Converting a track to a sequence of waypoints</a></dt><dt>4.16. <a href="#transform_to_rte">Converting a pile of waypoints to a GPX route</a></dt><dt>4.17. <a href="#transform_to_trk">Converting a pile of waypoints to a GPX track</a></dt><dt>4.18. <a href="#transform_del">Convert a GPX track to GPX waypoints, tossing the original track</a></dt></dl></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="Introduction"></a>Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#The_Problem">The Problem: Too many incompatible GPS file formats</a></span></dt><dt><span class="section"><a href="#The_Solution">The Solution</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="The_Problem"></a>The Problem: Too many incompatible GPS file formats</h2></div></div></div><p> There are simply too many gratuitously different file formats
+geocaches</a></dt><dt>4.13. <a href="#posn_to_suppress_close_points">Using the position filter to suppress close points</a></dt><dt>4.14. <a href="#example_discard_filter">Using the discard filter for HDOP and VDOP. </a></dt><dt>4.15. <a href="#example_discard_filter_sats">Using the discard filter to require at least three satellites. </a></dt><dt>4.16. <a href="#transform_to_wpt">Converting a track to a sequence of waypoints</a></dt><dt>4.17. <a href="#transform_to_rte">Converting a pile of waypoints to a GPX route</a></dt><dt>4.18. <a href="#transform_to_trk">Converting a pile of waypoints to a GPX track</a></dt><dt>4.19. <a href="#transform_del">Convert a GPX track to GPX waypoints, tossing the original track</a></dt></dl></div><div class="preface" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="Introduction"></a>Introduction</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#The_Problem">The Problem: Too many incompatible GPS file formats</a></span></dt><dt><span class="section"><a href="#The_Solution">The Solution</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="The_Problem"></a>The Problem: Too many incompatible GPS file formats</h2></div></div></div><p> There are simply too many gratuitously different file formats
 to hold waypoint, track, and route information in various programs
 used by computers and GPS receivers.  
-<a href="http://www.topografix.com/gpx.asp" target="_top">GPX</a>  defines a
+<a class="ulink" href="http://www.topografix.com/gpx.asp" target="_top">GPX</a>  defines a
 standard in XML to contain all the data, but there are too many
-programs that don't understand it yet and too much data that are in an
+programs that don't understand it yet and too much data in 
 alternate formats.
 </p><p>
-Perhaps you have an Explorist 600 and your friend has a StreetPilot 2720.
+Perhaps you have an <a class="link" href="#fmt_magellanx" title="Magellan SD files (as for eXplorist) (magellanx)">Explorist 600</a> and your friend has a <a class="link" href="#fmt_garmin" title="Garmin serial/USB protocol (garmin)">StreetPilot 2720</a>.
 You've collected a a list of your favorite locations as waypoints and you'd
-like to be able to share them.  Unfortunately, his copy of Garmin Mapsource
-won't read data created by your copy of Magellan Directroute.  What you need
+like to be able to share them.  Unfortunately, his copy of <a class="link" href="#fmt_gdb" title="Garmin MapSource - gdb (gdb)">Garmin Mapsource</a>
+won't read data created by your copy of <a class="link" href="#fmt_mapsend" title="Magellan Mapsend (mapsend)">Magellan Mapsend DirectRoute</a>.  What you need
 is a program that converts data bewteen the two programs.
 </p><p>
-But GPSBabel actually does much more...
-</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="The_Solution"></a>The Solution</h2></div></div></div><p> The original author of GPSBabel, <a href="/people/robertlipe.html" target="_top">Robert Lipe</a>, needed to convert waypoints between a couple of formats, so he
-whipped up a converter and based it on an extensible foundation so
-that it was easy to add new formats and made the program freely available. <a href="/people/index.html" target="_top">Many others</a> have contributed to the program since then.</p><p>  Most file formats added so far have taken under 200 
+GPSBabel actually solves that problem for you and much more...
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="The_Solution"></a>The Solution</h2></div></div></div><p> The original author of GPSBabel, <a class="ulink" href="/people/robertlipe.html" target="_top">Robert Lipe</a>, needed to convert waypoints between a couple of formats, so he
+whipped up a converter and designed it upon an extensible foundation so
+that it was easy to add new formats and made the program freely available. <a class="ulink" href="/people/index.html" target="_top">Many others</a> have contributed to the program since then.</p><p>  Most file formats added so far have taken under 200 
        lines of reasonable ISO C so they can be stamped
        out pretty trivially.  Formats that are ASCII text delimited in some
        fixed way can be added with no programming at all via our 
-       <a href="#Styles" title="Appendix C. GPSBabel XCSV Style Files">style</a> mechanism.
+       <a class="link" href="#Styles" title="Appendix C. GPSBabel XCSV Style Files">style</a> mechanism.
        </p></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="Getting_and_Building"></a>Chapter 1. Getting it and Building it</h2></div></div></div><p> 
 GPSBabel is distributed "ready to run" on most common 
 operating systems via the 
-<a href="http://www.gpsbabel.org/download.html" target="_top">download page</a>.
+<a class="ulink" href="http://www.gpsbabel.org/download.html" target="_top">download page</a>.
 </p><p> As GPSBabel runs on a wide variety of operating systems,
 be sure to visit the 
-<a href="http://www.gpsbabel.org/osnotes.html" target="_top">OS-Specific notes</a> for
+<a class="ulink" href="http://www.gpsbabel.org/osnotes.html" target="_top">OS-Specific notes</a> for
 additional information.
 </p><p> 
  For operating systems where no binary is provided or if 
@@ -41,19 +40,19 @@ ISO C89 compilers.  It's been tested on UnixWare, OpenServer, OS/X,
 Linux, Solaris, and a variety of processors and compilers.
 </p><p>
   In most cases, the code is as simple to build as running:
-</p><p><strong class="userinput"><code> ./configure &amp;&amp; make</code></strong></p><p><a href="http://expat.sourceforge.net" target="_top">Expat</a> 
+</p><p><strong class="userinput"><code> ./configure &amp;&amp; make</code></strong></p><p><a class="ulink" href="http://expat.sourceforge.net" target="_top">Expat</a> 
 is strongly recommended for source builds as it is
 required for reading all the XML formats such as GPX.  Fedora users
-may need to 'yum install expat-devel'.  Ubutnu users may need to 
+may need to 'yum install expat-devel'.  Ubuntu users may need to 
 'apt-get install expat libexpat-dev'.
-</p><p><a href="http://libusb.sourceforge.net" target="_top">libusb</a> 
+</p><p><a class="ulink" href="http://libusb.sourceforge.net" target="_top">libusb</a> 
 is recommended for OS/X and Linux if you want to use a USB Garmin.
-Fedora users may need to 'yum install expat-devel'.  Ubutnu users may
+Fedora users may need to 'yum install expat-devel'.  Ubuntu users may
 need to 'apt-get install libusb-dev'.
 </p><p>There are additional flags that can be passed to configure to
  customize your build of GPSBabel.   
 </p><p><strong class="userinput"><code>./configure --help</code></strong></p><p>
-lists all the supported options, but additionally we have:</p><p>
+lists all the supported options, but of interest we have:</p><p>
  <code class="option">--disable-shapefile</code> Excludes the shapefile support.
 </p><p>
  <code class="option">--disable-pdb</code> Excludes the Palm database support and all formats that rely on it.
@@ -64,7 +63,7 @@ lists all the supported options, but additionally we have:</p><p>
 </p><p>
   <code class="option">--enable-efence</code> Activate debugging mode for gpsbabel-debug.
 </p><p>
-  <code class="option">--with-doc=dir</code> Specify that the doc should be created and installed in <code class="option">dir</code>.
+  <code class="option">--with-doc=</code><code class="filename">dir</code> Specifies that the doc should be created and installed in <code class="filename">dir</code>.
 </p><p>
   <code class="option">--without-libusb</code> Disables use of libusb, even it's it's available.
 </p><p>
@@ -73,37 +72,44 @@ lists all the supported options, but additionally we have:</p><p>
 If you're using GPSBabel, you will need to know how to do at least two things:
 read data from a file, and write it to another file.  There are four basic
 options you need to know to do those things:
-</p><div class="segmentedlist"><table border="0"><thead><tr class="segtitle"><th>Command</th><th>Meaning</th></tr></thead><tbody><tr class="seglistitem"><td class="seg"><code class="option">-i</code> <em class="parameter"><code>format</code></em></td><td class="seg">Set input format</td></tr><tr class="seglistitem"><td class="seg"><code class="option">-f</code> <em class="parameter"><code>filename</code></em></td><td class="seg">Read file</td></tr><tr class="seglistitem"><td class="seg"><code class="option">-o</code> <em class="parameter"><code>format</code></em></td><td class="seg">Set output format</td></tr><tr class="seglistitem"><td class="seg"><code class="option">-F</code> <em class="parameter"><code>filename</code></em></td><td class="seg">Write output File</td></tr></tbody></table></div><p>
+</p><div class="segmentedlist"><table border="0"><thead><tr class="segtitle"><th>Command</th><th>Meaning</th></tr></thead><tbody><tr class="seglistitem"><td class="seg"><code class="option">-i</code> <em class="parameter"><code>format</code></em></td><td class="seg">Set input format</td></tr><tr class="seglistitem"><td class="seg"><code class="option">-f</code> <em class="parameter"><code>filename</code></em></td><td class="seg">Read file</td></tr><tr class="seglistitem"><td class="seg"><code class="option">-o</code> <em class="parameter"><code>format</code></em></td><td class="seg">Set output format</td></tr><tr class="seglistitem"><td class="seg"><code class="option">-F</code> <em class="parameter"><code>filename</code></em></td><td class="seg">Write output file</td></tr></tbody></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>
+Case matters.  Notably <code class="option">-f</code> (lowercase) sets the <span class="emphasis"><em>input</em></span> file.  <code class="option"> -F</code> (uppercase) sets the <span class="emphasis"><em>output</em></span> file. 
+</p></div><p>
 The <em class="parameter"><code>format</code></em> parameters in the above list
 refer to the names of formats or file types supported by GPSBabel. 
 </p><p><strong class="userinput"><code>gpsbabel -? </code></strong></p><p>will always show you the supported file types.  In this document, the
-various supported formats are listed in <a href="#The_Formats" title="Chapter 3. The Formats">Chapter 3, <i>The Formats</i></a>.  The 
+various supported formats are listed in <a class="xref" href="#The_Formats" title="Chapter 3. The Formats">Chapter 3, <i>The Formats</i></a>.  The 
 name that you would use on the command line follows the format name in 
 parentheses.
 </p><p>
 Options are <span class="emphasis"><em>always</em></span> processed in order from left to right.
 In practical terms, this means that things you want to read should appear
-in the command before things you want to write.
+in the command before things you want to write.   This sometimes surprises
+new users as adding options to turn on debugging at the end, for example, 
+doesn't work as the debugging is turned on after all the interesting work is
+done.   The reason for this strict ordering becomes more apparent once you
+learn about mixing formats and filters.
 </p><p>
 The <em class="parameter"><code>filename</code></em> parameters specify the 
 name of a file to be read or written.
 </p><p>To use
-         this program, just tell it what you're reading, where to read
+         GPSBabel in its simplest form, just tell it what you're reading, where to read
          it from, what you're writing, and what to write it to.  For
          example:</p><p><strong class="userinput"><code>gpsbabel -i geo -f /tmp/geocaching.loc -o gpx -F /tmp/geocaching.gpx</code></strong></p><p>tells it to read the file <code class="filename">/tmp/geocaching.loc</code> in geocaching.com
-         format and create a new file <code class="filename">/tmp/geocaching.gpx</code> in GPX format.   It's important to note that the names have nothign to do with the formats actually used.</p><p> This command will read from a Magellan unit attached
+         format and create a new file <code class="filename">/tmp/geocaching.gpx</code> in GPX format.   It's important to note that the names have nothing to do with the formats actually used.</p><p> This command will read from a Magellan unit attached
          to the first serial port on a Linux system (device names will
-         vary on other OSes) and write them as a geocaching loc file.</p><p><strong class="userinput"><code>gpsbabel -i magellan -f /dev/ttyS0 -o geo -F mag.loc</code></strong></p><p>This second command does the same on Microsoft Windows.</p><p><strong class="userinput"><code>gpsbabel -i magellan -f com1 -o geo -F mag.loc</code></strong></p><p>Optionally, you may specify <em class="parameter"><code>-s</code></em> in any command line.  This
+         vary on other OSes; typically COMx: on WIndows) and write them as a geocaching loc file.</p><div class="example"><a id="id2737478"></a><p class="title"><b>Example 2.1. Command showing Linux download from Magellan serial and writing to .loc file</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -i magellan -f /dev/ttyS0 -o geo -F mag.loc</code></strong></p></div></div><br class="example-break" /><p>This second command does the same on Microsoft Windows.</p><div class="example"><a id="id2737497"></a><p class="title"><b>Example 2.2. Command showing Windows download from Magellan serial and writing to .loc file</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -i magellan -f com1 -o geo -F mag.loc</code></strong></p></div></div><br class="example-break" /><p>Optionally, you may specify <em class="parameter"><code>-s</code></em> in any command line.  This
          causes the program to ignore any "short" names that may be
          present in the source data format and synthesize one from the
          long name.  This is particularly useful if you're writing to
          a target format that isn't the lowest common denominator but
          the source data was written for the lowest common
-         denominator.  I use this for writing data from geocaching.com
-         to my Magellan so my waypoints have "real" names instead of
-         the 'GC1234' ones that are optimized for NMEA-only receivers.
-         A geocacher with a Magellan receiver may thus find commands
-         like this useful.</p><p><strong class="userinput"><code>gpsbabel -s -i geo -f geocaching.loc -o magellan -F /dev/ttyS0  </code></strong></p><p><strong class="userinput"><code>gpsbabel -s -i geo -f geocaching.loc -o magellan -F com1</code></strong></p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="Suboptions"></a>Suboptions</h2></div></div></div><p>
+         denominator.  This is useful for writing data from geocaching.com
+         to a GPS so my waypoints have "real" names instead of
+         the 'GC1234' ones that are optimized for receivers of the lowest 
+       common denominator.
+         A geocacher using Linux with a Magellan receiver may thus find commands
+         like this useful.</p><p><strong class="userinput"><code>gpsbabel -s -i geo -f geocaching.loc -o magellan -F /dev/ttyS0  </code></strong></p><p>His counterpart on Windows will find this equivalent</p><p><strong class="userinput"><code>gpsbabel -s -i geo -f geocaching.loc -o magellan -F com1</code></strong></p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="Suboptions"></a>Suboptions</h2></div></div></div><p>
          Many of the available format options in GPSBabel can themselves
          take options.   While we try to make all the formats do the most
          sensible thing possible without any extra options; this allows
@@ -111,7 +117,7 @@ name of a file to be read or written.
        </p><p>
          Suboptions are comma separated and immediately follow the option
          itself. The available suboptions are listed on the individual 
-         format pages.  We'll make an example from <a href="#fmt_kml" title="Google Earth (Keyhole) Markup Language (kml)">the section called “Google Earth (Keyhole) Markup Language (kml)”</a>:
+         format pages.  We'll make an example from <a class="xref" href="#fmt_kml" title="Google Earth (Keyhole) Markup Language (kml)">the section called “Google Earth (Keyhole) Markup Language (kml)”</a>:
        </p><p><strong class="userinput"><code>gpsbabel -i gpx -f file.gpx -o kml,deficon="file://myicon.png",lines=0 -F one.kml -o kml -F two.kml</code></strong></p><p>
        This command will read the GPX file <code class="filename">file.gpx</code>
        and create two KML files.    <code class="filename">one.kml</code> will
@@ -128,19 +134,18 @@ name of a file to be read or written.
 line and are translated internally into a pipeline that data flows
 through when executed. Normally one would: </p><table class="simplelist" border="0" summary="Simple list"><tr><td>read from one input</td></tr><tr><td>optionally apply filters </td></tr><tr><td>write into one output</td></tr></table><p> but GPSBabel is flexible enough to allow more complicated
 operations such as reading from several files (potentially of
-different types), applying a filter, reading more data, then write the
+different types), applying a filter, reading more data, then writing the
 merged data to multiple destinations.
 </p><p>The input file type remains unchanged until a new
          <em class="parameter"><code>-i</code></em> argument is seen.
          Files are read in the order they appear. So you could merge
-         three input files into one output file with: </p><p><strong class="userinput"><code>gpsbabel -i geo -f 1.loc -f 2.loc -f 3.loc -o geo -F big.loc</code></strong></p><p>You can merge files of different types:</p><p><strong class="userinput"><code>gpsbabel  -i geo -f 1.loc -i gpx -f 2.gpx -i pcx 3.pcx  
--o gpsutil -F big.gps</code></strong></p><p> You can write the same data in different output formats:</p><p><strong class="userinput"><code>gpsbabel -i geo -f 1.loc -o gpx -F 1.gpx -o pcx -F 1.wpt</code></strong></p><p>If you want to change the character set of input or/and
+         three input files into one output file with: </p><div class="example"><a id="id2737666"></a><p class="title"><b>Example 2.3. Merging multiple files into one</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -i geo -f 1.loc -f 2.loc -f 3.loc -o geo -F big.loc</code></strong></p></div></div><br class="example-break" /><p>You can merge files of different types:</p><div class="example"><a id="id2737685"></a><p class="title"><b>Example 2.4. Merging multiple files of differing types.</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel  -i geo -f 1.loc -i gpx -f 2.gpx -i pcx 3.pcx  -o gpsutil -F big.gps</code></strong></p></div></div><br class="example-break" /><div class="example"><a id="id2737700"></a><p class="title"><b>Example 2.5. Writing the same data in multiple output formats.</b></p><div class="example-contents"><p> You can write the same data in different output formats:</p><p><strong class="userinput"><code>gpsbabel -i geo -f 1.loc -o gpx -F 1.gpx -o pcx -F 1.wpt</code></strong></p></div></div><br class="example-break" /><p>If you want to change the character set of input or/and
          output side you can do this with the option <code class="option">-c
          &lt;character set&gt;</code>. You can get a complete list
          of supported character sets with "gpsbabel -l".  To change
          the character set on both sides you should do this:</p><p><strong class="userinput"><code>gpsbabel -i xcsv,style=foo.style -c latin1 -f foo -o xcsv,style=bar.style -c ms-ansi -F bar</code></strong></p><p>Note, that some formats have a fixed character set and ignore this option.</p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="Route_And_Track_Modes"></a>Route and Track Modes</h2></div></div></div><p> Most formats supported by GPSBabel will make a reasonable attempt to work
          transparently with waypoints, tracks, and routes.  Some
-         formats, like <a href="#fmt_garmin" title="Garmin serial/USB protocol (garmin)">garmin</a> and <a href="#fmt_magellan" title="Magellan SD files (as for Meridian) (magellan)">magellan</a> require the <em class="parameter"><code>-t</code></em> flag to work with tracks and
+         formats, like <a class="link" href="#fmt_garmin" title="Garmin serial/USB protocol (garmin)">garmin</a> and <a class="link" href="#fmt_magellan" title="Magellan SD files (as for Meridian) (magellan)">magellan</a> require the <em class="parameter"><code>-t</code></em> flag to work with tracks and
          <em class="parameter"><code>-r</code></em> to work with
          routes. <em class="parameter"><code>-w</code></em> is for
          waypoints, and is the default. So if you wanted to read all
@@ -182,9 +187,9 @@ merged data to multiple destinations.
       with '#' or ';' will be treated as comments and ignored.
     </p><p>
        There are three optional sections.
-       </p><div class="itemizedlist"><ul type="disc"><li><p>"Common format settings"</p><p>  Any option from any of the formats listed here will be used by
+       </p><div class="itemizedlist"><ul type="disc"><li><p>Common format settings.</p><p>  Any option from any of the formats listed here will be used by
                GPSBabel unless explictly provided on the command line.
-       </p></li><li><p>"Common filter settings"</p><p>As above, but for filters.</p></li><li><p>Garmin categories</p><p>This allows you to give readable names to the numeric categories
+       </p></li><li><p>Common filter settings.</p><p>As above, but for filters.</p></li><li><p>Garmin categories</p><p>This allows you to give readable names to the numeric categories
        used internally in some Garmin devices and the Mapsource formats
        such as GDB and MPS.  This is information is also used by our GPX 
        and garmin_txt formats as well.</p></li></ul></div><p>
@@ -205,7 +210,7 @@ merged data to multiple destinations.
          inputs. KML, NMEA, and the variou XCSV formats are supported on 
          output.   Additional formats may be added by interested parties 
          later.
-    </p><p><strong class="userinput"><code>gpsbabel -T -i garmin -f usb: -o kml -F xxx.kml</code></strong></p><p>
+    </p><div class="example"><a id="id2738059"></a><p class="title"><b>Example 2.6. Read realtime positioning from Garmin USB, write to Keyhole Markup</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -T -i garmin -f usb: -o kml -F xxx.kml</code></strong></p></div></div><br class="example-break" /><p>
          Will read the USB-connected Garmin and rewrite 'xxx.kml' atomically,
          suitable for a self-refreshing network link in Google Earth.
     </p></div><div class="sect1" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="batchfile"></a>Batch mode (command files)</h2></div></div></div><p>
@@ -220,7 +225,7 @@ merged data to multiple destinations.
   by placing the input and filtering directives in a file called 'all_my_files'.
   </p><p><strong class="userinput"><code>gpsbabel -b all_my_files -o gdb -F all_my_tracks.gdb</code></strong></p><p>
     'all_my_files' could look like this:
-  </p><table class="simplelist" border="0" summary="Simple list"><tr><td>-i gpx</td></tr><tr><td>-f saxony_in_summer_2004.gpx -f austria_2005.gpx</td></tr><tr><td>-i gdb</td></tr><tr><td>-f croatia_2006.gdb</td></tr><tr><td>-x nuketypes,waypoints,routes</td></tr><tr><td>-x track,pack,split,title="LOG # %Y%m%d"</td></tr></table></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="The_Formats"></a>Chapter 3. The Formats</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#fmt_xcsv">? Character Separated Values (xcsv)</a></span></dt><dt><span class="section"><a href="#fmt_alantrl">Alan Map500 tracklogs (.trl) (alantrl)</a></span></dt><dt><span class="section"><a href="#fmt_alanwpr">Alan Map500 waypoints and routes (.wpr) (alanwpr)</a></span></dt><dt><span class="section"><a href="#fmt_tabsep">All database fields on one tab-separated line (tabsep)</a></span></dt><dt><span class="section"><a href="#fmt_baroiq">Brauniger IQ Series Barograph Download (baroiq)</a></span></dt><dt><span class="section"><a href="#fmt_cambridge">Cambridge/Winpilot glider software (cambridge)</a></span></dt><dt><span class="section"><a href="#fmt_cst">CarteSurTable data file (cst)</a></span></dt><dt><span class="section"><a href="#fmt_cetus">Cetus for Palm/OS (cetus)</a></span></dt><dt><span class="section"><a href="#fmt_coastexp">CoastalExplorer XML (coastexp)</a></span></dt><dt><span class="section"><a href="#fmt_csv">Comma separated values (csv)</a></span></dt><dt><span class="section"><a href="#fmt_compegps">CompeGPS data files (.wpt/.trk/.rte) (compegps)</a></span></dt><dt><span class="section"><a href="#fmt_copilot">CoPilot Flight Planner for Palm/OS (copilot)</a></span></dt><dt><span class="section"><a href="#fmt_coto">cotoGPS for Palm/OS (coto)</a></span></dt><dt><span class="section"><a href="#fmt_custom">Custom "Everything" Style (custom)</a></span></dt><dt><span class="section"><a href="#fmt_axim_gpb">Dell Axim Navigation System (.gpb) file format (axim_gpb)</a></span></dt><dt><span class="section"><a href="#fmt_an1">DeLorme .an1 (drawing) file (an1)</a></span></dt><dt><span class="section"><a href="#fmt_gpl">DeLorme GPL (gpl)</a></span></dt><dt><span class="section"><a href="#fmt_saplus">DeLorme Street Atlas Plus (saplus)</a></span></dt><dt><span class="section"><a href="#fmt_saroute">DeLorme Street Atlas Route (saroute)</a></span></dt><dt><span class="section"><a href="#fmt_xmap">DeLorme XMap HH Native .WPT (xmap)</a></span></dt><dt><span class="section"><a href="#fmt_xmap2006">DeLorme XMap/SAHH 2006 Native .TXT (xmap2006)</a></span></dt><dt><span class="section"><a href="#fmt_xmapwpt">DeLorme XMat HH Street Atlas USA .WPT (PPC) (xmapwpt)</a></span></dt><dt><span class="section"><a href="#fmt_easygps">EasyGPS binary format (easygps)</a></span></dt><dt><span class="section"><a href="#fmt_igc">FAI/IGC Flight Recorder Data Format (igc)</a></span></dt><dt><span class="section"><a href="#fmt_gpssim">Franson GPSGate Simulation (gpssim)</a></span></dt><dt><span class="section"><a href="#fmt_fugawi">Fugawi (fugawi)</a></span></dt><dt><span class="section"><a href="#fmt_g7towin">G7ToWin data files (.g7t) (g7towin)</a></span></dt><dt><span class="section"><a href="#fmt_garmin301">Garmin 301 Custom position and heartrate (garmin301)</a></span></dt><dt><span class="section"><a href="#fmt_glogbook">Garmin Logbook XML (glogbook)</a></span></dt><dt><span class="section"><a href="#fmt_gdb">Garmin MapSource - gdb (gdb)</a></span></dt><dt><span class="section"><a href="#fmt_mapsource">Garmin MapSource - mps (mapsource)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_txt">Garmin MapSource - txt (tab delimited) (garmin_txt)</a></span></dt><dt><span class="section"><a href="#fmt_pcx">Garmin PCX5 (pcx)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_poi">Garmin POI database (garmin_poi)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_gpi">Garmin Points of Interest (.gpi) (garmin_gpi)</a></span></dt><dt><span class="section"><a href="#fmt_garmin">Garmin serial/USB protocol (garmin)</a></span></dt><dt><span class="section"><a href="#fmt_gtrnctr">Garmin Training Centerxml (gtrnctr)</a></span></dt><dt><span class="section"><a href="#fmt_geo">Geocaching.com .loc (geo)</a></span></dt><dt><span class="section"><a href="#fmt_gcdb">GeocachingDB for Palm/OS (gcdb)</a></span></dt><dt><span class="section"><a href="#fmt_ggv_log">Geogrid Viewer tracklogs (.log) (ggv_log)</a></span></dt><dt><span class="section"><a href="#fmt_geonet">GEOnet Names Server (GNS) (geonet)</a></span></dt><dt><span class="section"><a href="#fmt_geoniche">GeoNiche .pdb (geoniche)</a></span></dt><dt><span class="section"><a href="#fmt_kml">Google Earth (Keyhole) Markup Language (kml)</a></span></dt><dt><span class="section"><a href="#fmt_google">Google Maps XML (google)</a></span></dt><dt><span class="section"><a href="#fmt_gpilots">GpilotS (gpilots)</a></span></dt><dt><span class="section"><a href="#fmt_gtm">GPS TrackMaker (gtm)</a></span></dt><dt><span class="section"><a href="#fmt_arc">GPSBabel arc filter file (arc)</a></span></dt><dt><span class="section"><a href="#fmt_gpsdrive">GpsDrive Format (gpsdrive)</a></span></dt><dt><span class="section"><a href="#fmt_gpsdrivetrack">GpsDrive Format for Tracks (gpsdrivetrack)</a></span></dt><dt><span class="section"><a href="#fmt_gpsman">GPSman (gpsman)</a></span></dt><dt><span class="section"><a href="#fmt_gpspilot">GPSPilot Tracker for Palm/OS (gpspilot)</a></span></dt><dt><span class="section"><a href="#fmt_gpsutil">gpsutil (gpsutil)</a></span></dt><dt><span class="section"><a href="#fmt_gpx">GPX XML (gpx)</a></span></dt><dt><span class="section"><a href="#fmt_hiketech">HikeTech (hiketech)</a></span></dt><dt><span class="section"><a href="#fmt_holux">Holux (gm-100) .wpo Format (holux)</a></span></dt><dt><span class="section"><a href="#fmt_hsandv">HSA Endeavour Navigator export File (hsandv)</a></span></dt><dt><span class="section"><a href="#fmt_html">HTML Output (html)</a></span></dt><dt><span class="section"><a href="#fmt_ignrando">IGN Rando track files (ignrando)</a></span></dt><dt><span class="section"><a href="#fmt_ktf2">Kartex 5 Track File (ktf2)</a></span></dt><dt><span class="section"><a href="#fmt_kwf2">Kartex 5 Waypoint File (kwf2)</a></span></dt><dt><span class="section"><a href="#fmt_kompass_tk">Kompass (DAV) Track (.tk) (kompass_tk)</a></span></dt><dt><span class="section"><a href="#fmt_kompass_wp">Kompass (DAV) Waypoints (.wp) (kompass_wp)</a></span></dt><dt><span class="section"><a href="#fmt_psitrex">KuDaTa PsiTrex text (psitrex)</a></span></dt><dt><span class="section"><a href="#fmt_lowranceusr">Lowrance USR (lowranceusr)</a></span></dt><dt><span class="section"><a href="#fmt_maggeo">Magellan Explorist Geocaching (maggeo)</a></span></dt><dt><span class="section"><a href="#fmt_mapsend">Magellan Mapsend (mapsend)</a></span></dt><dt><span class="section"><a href="#fmt_magnav">Magellan NAV Companion for Palm/OS (magnav)</a></span></dt><dt><span class="section"><a href="#fmt_magellanx">Magellan SD files (as for eXplorist) (magellanx)</a></span></dt><dt><span class="section"><a href="#fmt_magellan">Magellan SD files (as for Meridian) (magellan)</a></span></dt><dt><span class="section"><a href="#fmt_magellan1">Magellan serial protocol (magellan)</a></span></dt><dt><span class="section"><a href="#fmt_tef">Map&amp;Guide 'TourExchangeFormat' XML (tef)</a></span></dt><dt><span class="section"><a href="#fmt_mag_pdb">Map&amp;Guide to Palm/OS exported files (.pdb) (mag_pdb)</a></span></dt><dt><span class="section"><a href="#fmt_mapconverter">Mapopolis.com Mapconverter CSV (mapconverter)</a></span></dt><dt><span class="section"><a href="#fmt_mxf">MapTech Exchange Format (mxf)</a></span></dt><dt><span class="section"><a href="#fmt_msroute">Microsoft AutoRoute 2002 (pin/route reader) (msroute)</a></span></dt><dt><span class="section"><a href="#fmt_msroute1">Microsoft Streets and Trips (pin/route reader) (msroute)</a></span></dt><dt><span class="section"><a href="#fmt_s_and_t">Microsoft Streets and Trips 2002-2006 (s_and_t)</a></span></dt><dt><span class="section"><a href="#fmt_bcr">Motorrad Routenplaner (Map&amp;Guide) .bcr files (bcr)</a></span></dt><dt><span class="section"><a href="#fmt_psp">MS PocketStreets 2002 Pushpin (psp)</a></span></dt><dt><span class="section"><a href="#fmt_tpg">National Geographic Topo .tpg (waypoints) (tpg)</a></span></dt><dt><span class="section"><a href="#fmt_tpo2">National Geographic Topo 2.x .tpo (tpo2)</a></span></dt><dt><span class="section"><a href="#fmt_tpo3">National Geographic Topo 3.x/4.x .tpo (tpo3)</a></span></dt><dt><span class="section"><a href="#fmt_navicache">Navicache.com XML (navicache)</a></span></dt><dt><span class="section"><a href="#fmt_nmn4">Navigon Mobile Navigator .rte files (nmn4)</a></span></dt><dt><span class="section"><a href="#fmt_dna">Navitrak DNA marker format (dna)</a></span></dt><dt><span class="section"><a href="#fmt_netstumbler">NetStumbler Summary File (text) (netstumbler)</a></span></dt><dt><span class="section"><a href="#fmt_nima">NIMA/GNIS Geographic Names File (nima)</a></span></dt><dt><span class="section"><a href="#fmt_nmea">NMEA 0183 sentences (nmea)</a></span></dt><dt><span class="section"><a href="#fmt_ozi">OziExplorer (ozi)</a></span></dt><dt><span class="section"><a href="#fmt_palmdoc">PalmDoc Output (palmdoc)</a></span></dt><dt><span class="section"><a href="#fmt_pathaway">PathAway Database for Palm/OS (pathaway)</a></span></dt><dt><span class="section"><a href="#fmt_quovadis">Quovadis (quovadis)</a></span></dt><dt><span class="section"><a href="#fmt_raymarine">Raymarine Waypoint File (.rwf) (raymarine)</a></span></dt><dt><span class="section"><a href="#fmt_cup">See You flight analysis data (cup)</a></span></dt><dt><span class="section"><a href="#fmt_sportsim">Sportsim track files (part of zipped .ssz files) (sportsim)</a></span></dt><dt><span class="section"><a href="#fmt_stmsdf">Suunto Trek Manager (STM) .sdf files (stmsdf)</a></span></dt><dt><span class="section"><a href="#fmt_stmwpp">Suunto Trek Manager (STM) WaypointPlus files (stmwpp)</a></span></dt><dt><span class="section"><a href="#fmt_openoffice">Tab delimited fields useful for OpenOffice, Ploticus etc. (openoffice)</a></span></dt><dt><span class="section"><a href="#fmt_text">Textual Output (text)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom_itn">TomTom Itineraries (.itn) (tomtom_itn)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom_asc">TomTom POI file (.asc) (tomtom_asc)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom">TomTom POI file (.ov2) (tomtom)</a></span></dt><dt><span class="section"><a href="#fmt_tmpro">TopoMapPro Places File (tmpro)</a></span></dt><dt><span class="section"><a href="#fmt_dmtlog">TrackLogs digital mapping (.trl) (dmtlog)</a></span></dt><dt><span class="section"><a href="#fmt_tiger">U.S. Census Bureau Tiger Mapping Service (tiger)</a></span></dt><dt><span class="section"><a href="#fmt_unicsv">Universal csv with field structure in first line (unicsv)</a></span></dt><dt><span class="section"><a href="#fmt_vcard">Vcard Output (for iPod) (vcard)</a></span></dt><dt><span class="section"><a href="#fmt_vitosmt">Vito Navigator II tracks (vitosmt)</a></span></dt><dt><span class="section"><a href="#fmt_vitovtt">Vito SmartMap tracks (.vtt) (vitovtt)</a></span></dt><dt><span class="section"><a href="#fmt_wfff">WiFiFoFum 2.0 for PocketPC XML (wfff)</a></span></dt><dt><span class="section"><a href="#fmt_wbt-bin">Wintec WBT-100/200 Binary File Format (wbt-bin)</a></span></dt><dt><span class="section"><a href="#fmt_wbt">Wintec WBT-100/200 GPS Download (wbt)</a></span></dt><dt><span class="section"><a href="#fmt_wbt-tk1">Wintec WBT-201/G-Rays 2 Binary File Format (wbt-tk1)</a></span></dt><dt><span class="section"><a href="#fmt_yahoo">Yahoo Geocode API data (yahoo)</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_xcsv"></a>? Character Separated Values (xcsv)</h2></div></div></div><p class="fmtcapshdr">
+  </p><table class="simplelist" border="0" summary="Simple list"><tr><td>-i gpx</td></tr><tr><td>-f saxony_in_summer_2004.gpx -f austria_2005.gpx</td></tr><tr><td>-i gdb</td></tr><tr><td>-f croatia_2006.gdb</td></tr><tr><td>-x nuketypes,waypoints,routes</td></tr><tr><td>-x track,pack,split,title="LOG # %Y%m%d"</td></tr></table></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="The_Formats"></a>Chapter 3. The Formats</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#fmt_xcsv">? Character Separated Values (xcsv)</a></span></dt><dt><span class="section"><a href="#fmt_alantrl">Alan Map500 tracklogs (.trl) (alantrl)</a></span></dt><dt><span class="section"><a href="#fmt_alanwpr">Alan Map500 waypoints and routes (.wpr) (alanwpr)</a></span></dt><dt><span class="section"><a href="#fmt_tabsep">All database fields on one tab-separated line (tabsep)</a></span></dt><dt><span class="section"><a href="#fmt_baroiq">Brauniger IQ Series Barograph Download (baroiq)</a></span></dt><dt><span class="section"><a href="#fmt_cambridge">Cambridge/Winpilot glider software (cambridge)</a></span></dt><dt><span class="section"><a href="#fmt_cst">CarteSurTable data file (cst)</a></span></dt><dt><span class="section"><a href="#fmt_cetus">Cetus for Palm/OS (cetus)</a></span></dt><dt><span class="section"><a href="#fmt_coastexp">CoastalExplorer XML (coastexp)</a></span></dt><dt><span class="section"><a href="#fmt_csv">Comma separated values (csv)</a></span></dt><dt><span class="section"><a href="#fmt_compegps">CompeGPS data files (.wpt/.trk/.rte) (compegps)</a></span></dt><dt><span class="section"><a href="#fmt_copilot">CoPilot Flight Planner for Palm/OS (copilot)</a></span></dt><dt><span class="section"><a href="#fmt_coto">cotoGPS for Palm/OS (coto)</a></span></dt><dt><span class="section"><a href="#fmt_custom">Custom "Everything" Style (custom)</a></span></dt><dt><span class="section"><a href="#fmt_axim_gpb">Dell Axim Navigation System (.gpb) file format (axim_gpb)</a></span></dt><dt><span class="section"><a href="#fmt_an1">DeLorme .an1 (drawing) file (an1)</a></span></dt><dt><span class="section"><a href="#fmt_gpl">DeLorme GPL (gpl)</a></span></dt><dt><span class="section"><a href="#fmt_saplus">DeLorme Street Atlas Plus (saplus)</a></span></dt><dt><span class="section"><a href="#fmt_saroute">DeLorme Street Atlas Route (saroute)</a></span></dt><dt><span class="section"><a href="#fmt_xmap">DeLorme XMap HH Native .WPT (xmap)</a></span></dt><dt><span class="section"><a href="#fmt_xmap2006">DeLorme XMap/SAHH 2006 Native .TXT (xmap2006)</a></span></dt><dt><span class="section"><a href="#fmt_xmapwpt">DeLorme XMat HH Street Atlas USA .WPT (PPC) (xmapwpt)</a></span></dt><dt><span class="section"><a href="#fmt_destinator_itn">Destinator Itineraries (.dat) (destinator_itn)</a></span></dt><dt><span class="section"><a href="#fmt_destinator_poi">Destinator Points of Interest (.dat) (destinator_poi)</a></span></dt><dt><span class="section"><a href="#fmt_destinator_trl">Destinator TrackLogs (.dat) (destinator_trl)</a></span></dt><dt><span class="section"><a href="#fmt_easygps">EasyGPS binary format (easygps)</a></span></dt><dt><span class="section"><a href="#fmt_exif">Embedded Exif-GPS data (.jpg) (exif)</a></span></dt><dt><span class="section"><a href="#fmt_igc">FAI/IGC Flight Recorder Data Format (igc)</a></span></dt><dt><span class="section"><a href="#fmt_gpssim">Franson GPSGate Simulation (gpssim)</a></span></dt><dt><span class="section"><a href="#fmt_fugawi">Fugawi (fugawi)</a></span></dt><dt><span class="section"><a href="#fmt_g7towin">G7ToWin data files (.g7t) (g7towin)</a></span></dt><dt><span class="section"><a href="#fmt_garmin301">Garmin 301 Custom position and heartrate (garmin301)</a></span></dt><dt><span class="section"><a href="#fmt_glogbook">Garmin Logbook XML (glogbook)</a></span></dt><dt><span class="section"><a href="#fmt_gdb">Garmin MapSource - gdb (gdb)</a></span></dt><dt><span class="section"><a href="#fmt_mapsource">Garmin MapSource - mps (mapsource)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_txt">Garmin MapSource - txt (tab delimited) (garmin_txt)</a></span></dt><dt><span class="section"><a href="#fmt_pcx">Garmin PCX5 (pcx)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_poi">Garmin POI database (garmin_poi)</a></span></dt><dt><span class="section"><a href="#fmt_garmin_gpi">Garmin Points of Interest (.gpi) (garmin_gpi)</a></span></dt><dt><span class="section"><a href="#fmt_garmin">Garmin serial/USB protocol (garmin)</a></span></dt><dt><span class="section"><a href="#fmt_gtrnctr">Garmin Training Centerxml (gtrnctr)</a></span></dt><dt><span class="section"><a href="#fmt_geo">Geocaching.com .loc (geo)</a></span></dt><dt><span class="section"><a href="#fmt_gcdb">GeocachingDB for Palm/OS (gcdb)</a></span></dt><dt><span class="section"><a href="#fmt_ggv_log">Geogrid Viewer tracklogs (.log) (ggv_log)</a></span></dt><dt><span class="section"><a href="#fmt_geonet">GEOnet Names Server (GNS) (geonet)</a></span></dt><dt><span class="section"><a href="#fmt_geoniche">GeoNiche .pdb (geoniche)</a></span></dt><dt><span class="section"><a href="#fmt_dg-100">GlobalSat DG-100/BT-335 Download (dg-100)</a></span></dt><dt><span class="section"><a href="#fmt_kml">Google Earth (Keyhole) Markup Language (kml)</a></span></dt><dt><span class="section"><a href="#fmt_google">Google Maps XML (google)</a></span></dt><dt><span class="section"><a href="#fmt_gpilots">GpilotS (gpilots)</a></span></dt><dt><span class="section"><a href="#fmt_gtm">GPS TrackMaker (gtm)</a></span></dt><dt><span class="section"><a href="#fmt_arc">GPSBabel arc filter file (arc)</a></span></dt><dt><span class="section"><a href="#fmt_gpsdrive">GpsDrive Format (gpsdrive)</a></span></dt><dt><span class="section"><a href="#fmt_gpsdrivetrack">GpsDrive Format for Tracks (gpsdrivetrack)</a></span></dt><dt><span class="section"><a href="#fmt_gpsman">GPSman (gpsman)</a></span></dt><dt><span class="section"><a href="#fmt_gpspilot">GPSPilot Tracker for Palm/OS (gpspilot)</a></span></dt><dt><span class="section"><a href="#fmt_gpsutil">gpsutil (gpsutil)</a></span></dt><dt><span class="section"><a href="#fmt_gpx">GPX XML (gpx)</a></span></dt><dt><span class="section"><a href="#fmt_hiketech">HikeTech (hiketech)</a></span></dt><dt><span class="section"><a href="#fmt_holux">Holux (gm-100) .wpo Format (holux)</a></span></dt><dt><span class="section"><a href="#fmt_hsandv">HSA Endeavour Navigator export File (hsandv)</a></span></dt><dt><span class="section"><a href="#fmt_html">HTML Output (html)</a></span></dt><dt><span class="section"><a href="#fmt_ignrando">IGN Rando track files (ignrando)</a></span></dt><dt><span class="section"><a href="#fmt_ktf2">Kartex 5 Track File (ktf2)</a></span></dt><dt><span class="section"><a href="#fmt_kwf2">Kartex 5 Waypoint File (kwf2)</a></span></dt><dt><span class="section"><a href="#fmt_kompass_tk">Kompass (DAV) Track (.tk) (kompass_tk)</a></span></dt><dt><span class="section"><a href="#fmt_kompass_wp">Kompass (DAV) Waypoints (.wp) (kompass_wp)</a></span></dt><dt><span class="section"><a href="#fmt_psitrex">KuDaTa PsiTrex text (psitrex)</a></span></dt><dt><span class="section"><a href="#fmt_lowranceusr">Lowrance USR (lowranceusr)</a></span></dt><dt><span class="section"><a href="#fmt_maggeo">Magellan Explorist Geocaching (maggeo)</a></span></dt><dt><span class="section"><a href="#fmt_mapsend">Magellan Mapsend (mapsend)</a></span></dt><dt><span class="section"><a href="#fmt_magnav">Magellan NAV Companion for Palm/OS (magnav)</a></span></dt><dt><span class="section"><a href="#fmt_magellanx">Magellan SD files (as for eXplorist) (magellanx)</a></span></dt><dt><span class="section"><a href="#fmt_magellan">Magellan SD files (as for Meridian) (magellan)</a></span></dt><dt><span class="section"><a href="#fmt_magellan1">Magellan serial protocol (magellan)</a></span></dt><dt><span class="section"><a href="#fmt_ik3d">MagicMaps IK3D project file (.ikt) (ik3d)</a></span></dt><dt><span class="section"><a href="#fmt_tef">Map&amp;Guide 'TourExchangeFormat' XML (tef)</a></span></dt><dt><span class="section"><a href="#fmt_mag_pdb">Map&amp;Guide to Palm/OS exported files (.pdb) (mag_pdb)</a></span></dt><dt><span class="section"><a href="#fmt_mapconverter">Mapopolis.com Mapconverter CSV (mapconverter)</a></span></dt><dt><span class="section"><a href="#fmt_mxf">MapTech Exchange Format (mxf)</a></span></dt><dt><span class="section"><a href="#fmt_msroute">Microsoft AutoRoute 2002 (pin/route reader) (msroute)</a></span></dt><dt><span class="section"><a href="#fmt_msroute1">Microsoft Streets and Trips (pin/route reader) (msroute)</a></span></dt><dt><span class="section"><a href="#fmt_s_and_t">Microsoft Streets and Trips 2002-2007 (s_and_t)</a></span></dt><dt><span class="section"><a href="#fmt_bcr">Motorrad Routenplaner (Map&amp;Guide) .bcr files (bcr)</a></span></dt><dt><span class="section"><a href="#fmt_psp">MS PocketStreets 2002 Pushpin (psp)</a></span></dt><dt><span class="section"><a href="#fmt_mtk-bin">MTK Logger (iBlue 747,...) Binary File Format (mtk-bin)</a></span></dt><dt><span class="section"><a href="#fmt_mtk">MTK Logger (iBlue 747,Qstarz BT-1000,...) download (mtk)</a></span></dt><dt><span class="section"><a href="#fmt_tpg">National Geographic Topo .tpg (waypoints) (tpg)</a></span></dt><dt><span class="section"><a href="#fmt_tpo2">National Geographic Topo 2.x .tpo (tpo2)</a></span></dt><dt><span class="section"><a href="#fmt_tpo3">National Geographic Topo 3.x/4.x .tpo (tpo3)</a></span></dt><dt><span class="section"><a href="#fmt_navicache">Navicache.com XML (navicache)</a></span></dt><dt><span class="section"><a href="#fmt_nmn4">Navigon Mobile Navigator .rte files (nmn4)</a></span></dt><dt><span class="section"><a href="#fmt_navilink">NaviGPS GT-11/BGT-11 Download (navilink)</a></span></dt><dt><span class="section"><a href="#fmt_dna">Navitrak DNA marker format (dna)</a></span></dt><dt><span class="section"><a href="#fmt_netstumbler">NetStumbler Summary File (text) (netstumbler)</a></span></dt><dt><span class="section"><a href="#fmt_nima">NIMA/GNIS Geographic Names File (nima)</a></span></dt><dt><span class="section"><a href="#fmt_nmea">NMEA 0183 sentences (nmea)</a></span></dt><dt><span class="section"><a href="#fmt_lmx">Nokia Landmark Exchange (lmx)</a></span></dt><dt><span class="section"><a href="#fmt_osm">OpenStreetMap data files (osm)</a></span></dt><dt><span class="section"><a href="#fmt_ozi">OziExplorer (ozi)</a></span></dt><dt><span class="section"><a href="#fmt_palmdoc">PalmDoc Output (palmdoc)</a></span></dt><dt><span class="section"><a href="#fmt_pathaway">PathAway Database for Palm/OS (pathaway)</a></span></dt><dt><span class="section"><a href="#fmt_quovadis">Quovadis (quovadis)</a></span></dt><dt><span class="section"><a href="#fmt_raymarine">Raymarine Waypoint File (.rwf) (raymarine)</a></span></dt><dt><span class="section"><a href="#fmt_cup">See You flight analysis data (cup)</a></span></dt><dt><span class="section"><a href="#fmt_sportsim">Sportsim track files (part of zipped .ssz files) (sportsim)</a></span></dt><dt><span class="section"><a href="#fmt_stmsdf">Suunto Trek Manager (STM) .sdf files (stmsdf)</a></span></dt><dt><span class="section"><a href="#fmt_stmwpp">Suunto Trek Manager (STM) WaypointPlus files (stmwpp)</a></span></dt><dt><span class="section"><a href="#fmt_xol">Swiss Map # (.xol) format (xol)</a></span></dt><dt><span class="section"><a href="#fmt_openoffice">Tab delimited fields useful for OpenOffice, Ploticus etc. (openoffice)</a></span></dt><dt><span class="section"><a href="#fmt_text">Textual Output (text)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom_itn">TomTom Itineraries (.itn) (tomtom_itn)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom_asc">TomTom POI file (.asc) (tomtom_asc)</a></span></dt><dt><span class="section"><a href="#fmt_tomtom">TomTom POI file (.ov2) (tomtom)</a></span></dt><dt><span class="section"><a href="#fmt_tmpro">TopoMapPro Places File (tmpro)</a></span></dt><dt><span class="section"><a href="#fmt_dmtlog">TrackLogs digital mapping (.trl) (dmtlog)</a></span></dt><dt><span class="section"><a href="#fmt_tiger">U.S. Census Bureau Tiger Mapping Service (tiger)</a></span></dt><dt><span class="section"><a href="#fmt_unicsv">Universal csv with field structure in first line (unicsv)</a></span></dt><dt><span class="section"><a href="#fmt_vcard">Vcard Output (for iPod) (vcard)</a></span></dt><dt><span class="section"><a href="#fmt_vidaone">VidaOne GPS for Pocket PC (.gpb) (vidaone)</a></span></dt><dt><span class="section"><a href="#fmt_vitosmt">Vito Navigator II tracks (vitosmt)</a></span></dt><dt><span class="section"><a href="#fmt_vitovtt">Vito SmartMap tracks (.vtt) (vitovtt)</a></span></dt><dt><span class="section"><a href="#fmt_wfff">WiFiFoFum 2.0 for PocketPC XML (wfff)</a></span></dt><dt><span class="section"><a href="#fmt_wbt-bin">Wintec WBT-100/200 Binary File Format (wbt-bin)</a></span></dt><dt><span class="section"><a href="#fmt_wbt">Wintec WBT-100/200 GPS Download (wbt)</a></span></dt><dt><span class="section"><a href="#fmt_wbt-tk1">Wintec WBT-201/G-Rays 2 Binary File Format (wbt-tk1)</a></span></dt><dt><span class="section"><a href="#fmt_yahoo">Yahoo Geocode API data (yahoo)</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_xcsv"></a>? Character Separated Values (xcsv)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
@@ -243,7 +248,7 @@ input or written on output.  This is not a valid option for the various
 built-in xcsv-based styles; they have prebuilt style definitions.
 </p><p>
 For information on the format of xcsv style files, see 
-<a href="#Styles" title="Appendix C. GPSBabel XCSV Style Files">Appendix C, <i>GPSBabel XCSV Style Files</i></a>.
+<a class="xref" href="#Styles" title="Appendix C. GPSBabel XCSV Style Files">Appendix C, <i>GPSBabel XCSV Style Files</i></a>.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_xcsv_o_snlen"></a><code class="option">snlen</code> option</h3></div></div></div><p>
       Max synthesized shortname length.
     </p><p>
@@ -289,7 +294,7 @@ Valid values for this option are 0 (off) and 1 (on).
       GPS datum (def. WGS 84).
     </p><p>
 This option specifies the GPS datum to be used on read or write. Valid values for this 
-option are listed in <a href="#Datums" title="Appendix A. Supported Datums">Appendix A, <i>Supported Datums</i></a>.
+option are listed in <a class="xref" href="#Datums" title="Appendix A. Supported Datums">Appendix A, <i>Supported Datums</i></a>.
 </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_alantrl"></a>Alan Map500 tracklogs (.trl) (alantrl)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -313,7 +318,7 @@ Still, if you use a GM101, GPSBabel will probably be able to convert
 your waypoints, routes and tracklogs.
 </p><p>
 For more information on the Alan Map500 visit
-<a href="http://www.alan-electronics.de/gps/gpsuebersicht.php3" target="_top">Alan Germany</a>. There is very informative <a href="http://www.alan-germany.de/forum/index.php" target="_top">forum</a>, too. The forum language is German but posts in English will be answered, too.
+<a class="ulink" href="http://www.alan-electronics.de/gps/gpsuebersicht.php3" target="_top">Alan Germany</a>. There is very informative <a class="ulink" href="http://www.alan-germany.de/forum/index.php" target="_top">forum</a>, too. The forum language is German but posts in English will be answered, too.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_alanwpr"></a>Alan Map500 waypoints and routes (.wpr) (alanwpr)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -339,21 +344,21 @@ Still, if you use a GM101, GPSBabel will probably be able to convert
 your waypoints, routes and tracklogs.
 </p><p>
 For more information on the Alan Map500 visit
-<a href="http://www.alan-electronics.de/gps/gpsuebersicht.php3" target="_top">Alan Germany</a>. There is very informative <a href="http://www.alan-germany.de/forum/index.php" target="_top">forum</a>, too. Forum language is German but posts in English will be answered,
+<a class="ulink" href="http://www.alan-electronics.de/gps/gpsuebersicht.php3" target="_top">Alan Germany</a>. There is very informative <a class="ulink" href="http://www.alan-germany.de/forum/index.php" target="_top">forum</a>, too. Forum language is German but posts in English will be answered,
 too.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_tabsep"></a>All database fields on one tab-separated line (tabsep)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
-This format, like the <a href="#fmt_custom" title="Custom &quot;Everything&quot; Style (custom)">custom</a> format, is
+This format, like the <a class="link" href="#fmt_custom" title="Custom &quot;Everything&quot; Style (custom)">custom</a> format, is
 mainly used for the purpose of testing GPSBabel.  It is supposed to contain
 one field for each piece of information supported by the 
-<a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a> format writer, but it may not be entirely
-in sync with the documentation at <a href="#Styles" title="Appendix C. GPSBabel XCSV Style Files">Appendix C, <i>GPSBabel XCSV Style Files</i></a>.
+<a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a> format writer, but it may not be entirely
+in sync with the documentation at <a class="xref" href="#Styles" title="Appendix C. GPSBabel XCSV Style Files">Appendix C, <i>GPSBabel XCSV Style Files</i></a>.
 </p><p>
 For a list of fields, see the style/tabsep.style file in the GPSBabel source
 distribution.
@@ -361,7 +366,7 @@ distribution.
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read tracks
-        </p></li></ul></div><p>Serial download protocol for the <a href="http://www.brauniger.com" target="_top">Brauniger</a> IQ series of
+        </p></li></ul></div><p>Serial download protocol for the <a class="ulink" href="http://www.brauniger.com" target="_top">Brauniger</a> IQ series of
 barograph recording flight instruments.  This format creates a 
 track of altitude vs time which can be merged with a GPS track 
 of the same flight to create a three dimensional IGC file. </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_cambridge"></a>Cambridge/Winpilot glider software (cambridge)</h2></div></div></div><p class="fmtcapshdr">
@@ -369,11 +374,11 @@ of the same flight to create a three dimensional IGC file. </p></div><div class=
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>Support for 
-<a href="http://www.cambridge-aero.com/products.htm" target="_top">Cambridge</a> 
-and <a href="http://www.winpilot.com" target="_top"> Winpilot</a> 
+<a class="ulink" href="http://www.cambridge-aero.com/products.htm" target="_top">Cambridge</a> 
+and <a class="ulink" href="http://www.winpilot.com" target="_top"> Winpilot</a> 
        flight analysis and planning software for glider pilots.  </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_cst"></a>CarteSurTable data file (cst)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -382,8 +387,8 @@ and <a href="http://www.winpilot.com" target="_top"> Winpilot</a>
           read tracks
         </p></li><li><p class="fmtcapsitem">
           read routes
-        </p></li></ul></div><p> With this format we can read  <a href="http://phgiraud.free.fr/CarteSurTable/CarteSurTable.htm" target="_top">CarteSurTable</a> data files.
- <a href="http://phgiraud.free.fr/CarteSurTable/CarteSurTable.htm" target="_top">CarteSurTable</a> is a shareware program widely used in France. The data
+        </p></li></ul></div><p> With this format we can read  <a class="ulink" href="http://phgiraud.free.fr/CarteSurTable/CarteSurTable.htm" target="_top">CarteSurTable</a> data files.
+ <a class="ulink" href="http://phgiraud.free.fr/CarteSurTable/CarteSurTable.htm" target="_top">CarteSurTable</a> is a shareware program widely used in France. The data
 inside have to be seen as a mixture of a waypoints list, one route and
 several tracks.  
          </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_cetus"></a>Cetus for Palm/OS (cetus)</h2></div></div></div><p class="fmtcapshdr">
@@ -392,7 +397,7 @@ several tracks.
           read and write waypoints
         </p></li><li><p class="fmtcapsitem">
           read tracks
-        </p></li></ul></div><p><a href="http://www.cetusgps.dk/" target="_top">Cetus GPS</a> is a program for
+        </p></li></ul></div><p><a class="ulink" href="http://www.cetusgps.dk/" target="_top">Cetus GPS</a> is a program for
 Palm/OS.  Working with Ron Parker and Kjeld Jensen, we can now read
 and write files for that program.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_cetus_o_dbname"></a><code class="option">dbname</code> option</h3></div></div></div><p>
       Database name.
@@ -416,28 +421,33 @@ looking at a list of icons in Cetus.
           read and write routes
         </p></li></ul></div><p>This is the format used by <span class="productname">CoastalExplorer</span>™. The
 format is XML with items uniquely identified by Windows-style UUIDs.
-<a href="http://www.rosepointnav.com" target="_top">http://www.rosepointnav.com</a>
+<a class="ulink" href="http://www.rosepointnav.com" target="_top">http://www.rosepointnav.com</a>
          </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_csv"></a>Comma separated values (csv)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p> There are a billion variants of Comma Separated Value
-data.  This is the one that makes <a href="http://www.delorme.com" target="_top">Delorme</a> <span class="productname">S&amp;A Deluxe 9</span>™ happy. It's
+data.  This is the one specifically that makes <a class="ulink" href="http://www.delorme.com" target="_top">Delorme</a> <span class="productname">S&amp;A Deluxe 9</span>™ happy. It's
 also a very simple program and useful for many other programs like
 spreadsheets.</p><p> CSV is also the correct format for 
        <span class="productname">Lowrance MapCreate</span>™,
 their commercial mapping program, or GDM6 (their free waypoint
-manager) for iFinder which is available at <a href="http://www.lowrance.com/Software/GDM6/Default.asp" target="_top">lowrance.com</a>
+manager) for iFinder which is available at <a class="ulink" href="http://www.lowrance.com/Software/GDM6/Default.asp" target="_top">lowrance.com</a>
          </p><p>
        On write, this format writes simple "latitude, longitude" pairs, but 
-on read it  will read anything supported by our <a href="#style_def_lathuman" title="LAT_HUMAN_READABLE">human readable</a> definition.
+on read it  will read anything supported by our <a class="link" href="#style_def_lathuman" title="LAT_HUMAN_READABLE">human readable</a> definition.
     </p><p>
        For something-separated data that has headers identifying the various
-       fields, see our <a href="#fmt_unicsv" title="Universal csv with field structure in first line (unicsv)">universal csv</a> format.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_compegps"></a>CompeGPS data files (.wpt/.trk/.rte) (compegps)</h2></div></div></div><p class="fmtcapshdr">
+       fields, see our <a class="link" href="#fmt_unicsv" title="Universal csv with field structure in first line (unicsv)">universal csv</a> format.
+    </p><div class="example"><a id="id2742458"></a><p class="title"><b>Example 3.1. Example 'csv' file</b></p><div class="example-contents"><pre class="programlisting">
+35.97203, -87.13470, Mountain Bike Heaven by susy1313
+36.09068, -86.67955, The Troll by a182pilot &amp; Family
+35.99627, -86.62012, Dive Bomber by JoGPS &amp; family
+36.03848, -86.64862, FOSTER by JoGPS &amp; Family
+</pre></div></div><br class="example-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_compegps"></a>CompeGPS data files (.wpt/.trk/.rte) (compegps)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
@@ -454,7 +464,7 @@ Since release 6.1 of <span class="productname">CompeGPS</span>™, GPX is also a
 supported import/export format for waypoints, routes and tracks.
 </p><p> 
 For more information please have a look at 
-<a href="http://www.compegps.com" target="_top">http://www.compegps.com</a>
+<a class="ulink" href="http://www.compegps.com" target="_top">http://www.compegps.com</a>
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_compegps_o_deficon"></a><code class="option">deficon</code> option</h3></div></div></div><p>
       Default icon name.
     </p><p>
@@ -465,7 +475,7 @@ This option specifies the default icon name on output.
 Because this format supports only one route or track, this option may be used 
 on output to select a single route or track from a collection of routes and
 tracks read from a more expressive format.  If you have, say, a 
-<a href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that contains two routes, you may
+<a class="link" href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that contains two routes, you may
 use this option to write them one at a time to individual files.
 </p><p><strong class="userinput"><code>gpsbabel -i gpx -f routes.gpx -o compegps,index=1 -F route1.txt -o compegps,index=2 -F route2.txt</code></strong></p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_compegps_o_radius"></a><code class="option">radius</code> option</h3></div></div></div><p>
       Give points (waypoints/route points) a default radius (proximity).
@@ -480,15 +490,15 @@ The default length is 16.
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
-        </p></li></ul></div><p> This code is mostly intended to convert  <a href="http://xcski.com/~ptomblin/CoPilot/" target="_top">CoPilot Flight
+        </p></li></ul></div><p> This code is mostly intended to convert  <a class="ulink" href="http://xcski.com/~ptomblin/CoPilot/" target="_top">CoPilot Flight
 Planner for Palm/OS"</a> databases into other formats.  You probably should
 not use this to write CoPilot databases, although the code is there,
 because GPSBabel doesn't convert magnetic declination values.</p><p>This version now reads all CoPilot file versions up to 4, but only
 writes version 4 files.  If you have a need for a version flag, please let
 me know.</p><p> Questions, bug reports, etc, to ptomblin at
 xcski.com</p><p>
-            <a href="http://xcski.com/~ptomblin/CoPilot/" target="_top">http://xcski.com/~ptomblin/CoPilot/</a> 
-and <a href="http://navaid.com/CoPilot/" target="_top">http://navaid.com/CoPilot</a>
+            <a class="ulink" href="http://xcski.com/~ptomblin/CoPilot/" target="_top">http://xcski.com/~ptomblin/CoPilot/</a> 
+and <a class="ulink" href="http://navaid.com/CoPilot/" target="_top">http://navaid.com/CoPilot</a>
          </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_coto"></a>cotoGPS for Palm/OS (coto)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -509,7 +519,7 @@ of the cotoGPS track format to the notes field.
 </p><p>
 Contributed by Tobias Minich.
 </p><p>
-<a href="http://core.de/~coto/projects/cotogps/" target="_top">cotoGPS</a>
+<a class="ulink" href="http://core.de/~coto/projects/cotogps/" target="_top">cotoGPS</a>
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_coto_o_zerocat"></a><code class="option">zerocat</code> option</h3></div></div></div><p>
       Name of the 'unassigned' category.
     </p><p>
@@ -520,7 +530,7 @@ database.  The default is "Not Assigned".
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
 This format is not actually used by any real product.  It is most useful
@@ -528,14 +538,14 @@ for debugging purposes when developing a new format module for GPSBabel.
 </p><p>
 To understand the contents of this file, look at the 
 <code class="filename">style/custom.style</code> file in the GPSBabel source
-distribution as well as <a href="#Styles" title="Appendix C. GPSBabel XCSV Style Files">Appendix C, <i>GPSBabel XCSV Style Files</i></a>.
+distribution as well as <a class="xref" href="#Styles" title="Appendix C. GPSBabel XCSV Style Files">Appendix C, <i>GPSBabel XCSV Style Files</i></a>.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_axim_gpb"></a>Dell Axim Navigation System (.gpb) file format (axim_gpb)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read tracks
         </p></li></ul></div><p>
  This format reads the binary (.gpb) track logs recorded on 
- <a href="http://www.dell.com" target="_top">Dell</a> Axim Navigation Systems. 
+ <a class="ulink" href="http://www.dell.com" target="_top">Dell</a> Axim Navigation Systems. 
 </p><p>
   This is a read-only format for now as the format was reverse
   engineered and there are many unknown bytes.  We can successfully
@@ -549,7 +559,7 @@ distribution as well as <a href="#Styles" title="Appendix C. GPSBabel XCSV Sty
         </p></li><li><p class="fmtcapsitem">
           read and write routes
         </p></li></ul></div><p> 
-This format supports the <a href="http://www.delorme.com" target="_top">DeLorme</a> ".an1" drawing file format.  It can 
+This format supports the <a class="ulink" href="http://www.delorme.com" target="_top">DeLorme</a> ".an1" drawing file format.  It can 
 currently be used to either read or write drawing files.  If you use 
 this format to create drawing files with routes or waypoints from another 
 source, by default it will create "Red Flag" symbols for waypoints, and 
@@ -588,7 +598,7 @@ Note that the ! is a shell metacharacter in bash and possibly other shells,
 so you may have to use single quotes or some other escape mechanism.
 </p><p>
 There is a tutorial on 
-<a href="http://www.gpsbabel.org/formats/delorme-new-interstate/" target="_top">how 
+<a class="ulink" href="http://www.gpsbabel.org/formats/delorme-new-interstate/" target="_top">how 
 to create an onramp for a limited access highway in Street Atlas USA 
 using GPSBabel.</a>
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_an1_o_nogc"></a><code class="option">nogc</code> option</h3></div></div></div><p>
@@ -654,13 +664,13 @@ specified in kilometers by adding a 'k'.  The default radius is 1/10 mile.
           read and write tracks
         </p></li></ul></div><p>This is the 'gpl' format as used in Delorme mapping
 products.  It is a track format and contains little more than the
-tracklog of a GPS that was attached while driving. <a href="http://www.frontiernet.net/~werner/gps/" target="_top">frontiernet.net</a>
+tracklog of a GPS that was attached while driving. <a class="ulink" href="http://www.frontiernet.net/~werner/gps/" target="_top">frontiernet.net</a>
          </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_saplus"></a>DeLorme Street Atlas Plus (saplus)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p> This format is for Delorme Street Atlas USA 2004 Plus and later.
 </p><p> For geocachers importing data from a tool like GSAK or
@@ -718,10 +728,10 @@ travel speeds in the DeLorme product you used to create the route file.)</p></di
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>Delorme TopoUSA/XMap Conduit is one of the bazillion 
-<a href="#fmt_csv" title="Comma separated values (csv)">CSV variants</a> 
+<a class="link" href="#fmt_csv" title="Comma separated values (csv)">CSV variants</a> 
 variants mentioned above.  It's just like Delorme Streets &amp; Atlas with the addition of
 a completely pointless line at the beginning and end of the file. This
 is the format used to hot-sync to XMap from withing TopoUSA. Done with
@@ -730,10 +740,10 @@ help of Dan Edwards.</p></div><div class="section" lang="en" xml:lang="en"><div
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>Delorme XMap2006 Conduit is just like 
-<a href="#fmt_xmap" title="DeLorme XMap HH Native .WPT (xmap)">XMap</a> 
+<a class="link" href="#fmt_xmap" title="DeLorme XMap HH Native .WPT (xmap)">XMap</a> 
 , except there are 
        no spaces between fields and the coordinate format is slightly 
        different. The completely pointless header and footer lines 
@@ -743,15 +753,15 @@ format, so it has all of the same options as that format.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
 Delorme XMapHandHeld Street Atlas USA is another of the
-billion <a href="#fmt_csv" title="Comma separated values (csv)"> CSV variants</a>.  
+billion <a class="link" href="#fmt_csv" title="Comma separated values (csv)"> CSV variants</a>.  
 This is the format used by XmapHH SA USA on (at least) PocketPC O/S. 
 </p><p> 
 This XMap is not the same as the simpler 
-<a href="#fmt_xmap" title="DeLorme XMap HH Native .WPT (xmap)">XMap</a> format, which is used with Topo USA 4.0
+<a class="link" href="#fmt_xmap" title="DeLorme XMap HH Native .WPT (xmap)">XMap</a> format, which is used with Topo USA 4.0
 and XMapHH for Palm. 
 </p><p>
 Delorme XMap Handheld .WPT for PocketPC is a bit of a kludge.  This 
@@ -811,17 +821,94 @@ while (&lt;INFILE&gt;) {
 
 exit;
 
-</pre><p>Contributed to GPSBabel by Alex Mottram.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_easygps"></a>EasyGPS binary format (easygps)</h2></div></div></div><p class="fmtcapshdr">
+</pre><p>Contributed to GPSBabel by Alex Mottram.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_destinator_itn"></a>Destinator Itineraries (.dat) (destinator_itn)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read and write routes
+        </p></li></ul></div><p>
+  Support for <span class="productname">Destinator</span>™ itinerary files.
+</p><p>
+  These have (mostly) extension .dat and are binary files. The file structure is undocumented
+  and so this format was reverse engineered from some .dat files.
+  At this time we can read and write name, comment and the coordinates of the route points.
+</p><p>
+  <span class="productname">Destinator</span>™ by
+  <a class="ulink" href="http://www.destinatortechnologies.net" target="_top">Destinator Technologies</a>
+  is a software for PNDs, Smartphones and PDAs.
+</p><p>
+  <strong class="userinput"><code>
+      gpsbabel -i destinator_itn -f from_A_to_B.dat -o gpx -F from_A_to_B.gpx
+  </code></strong>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_destinator_poi"></a>Destinator Points of Interest (.dat) (destinator_poi)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read and write waypoints
+        </p></li></ul></div><p>
+  Support for <span class="productname">Destinator</span>™ binary POI files (.dat).
+</p><p>
+  The basic information was found at <a class="ulink" href="http://mozoft.com/d3log.html" target="_top">mozoft.com</a>.
+  GPSBabel can read and write all fields described at this document. Please note that 'house number' isn't
+  supported as a separate field. This field, if available in any source file, will be stored together with 'street'
+  into GSPBabel's internal 'address' field.
+</p><p>
+  <span class="productname">Destinator</span>™ by
+  <a class="ulink" href="http://www.destinatortechnologies.net" target="_top">Destinator Technologies</a>
+  is a software for PNDs, Smartphones and PDAs.
+</p><p>
+  <strong class="userinput"><code>
+      gpsbabel -i destinator_poi -f interesting_places.dat -o gpx -F interesting_places.gpx
+  </code></strong>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_destinator_trl"></a>Destinator TrackLogs (.dat) (destinator_trl)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read and write tracks
+        </p></li></ul></div><p>
+  Support for <span class="productname">Destinator</span>™ binary tracklogs (.dat).
+</p><p>
+  The basic information was found at <a class="ulink" href="http://mozoft.com/d3log.html" target="_top">mozoft.com</a>.
+  In addition to the standard GPS track data of coordinates and timestamp, this format also stores the 
+  position fix and the number of satelites seen during recording. 
+</p><p>
+  <span class="productname">Destinator</span>™ by
+  <a class="ulink" href="http://www.destinatortechnologies.net" target="_top">Destinator Technologies</a>
+  is a software for PNDs, Smartphones and PDAs.
+</p><p>
+  <strong class="userinput"><code>
+    gpsbabel -i destinator_trl -f last_trip.dat -o gpx -F last_trip.gpx
+  </code></strong>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_easygps"></a>EasyGPS binary format (easygps)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
-        </p></li></ul></div><p> This is the binary file format used by  <a href="http://www.easygps.com/" target="_top">EasyGPS</a>
+        </p></li></ul></div><p> This is the binary file format used by  <a class="ulink" href="http://www.easygps.com/" target="_top">EasyGPS</a>
 format is seemingly being phased out in favor of GPX in newer versions
 of EasyGPS, but this allows conversions to and from the old binary
 .loc format.
 </p><p> Information about and sketchy code to implement this file
 format were provided by Eric Cloninger.
-</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_igc"></a>FAI/IGC Flight Recorder Data Format (igc)</h2></div></div></div><p class="fmtcapshdr">
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_exif"></a>Embedded Exif-GPS data (.jpg) (exif)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read waypoints
+        </p></li></ul></div><p>
+  This format reads GPS information embedded in 
+   <a class="ulink" href="http://www.exif.org" target="_top">EXIF </a>, 
+   the Exchangeable Image Format, data.  EXIF is a standardized method
+  of encoding data in pictures such as JPEG, TIFF, and WAV and is frequently
+  used by mobile phones with cameras, cameras with built-in GPS.
+</p><p>
+  EXIF is frequently used for Geolocating photographs so their images can be
+  correlated with time and location.
+</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_exif_o_filename"></a><code class="option">filename</code> option</h3></div></div></div><p>
+      Set waypoint name to source filename..
+    </p><p>
+  With this default option waypoint names are generated from source filename.
+</p><p>
+  <strong class="userinput"><code>
+     gpsbabel -i exif -f "C:\Pictures\IMG_1199.JPG",filename=Y -o gpx -F OUT.GPX
+  </code></strong>
+  The resulting waypoint in OUT.GPX has name IMG_1199.
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_igc"></a>FAI/IGC Flight Recorder Data Format (igc)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write tracks
@@ -834,12 +921,12 @@ and from tracks representing recorded flights, and routes representing
 task declarations in other formats.
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_igc_notes"></a>IGC Data Format Notes</h3></div></div></div><p>
 Refer to Appendix 1 of 
-<a href="http://www.fai.org:81/gliding/gnss/tech_spec_gnss.asp" target="_top">http://www.fai.org:81/gliding/gnss/tech_spec_gnss.asp</a>
+<a class="ulink" href="http://www.fai.org:81/gliding/gnss/tech_spec_gnss.asp" target="_top">http://www.fai.org:81/gliding/gnss/tech_spec_gnss.asp</a>
 for the specification of the IGC data format.
 </p><p>
 A sample list of software applications that use data in IGC format can be
 found at 
-<a href="http://www.fai.org:81/gliding/gnss/gnss_analysis_software.pdf" target="_top">http://www.fai.org:81/gliding/gnss/gnss_analysis_software.pdf</a>
+<a class="ulink" href="http://www.fai.org:81/gliding/gnss/gnss_analysis_software.pdf" target="_top">http://www.fai.org:81/gliding/gnss/gnss_analysis_software.pdf</a>
 </p><p>
 GPSBabel can be used to translate data in IGC format to and from various other
 formats.
@@ -929,8 +1016,8 @@ and the barograph and adjusting accordingly:
           write routes
         </p></li></ul></div><p>
         This is a write-only format used to feed waypoints, tracks, and routes
-        into <a href="http://franson.com/" target="_top">Franson Technolgies'</a>
-        <a href="http://franson.com/gpsgate/" target="_top">GpsGate simulator</a>.
+        into <a class="ulink" href="http://franson.com/" target="_top">Franson Technolgies'</a>
+        <a class="ulink" href="http://franson.com/gpsgate/" target="_top">GpsGate simulator</a>.
   </p><p>
         To use these files in GpsGate, select 'Simulator' and then
         "File-&gt;Open".
@@ -951,17 +1038,17 @@ Valid values for this option are 0 (off) and 1 (on).  The default is '0'.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
-</p><p> This was a requested <a href="#fmt_csv" title="Comma separated values (csv)">CSV format</a>, and is <span class="emphasis"><em>not</em></span> the proprietary
-binary format used by <a href="http://www.fugawi.com" target="_top">Fugawi</a>. Like any other CSV format, GPSBabel
+</p><p> This was a requested <a class="link" href="#fmt_csv" title="Comma separated values (csv)">CSV format</a>, and is <span class="emphasis"><em>not</em></span> the proprietary
+binary format used by <a class="ulink" href="http://www.fugawi.com" target="_top">Fugawi</a>. Like any other CSV format, GPSBabel
 cannot read tracks in this format, but converting a track into it and
 then importing as track in Fugawi works.</p><p> It is known to work with Fugawi V3.1.4.635. When
 importing/exporting waypoints, one has to specify the order of fields
 as follows (names of fields may depend on the language used by
 Fugawi):</p><table class="simplelist" border="0" summary="Simple list"><tr><td> - Name</td></tr><tr><td> - Comment</td></tr><tr><td> - Description</td></tr><tr><td> - Latidude</td></tr><tr><td> - Longitude</td></tr><tr><td> - Altitude (metres)</td></tr><tr><td> - Date (yyyymmdd/yymmdd)</td></tr><tr><td> - Time of day (hhmmss)</td></tr></table><p> When importing tracks, use "[ignore]" instead of "Name",
 "Comment" and "Description".</p><p>
-            <a href="http://www.fugawi.com/" target="_top">http://www.fugawi.com/</a>
+            <a class="ulink" href="http://www.fugawi.com/" target="_top">http://www.fugawi.com/</a>
          </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_g7towin"></a>G7ToWin data files (.g7t) (g7towin)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -971,7 +1058,7 @@ Fugawi):</p><table class="simplelist" border="0" summary="Simple list"><tr><td>
         </p></li><li><p class="fmtcapsitem">
           read routes
         </p></li></ul></div><p>
-  Like GPSBabel <a href="http://www.gpsinformation.org/ronh/g7towin.htm" target="_top">G7ToWin</a> is a program which allows uploading and
+  Like GPSBabel, <a class="ulink" href="http://www.gpsinformation.org/ronh/g7towin.htm" target="_top">G7ToWin</a> is a program which allows uploading and
   downloading information from several GPS devices (Garmin, Lowrance/Eagle, Magellan).
   G7ToWin has its own data format, which is an enhanced format used in Gardown.
 </p><p>
@@ -981,7 +1068,7 @@ Fugawi):</p><table class="simplelist" border="0" summary="Simple list"><tr><td>
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>This is a very simple format that
 is most useful for exporting data from units that support heart rate
@@ -999,9 +1086,9 @@ into a spreadsheet or graphing program. </p></div><div class="section" lang="en"
         </p></li></ul></div><p>This is the XML format used by the Garmin Logbook product
 that ships with Forerunner and Foretrex.  
 As of early 2006, this program is apparently  been discontinued in favor of
-<a href="#fmt_gtrnctr" title="Garmin Training Centerxml (gtrnctr)">Garmin Training Center</a>.
+<a class="link" href="#fmt_gtrnctr" title="Garmin Training Centerxml (gtrnctr)">Garmin Training Center</a>.
 
-See: <a href="http://www.garmin.com" target="_top">http://www.garmin.com</a>  
+See: <a class="ulink" href="http://www.garmin.com" target="_top">http://www.garmin.com</a>  
          </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_gdb"></a>Garmin MapSource - gdb (gdb)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -1024,7 +1111,23 @@ conversion code.
     </p><p>
 This option specifies the default category for gdb output.  It should be a 
 number from 1 to 16.
-</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gdb_o_ver"></a><code class="option">ver</code> option</h3></div></div></div><p>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gdb_o_bitscategory"></a><code class="option">bitscategory</code> option</h3></div></div></div><p>
+      Bitmap of categories.
+    </p><p>
+ This option is closely related to the 'category' option.  While category 
+ allows you to choose a single category that waypoints should appear in,
+ this options allows you to specify a bitmask to be used for the category.
+ Options may be specified in either decimal or hex.
+</p><div class="example"><a id="gdb_bitscategory"></a><p class="title"><b>Example 3.2. Example for gdb bitcategory option to put all waypoints in categories 1 and 16.</b></p><div class="example-contents"><p>
+  The following two commands are equivalent.  They place a the point in both the first and last of the sixteen available categories.
+  <strong class="userinput"><code>
+        gpsbabel -i gpx -f PocketQuery.gpx -o gdb,bitscategory=32769 -F foo.gdb
+  </code></strong>
+  <strong class="userinput"><code>
+        gpsbabel -i gpx -f PocketQuery.gpx -o gdb,bitscategory=0x8001 -F foo.gdb
+  </code></strong>
+  
+</p></div></div><br class="example-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gdb_o_ver"></a><code class="option">ver</code> option</h3></div></div></div><p>
       Version of gdb file to generate (1..3).
     </p><p>
 This option specifies the data format version for the output file.  Version
@@ -1042,14 +1145,14 @@ routes.
   with exception of points with a description (i.e. "Make U-turns until you know where you are.").
   The priority of this option is higher than of the <code class="option">via</code> option. 
   A value of 1 or y overwrites the <code class="option">via</code> settings.
-</p><div class="example"><a id="gdb_roadbook_option"></a><p class="title"><b>Example 3.1. Using gdb option <code class="option">roadbook</code> to create simple html roadbook</b></p><div class="example-contents"><p>
+</p><div class="example"><a id="gdb_roadbook_option"></a><p class="title"><b>Example 3.3. Using gdb option <code class="option">roadbook</code> to create simple html roadbook</b></p><div class="example-contents"><p>
     <strong class="userinput"><code>
       gpsbabel -i gdb,roadbook -f sample.gdb -x nuketypes,waypoints,tracks -x transform,wpt=rte -o html -F roadbook.html
     </code></strong>
   </p><p>
-    Because gdb creates internal a route AND a waypoint list, you have to drop all
-    waypoints and transform the route into waypoints. So you'll get a well ordered
-    html output. We sugess these steps for all waypoint-only formats as html. 
+    Because gdb internally creates a route AND a waypoint list, you have to drop all
+    waypoints and transform the route into waypoints in order to get a well ordered
+    html output. We suggest these steps for all waypoint-only formats as html. 
   </p></div></div><br class="example-break" /></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_mapsource"></a>Garmin MapSource - mps (mapsource)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -1123,7 +1226,7 @@ them.
           read and write routes
         </p></li></ul></div><p>
 This is a textual format that contains nearly all of the information 
-contained in the <span class="productname">MapSource</span>™ main format, <a href="#fmt_gdb" title="Garmin MapSource - gdb (gdb)">GDB</a>.
+contained in the <span class="productname">MapSource</span>™ main format, <a class="link" href="#fmt_gdb" title="Garmin MapSource - gdb (gdb)">GDB</a>.
 This format also contains some computed values such as distances between 
 routepoints and trackpoints, speed, and course (heading).
 </p><p>
@@ -1136,7 +1239,7 @@ of <span class="productname">MapSource</span>™ and Windows. These include grid
 temperature units, and the representation of date and time fields. GPSBabel 
 tries to read all items automatically. Problems with date and time format can 
 be solved with the 'date' and 'time' options.
-</p><div class="example"><a id="all_garmin_txt_options"></a><p class="title"><b>Example 3.2. Command showing garmin_txt output with all options</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -i garmin_txt,date="MM/DD/YYYY",time="hh:mm:ss xx" -f in.txt -o garmin_txt,date="DD.MM.YYYY",datum="WGS 72",dist=m,prec=6,temp=c,time="HH:mm:ss",utc=+2 -F out.txt</code></strong></p></div></div><br class="example-break" /><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_txt_o_date"></a><code class="option">date</code> option</h3></div></div></div><p>
+</p><div class="example"><a id="all_garmin_txt_options"></a><p class="title"><b>Example 3.4. Command showing garmin_txt output with all options</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -i garmin_txt,date="MM/DD/YYYY",time="hh:mm:ss xx" -f in.txt -o garmin_txt,date="DD.MM.YYYY",datum="WGS 72",dist=m,prec=6,temp=c,time="HH:mm:ss",utc=+2 -F out.txt</code></strong></p></div></div><br class="example-break" /><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_txt_o_date"></a><code class="option">date</code> option</h3></div></div></div><p>
       Read/Write date format (i.e. yyyy/mm/dd).
     </p><p>
 This option specifies the input and output format for the date.  The format 
@@ -1145,7 +1248,7 @@ is written similarly to those in Windows.  An example format is "YYYY/MM/DD".
       GPS datum (def. WGS 84).
     </p><p>
 This option specifies the datum to be used on output.  Valid values for this 
-option are listed in <a href="#Datums" title="Appendix A. Supported Datums">Appendix A, <i>Supported Datums</i></a>.
+option are listed in <a class="xref" href="#Datums" title="Appendix A. Supported Datums">Appendix A, <i>Supported Datums</i></a>.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_txt_o_dist"></a><code class="option">dist</code> option</h3></div></div></div><p>
       Distance unit [m=metric, s=statute].
     </p><p>
@@ -1156,7 +1259,7 @@ values.  Valid values are M for metric (m/km/kph) or S for statute
       Write position using this grid..
     </p><p>
   This value specifies the grid to be used on write.
-</p><div class="table"><a id="garmin_grid"></a><p class="title"><b>Table 3.1. Grid values for garmin_txt</b></p><div class="table-contents"><table summary="Grid values for garmin_txt" border="1"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th># idx</th><th>short</th><th>file-header</th><th>sample</th></tr></thead><tbody><tr><td>0</td><td>ddd</td><td>Lat/Lon hddd.ddddd</td><td>    S26.25333 E27.92333</td></tr><tr><td>1</td><td>dmm</td><td>Lat/Lon hddd°mm.mm</td><td>N33 56.539 W118 24.471</td></tr><tr><td>2</td><td>dms</td><td>Lat/Lon hddd°mm'ss.s</td><td>S25 25 26.8 E28 06 07.3</td></tr><tr><td>3</td><td>bng</td><td>British National Grid</td><td>TQ 18919 69392</td></tr><tr><td>4</td><td>utm</td><td>Universal Transverse Mercator</td><td>33 U 318293 5637154</td></tr></tbody></table></div></div><br class="table-break" /><p>
+</p><div class="table"><a id="garmin_grid"></a><p class="title"><b>Table 3.1. Grid values for garmin_txt</b></p><div class="table-contents"><table summary="Grid values for garmin_txt" border="1"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th># idx</th><th>short</th><th>file-header</th><th>sample</th></tr></thead><tbody><tr><td>0</td><td>ddd</td><td>Lat/Lon hddd.ddddd</td><td>    S26.25333 E27.92333</td></tr><tr><td>1</td><td>dmm</td><td>Lat/Lon hddd°mm.mm</td><td>N33 56.539 W118 24.471</td></tr><tr><td>2</td><td>dms</td><td>Lat/Lon hddd°mm'ss.s</td><td>S25 25 26.8 E28 06 07.3</td></tr><tr><td>3</td><td>bng</td><td>British National Grid</td><td>TQ 18919 69392</td></tr><tr><td>4</td><td>utm</td><td>Universal Transverse Mercator</td><td>33 U 318293 5637154</td></tr><tr><td>5</td><td>swiss</td><td>Swiss grid</td><td>776519 167359</td></tr></tbody></table></div></div><br class="table-break" /><p>
   Idx or short are valid params for this option.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_txt_o_prec"></a><code class="option">prec</code> option</h3></div></div></div><p>
       Precision of coordinates.
@@ -1196,20 +1299,25 @@ Mapsource will find them more easily.
 </p><p> In general, you should prefer the "mapsource" file format
 to this one.
 </p><p>This format has been extended to handle many - but not all - 
-       files from <a href="http://www.gpsu.co.uk/index.html" target="_top">GPS Utility</a>.  If you encounter something that GPSBabel does not handle well, use
+       files from <a class="ulink" href="http://www.gpsu.co.uk/index.html" target="_top">GPS Utility</a>.  If you encounter something that GPSBabel does not handle well, use
 the free version of GPSUtil to read it and save as something more common.
        </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_pcx_o_deficon"></a><code class="option">deficon</code> option</h3></div></div></div><p>
       Default icon name.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_pcx_o_cartoexploreur"></a><code class="option">cartoexploreur</code> option</h3></div></div></div><p>
+    </p><p>
+  The deficon option is used to control the icon output when writing to this format.   It overrides any icon informatino that might be present in the source data.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_pcx_o_cartoexploreur"></a><code class="option">cartoexploreur</code> option</h3></div></div></div><p>
       Write tracks compatible with Carto Exploreur.
-    </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_garmin_poi"></a>Garmin POI database (garmin_poi)</h2></div></div></div><p class="fmtcapshdr">
+    </p><p>
+  Carto Exploreur requires a slightly incompatible variation of the PCX format
+when written.  Specifying this option on write tells us to create that strain of PCX.
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_garmin_poi"></a>Garmin POI database (garmin_poi)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
-</p><p>The <a href="http://www.garmin.com/support/agree.jsp?id=927" target="_top">Garmin POI loader</a> 
+</p><p>The <a class="ulink" href="http://www.garmin.com/support/agree.jsp?id=927" target="_top">Garmin POI loader</a> 
 loads custom points of interest into certain models of
 Garmin GPS receivers.  (As of this writing, only the models introduced
 in 2005 and later are supported.  See Garmin's site for more info.)
@@ -1218,30 +1326,45 @@ This is the format readable that that program.</p></div><div class="section" lan
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-   The format garmin_gpi supports binary POI (.gpi) files useable
-   on newer Garmin GPS receivers (see also <a href="#fmt_garmin_poi" title="Garmin POI database (garmin_poi)">garmin_poi</a> for some hints).
-   <a href="http://www.garmin.com/support/agree.jsp?id=927" target="_top">Garmin POI-Loader</a> is the standard application that creates GPI's
+   The format garmin_gpi supports the binary POI (.gpi) files that are useable
+   on newer Garmin GPS receivers.  See <a class="link" href="#fmt_garmin_poi" title="Garmin POI database (garmin_poi)">garmin_poi</a> for additional information about Garmin's own Poiloader program.
+   <a class="ulink" href="http://www.garmin.com/support/agree.jsp?id=927" target="_top">Garmin POI-Loader</a> is the standard application that creates GPI files
    with all possible features.
 </p><p>
    The layout of GPI files isn't documented and our module was created
    via reverse engeneering. If you get a problem on reading or writing 
    a GPI file, please provide that file (mailto:gpsbabel-misc@lists.sourceforge.net).
 </p><p>
-   At this time we don't support special features as "Tour-Guide", alerts or links
+   At this time we don't support special features as "Tour-Guide" or links
    to sounds and pictures.
+</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>
+   Creation timestamp issue: See option <a class="link" href="#fmt_garmin_gpi_o_sleep" title="sleep option">sleep</a> !!!
 </p><p>
        This module does not support direct transfer of .GPI files to
        receivers in Garmin protocol mode.  For units like Nuvi, Zumo, or 
        Streetpilot, just choose a file that's on the drive where your
-       GPS is mounted.   For units like the X series (GPSMap60, etc.) 
+       GPS is mounted.   For units like the X series (GPSMap 60CSx, GPSMap 60Cx, Legend Hcx, etc.) 
        you must explictly put the unit in mass storage mode or mount
        the memory chip in an external reader and transfer the file 
        directly.
-</p><div class="example"><a id="all_garmin_gpi_options"></a><p class="title"><b>Example 3.3. Command showing garmin_gpi output example</b></p><div class="example-contents"><p>
+</p></div><div class="example"><a id="all_garmin_gpi_options"></a><p class="title"><b>Example 3.5. Command showing garmin_gpi output example</b></p><div class="example-contents"><p>
     <strong class="userinput"><code>
       gpsbabel -i gpx -f "My Points.gpx" -o garmin_gpi,category="Nice Restaurants",bitmap=restaurant.bmp,notes -F "My Points.gpi"
     </code></strong>
-  </p></div></div><br class="example-break" /><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_gpi_o_bitmap"></a><code class="option">bitmap</code> option</h3></div></div></div><p>
+  </p></div></div><br class="example-break" /><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_gpi_o_alerts"></a><code class="option">alerts</code> option</h3></div></div></div><p>
+      Enable alerts on speed or proximity distance.
+    </p><p>
+   Because speed isn't a real member of a normal waypoint, you can put the speed values into
+   the waypoint names. "Point@30" will result in a speed value of 30. By default we assume these
+   values are in kilometers per hour.
+</p><p>
+   Proximity distance is also supported by <a class="link" href="#fmt_gpx" title="GPX XML (gpx)">GPX</a>, <a class="link" href="#fmt_gdb" title="Garmin MapSource - gdb (gdb)">Garmin GDB</a>, <a class="link" href="#fmt_ozi" title="OziExplorer (ozi)">OZI Explorer</a>, 
+   <a class="link" href="#fmt_compegps" title="CompeGPS data files (.wpt/.trk/.rte) (compegps)">CompeGPS</a> and <a class="link" href="#fmt_unicsv" title="Universal csv with field structure in first line (unicsv)">Universal CSV</a>.
+</p><p>
+  <strong class="userinput"><code>
+    gpsbabel -i gpx -f "warnings.gpx" -o garmin_gpi,alerts=1 -F "warnings.gpi"
+  </code></strong>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_gpi_o_bitmap"></a><code class="option">bitmap</code> option</h3></div></div></div><p>
       Use specified bitmap on output.
     </p><p>
    The bitmap (BMP) should be 24x24 (or smaller) and can be in
@@ -1301,6 +1424,73 @@ This is the format readable that that program.</p></div><div class="section" lan
   <strong class="userinput"><code>
     gpsbabel -i gpx -f "My Points.gpx" -o garmin_gpi,position -F "My Points.gpi"
   </code></strong>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_gpi_o_proximity"></a><code class="option">proximity</code> option</h3></div></div></div><p>
+      Default proximity.
+    </p><p>
+  When no proximity data is available in the source input, GPSBabel uses this as the default proximity value.
+  The parameter has to be in meters, or, when units=s specified, in miles.
+  <a class="link" href="#fmt_garmin_gpi_o_alerts" title="alerts option">alerts</a> are automatically enabled.
+</p><div class="example"><a id="garmin_gpi_speedcams"></a><p class="title"><b>Example 3.6. Read GPX file, create GPI to alert when you're 1/2 mile from a speed camera.</b></p><div class="example-contents"><p>
+  <strong class="userinput"><code>
+    gpsbabel -i gpx -f "SpeedCameras.gpx" -o garmin_gpi,units=s,proximity=0.5 -F "SpeedCameras.gpi"
+  </code></strong>
+</p></div></div><br class="example-break" /><p>
+  Its also possible to append a specific distance unit to the parameter.
+</p><p>
+  <strong class="userinput"><code>
+    gpsbabel -i gpx -f "SpeedCameras.gpx" -o garmin_gpi,proximity=500m -F "SpeedCameras.gpi"
+  </code></strong>
+</p><p>
+  </p><div class="table"><a id="distance_units"></a><p class="title"><b>Table 3.2. Supported distance units</b></p><div class="table-contents"><table summary="Supported distance units" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Unit</th><th>Description</th></tr></thead><tbody><tr><td>fa</td><td>Fathoms</td></tr><tr><td>feet</td><td>Feet</td></tr><tr><td>ft</td><td>Feet</td></tr><tr><td>km</td><td>Kilometers</td></tr><tr><td>m</td><td>Meters</td></tr><tr><td>mi</td><td>Miles</td></tr><tr><td>nm</td><td>Nautical miles</td></tr></tbody></table></div></div><p><br class="table-break" />
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_gpi_o_sleep"></a><code class="option">sleep</code> option</h3></div></div></div><p>
+      After output job done sleep n second(s).
+    </p><p>
+  The Garmin units seem to use the creation timestamp of GPI files for internal purposes. 
+  In other words,  if you load GPI files with same creation timestamp on your device, 
+  strange things will happen,  such as having missing or repeated POIs. With the sleep option, GPSBabel waits a given
+  number of seconds after the GPI file was written.
+</p><p>
+  In the normal case of using GPSBabel from the command line or from the GUI, the chance of creating files
+  with the same timestamp is in the nearly ZERO. In scripts or batch files where you are writing multiple files - even from different GPSBabel instances - the odds of this happening is rather good.
+  The sleep option forces GPSBabel to wait after creating a file to ensure the timestamps are unique. Values are specified in seconds and can be 1 or more.
+</p><p>
+  <strong class="userinput"><code>
+    gpsbabel -i gpx -f "SpeedCameras.gpx" -o garmin_gpi,sleep=1 -F "SpeedCameras.gpi"
+  </code></strong>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_gpi_o_speed"></a><code class="option">speed</code> option</h3></div></div></div><p>
+      Default speed.
+    </p><p>
+  When no speed data is available in the source input, GPSBabel uses this as the default speed value.
+  The parameter has to be in kilometers per hour, or, when units=s specified,
+  in miles per hour. <a class="link" href="#fmt_garmin_gpi_o_alerts" title="alerts option">alerts</a> are
+  automatically enabled.
+</p><p>
+  <strong class="userinput"><code>
+    gpsbabel -i gpx -f "SpeedCameras.gpx" -o garmin_gpi,units=s,speed=30 -F "SpeedCameras.gpi"
+  </code></strong>
+</p><p>
+  Its also possible to append a specific speed unit to the parameter.
+</p><p>
+  <strong class="userinput"><code>
+    gpsbabel -i gpx -f "SpeedCameras.gpx" -o garmin_gpi,speed=30mph -F "SpeedCameras.gpi"
+  </code></strong>
+</p><p>
+  </p><div class="table"><a id="speed_units"></a><p class="title"><b>Table 3.3. Supported speed units</b></p><div class="table-contents"><table summary="Supported speed units" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Unit</th><th>Description</th></tr></thead><tbody><tr><td>km/h</td><td>Kilometers per hour</td></tr><tr><td>kmh</td><td>Kilometers per hour</td></tr><tr><td>kph</td><td>Kilometers per hour</td></tr><tr><td>kt</td><td>Knots</td></tr><tr><td>knot</td><td>Knots</td></tr><tr><td>m/s</td><td>Meters per second</td></tr><tr><td>mps</td><td>Meters per second</td></tr><tr><td>mi/h</td><td>Miles per hour</td></tr></tbody></table></div></div><p><br class="table-break" />
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_gpi_o_unique"></a><code class="option">unique</code> option</h3></div></div></div><p>
+      Create unique waypoint names (default = yes).
+    </p><p>
+   Don't create unique names sample:
+</p><p>
+  <strong class="userinput"><code>
+    gpsbabel -i gpx -f "My Points.gpx" -o garmin_gpi,unique=0 -F "My Points.gpi"
+  </code></strong>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_gpi_o_units"></a><code class="option">units</code> option</h3></div></div></div><p>
+      Units used for names with @speed ('s'tatute or 'm'etric).
+    </p><p>
+   Sample command tells GPSBabel to handle speed values in miles per hour:
+  <strong class="userinput"><code>
+    gpsbabel -i gpx -f "My Points.gpx" -o garmin_gpi,units=s -F "My Points.gpi"
+  </code></strong>
 </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_garmin"></a>Garmin serial/USB protocol (garmin)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -1318,9 +1508,9 @@ This is the format readable that that program.</p></div><div class="section" lan
        getty, pppd, etc.) is using the serial port.
 </p><p> 
        Supported Garmin GPS receivers with USB include 
-       </p><table class="simplelist" border="0" summary="Simple list"><tr><td>Astro</td><td>Forerunner 301</td><td>GPSMAP 60CSx</td><td>StreetPilot 2620</td></tr><tr><td>Edge 205</td><td>Forerunner 305</td><td>GPSMAP 60Cx</td><td>StreetPilot 2650</td></tr><tr><td>Edge 305</td><td>Foretrex 201</td><td>GPSMAP 76C</td><td>StreetPilot 2720</td></tr><tr><td>eTrex Legend C</td><td>Foretrex 301</td><td>GPSMAP 76CS</td><td>StreetPilot 2730</td></tr><tr><td>eTrex Legend Cx</td><td>GPS 18<sup>[<a id="posnonly" href="#ftn.posnonly">1</a>]</sup></td><td>GPSMAP 76CSX</td><td>StreetPilot 2820</td></tr><tr><td>eTrex Legend HCx</td><td>GPSMAP 195</td><td>GPSMAP 76Cx</td><td>StreetPilot 7200</td></tr><tr><td>eTrex Summit Cx</td><td>GPSMAP 276C</td><td>GPSMAP 96</td><td>StreetPilot 7500</td></tr><tr><td>eTrex Summit HC</td><td>GPSMAP 295</td><td>GPSMAP 96C</td><td>StreetPilot c310</td></tr><tr><td>eTrex Venture C</td><td>GPSMAP 296C</td><td>Quest</td><td>StreetPilot c320</td></tr><tr><td>eTrex Venture Cx</td><td>GPSMAP 378</td><td>Quest II</td><td>StreetPilot c330</td></tr><tr><td>eTrex Venture HC</td><td>GPSMAP 396</td><td>Rhino 520</td><td>StreetPilot c340</td></tr><tr><td>eTrex Vista C</td><td>GPSMAP 478</td><td>Rhino 530</td><td>StreetPilot i2</td></tr><tr><td>eTrex Vista Cx</td><td>GPSMAP 496</td><td>Rhino 520 HCx</td><td>StreetPilot i3</td></tr><tr><td>eTrex Vista HCx</td><td>GPSMAP 60C</td><td>Rhino 530 HCx</td><td>StreetPilot i5</td></tr><tr><td>Forerunner 205</td><td>GPSMAP 60CS</td><td>StreetPilot 2610</td><td> </td></tr></table><p>
+       </p><table class="simplelist" border="0" summary="Simple list"><tr><td>Astro</td><td>Forerunner 301</td><td>GPSMAP 60CSx</td><td>StreetPilot 2620</td></tr><tr><td>Edge 205</td><td>Forerunner 305</td><td>GPSMAP 60Cx</td><td>StreetPilot 2650</td></tr><tr><td>Edge 305</td><td>Foretrex 201</td><td>GPSMAP 76C</td><td>StreetPilot 2720</td></tr><tr><td>eTrex Legend C</td><td>Foretrex 301</td><td>GPSMAP 76CS</td><td>StreetPilot 2730</td></tr><tr><td>eTrex Legend Cx</td><td>GPS 18<sup>[<a id="posnonly" href="#ftn.posnonly" class="footnote">1</a>]</sup></td><td>GPSMAP 76CSX</td><td>StreetPilot 2820</td></tr><tr><td>eTrex Legend HCx</td><td>GPSMAP 195</td><td>GPSMAP 76Cx</td><td>StreetPilot 7200</td></tr><tr><td>eTrex Summit Cx</td><td>GPSMAP 276C</td><td>GPSMAP 96</td><td>StreetPilot 7500</td></tr><tr><td>eTrex Summit HC</td><td>GPSMAP 295</td><td>GPSMAP 96C</td><td>StreetPilot c310</td></tr><tr><td>eTrex Venture C</td><td>GPSMAP 296C</td><td>Quest</td><td>StreetPilot c320</td></tr><tr><td>eTrex Venture Cx</td><td>GPSMAP 378</td><td>Quest II</td><td>StreetPilot c330</td></tr><tr><td>eTrex Venture HC</td><td>GPSMAP 396</td><td>Rhino 520</td><td>StreetPilot c340</td></tr><tr><td>eTrex Vista C</td><td>GPSMAP 478</td><td>Rhino 530</td><td>StreetPilot i2</td></tr><tr><td>eTrex Vista Cx</td><td>GPSMAP 496</td><td>Rhino 520 HCx</td><td>StreetPilot i3</td></tr><tr><td>eTrex Vista HCx</td><td>GPSMAP 60C</td><td>Rhino 530 HCx</td><td>StreetPilot i5</td></tr><tr><td>Forerunner 205</td><td>GPSMAP 60CS</td><td>StreetPilot 2610</td><td> </td></tr></table><p>
 </p><p>the following Bluetooth Garmin products:
-</p><table class="simplelist" border="0" summary="Simple list"><tr><td>GPS 10<sup>[<a href="#ftn.posnonly">1</a>]</sup></td><td> </td><td> </td><td> </td></tr></table><p>
+</p><table class="simplelist" border="0" summary="Simple list"><tr><td>GPS 10<sup>[<a href="#ftn.posnonly" class="footnoteref">1</a>]</sup></td><td> </td><td> </td><td> </td></tr></table><p>
 </p><p>and most serial Garmin GPS receivers including:
 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>eMap</td><td>eTrex H</td><td>GPS 12 </td><td>Rhino 110</td></tr><tr><td>eTrex Camo</td><td>Forerunner 201</td><td>GPS 12XL </td><td>Rhino 120</td></tr><tr><td>eTrex Legend</td><td>Foretrex 201</td><td>GPS III </td><td>Rhino 130</td></tr><tr><td>eTrex Summit</td><td>Geko 201</td><td>GPS III+ </td><td>StreetPilot III</td></tr><tr><td>eTrex Venture</td><td>Geko 301</td><td>GPS II </td><td>StreetPilot III+</td></tr><tr><td>eTrex Vista</td><td>GPS 12CX </td><td>GPS II+ </td><td> </td></tr><tr><td>eTrex (Basic Yellow)</td><td>GPS 12Map </td><td>GPS V</td><td> </td></tr></table><p>
 </p><p>
@@ -1328,7 +1518,7 @@ The following Garmin GPS receivers are supported, but they do not
 support Garmin communication protocol and don't work with the 
 <code class="option">garmin</code> option.  To use these receivers, read or write
 GPX files from the mass storage device as mounted on your computer.
-</p><table class="simplelist" border="0" summary="Simple list"><tr><td>Nuvi 200<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Nuvi 310<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Nuvi 660<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>StreetPilot c580<sup>[<a href="#ftn.gpx">2</a>]</sup></td></tr><tr><td>Nuvi 200W<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Nuvi 350<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Nuvi 670<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Zumo 450<sup>[<a href="#ftn.gpx">2</a>]</sup></td></tr><tr><td>Nuvi 250<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Nuvi 370<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Nuvi 680<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Zumo 500<sup>[<a href="#ftn.gpx">2</a>]</sup></td></tr><tr><td>Nuvi 250W<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Nuvi 600<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>StreetPilot c510<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Zumo 550<sup>[<a href="#ftn.gpx">2</a>]</sup></td></tr><tr><td>Nuvi 270<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>Nuvi 650<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>StreetPilot c530<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td> </td></tr><tr><td>Nuvi 300<sup>[<a id="gpx" href="#ftn.gpx">2</a>]</sup></td><td>Nuvi 650FM<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td>StreetPilot c550<sup>[<a href="#ftn.gpx">2</a>]</sup></td><td> </td></tr></table><p>
+</p><table class="simplelist" border="0" summary="Simple list"><tr><td>Colorado 300<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 250W<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 650<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>StreetPilot c510<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td></tr><tr><td>Colorado 400c<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 255W<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 650FM<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>StreetPilot c530<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td></tr><tr><td>Colorado 400i<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 260<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 660<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>StreetPilot c550<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td></tr><tr><td>Colorado 400t<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 260W<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 670<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>StreetPilot c580<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td></tr><tr><td>Nuvi 200<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 270<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 680<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Zumo 450<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td></tr><tr><td>Nuvi 205<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 300<sup>[<a id="gpx" href="#ftn.gpx" class="footnote">2</a>]</sup></td><td>Nuvi 750<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Zumo 500<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td></tr><tr><td>Nuvi 200W<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 310<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 760<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Zumo 550<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td></tr><tr><td>Nuvi 205W<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 350<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 770<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td> </td></tr><tr><td>Nuvi 250<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 370<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 780<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td> </td></tr><tr><td>Nuvi 255<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 600<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td>Nuvi 880<sup>[<a href="#ftn.gpx" class="footnoteref">2</a>]</sup></td><td> </td></tr></table><p>
 </p><p>
        None of the GPSBabel developers has access to every model on that
        list, but we've received reports of success and/or have reasonable
@@ -1375,12 +1565,19 @@ so they are named 'Custom 0' through 'Custom 511'.
        filename.   For this to work on Windows, you must install
        the Garmin driver.  For Linux, this will fail if have the garmin_gps
        kernel module loaded.  
-       See the <a href="/osnotes.html" target="_top">Operating System Notes</a> for details.
+       See the <a class="ulink" href="/osnotes.html" target="_top">Operating System Notes</a> for details.
 </p><p>
-This module also supports <a href="#tracking" title="Realtime tracking">realtime tracking</a> 
+This module also supports <a class="link" href="#tracking" title="Realtime tracking">realtime tracking</a> 
 which allows realtime position reports from a Garmin GPS receiver over USB
 or serial.  
-</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_o_snlen"></a><code class="option">snlen</code> option</h3></div></div></div><p>
+</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>The following Garmin units do not follow the standard Garmin 
+communications protocol and are <span class="emphasis"><em>not supported</em></span> 
+by GPSBabel.</p><p>
+Marine plotters:
+</p><table class="simplelist" border="0" summary="Simple list"><tr><td>GPSMap 420</td><td>GPSMap 450</td><td>GPSMap 530</td><td>GPSMap 545</td></tr><tr><td>GPSMap 430</td><td>GPSMap 520</td><td>GPSMap 535</td><td>GPSMap 550</td></tr><tr><td>GPSMap 440</td><td>GPSMap 525</td><td>GPSMap 540</td><td>GPSMap 555</td></tr></table><p>
+</p><p>The PDA products
+</p><table class="simplelist" border="0" summary="Simple list"><tr><td>iQue 3000</td></tr><tr><td>iQue 3200</td></tr><tr><td>iQue 3600</td></tr><tr><td>iQue M3</td></tr><tr><td>iQue M4</td></tr><tr><td>iQue M5</td></tr></table><p>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_o_snlen"></a><code class="option">snlen</code> option</h3></div></div></div><p>
       Length of generated shortnames.
     </p><p>This option overrides the internal logic to figure out how many
 characters an addressed Garmin GPS will support when using the '-s' smartname
@@ -1402,7 +1599,7 @@ just those that do not already have descriptions.  That is, this option
 overrides any icon description that might be in the input file.
 </p><p>
 Value specified may be a number from the Garmin Protocol Spec or a name
-as described in the <a href="#GarminIcons" title="Appendix B. Garmin Icons">Appendix B, <i>Garmin Icons</i></a>.
+as described in the <a class="xref" href="#GarminIcons" title="Appendix B. Garmin Icons">Appendix B, <i>Garmin Icons</i></a>.
 </p><p>
 This option has no effect on input.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_o_get_posn"></a><code class="option">get_posn</code> option</h3></div></div></div><p>
@@ -1418,11 +1615,38 @@ Obviously, further processing once you have sent a "power off" command to
 a unit that supports it is rather futile, so place this option carefully
 in your command.
 
-</p><p><strong class="userinput"><code>gpsbabel -o garmin,power_off -F /dev/ttyS0</code></strong></p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_o_category"></a><code class="option">category</code> option</h3></div></div></div><p>
+</p><p><strong class="userinput"><code>gpsbabel -o garmin,power_off -F /dev/ttyS0</code></strong></p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_o_resettime"></a><code class="option">resettime</code> option</h3></div></div></div><p>
+      Sync GPS time to computer time.
+    </p><p>
+  This option is experimental and was added to solve a very specific problem.
+  Certain Garmin units (the original black and white Vista is known to have 
+  this) will sometimes scramble their clock crazy far into the future (like
+  2066).  When this happens, the GPS itself may or may not work and 
+  later conversations with GPSBabel may fail as the time overflows the
+  documented range.  The use of <code class="option">resettime</code> brings the GPS's internal clock
+  back close enough to reality that the GPS itself can then "fix" it when
+  it has next a lock.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_o_category"></a><code class="option">category</code> option</h3></div></div></div><p>
       Category number to use for written waypoints.
     </p><p>This numeric option will force waypoints to be written with that
 category number when sending to a Garmin receiver that has category
-support. It is ignored on receivers without that capability. </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_gtrnctr"></a>Garmin Training Centerxml (gtrnctr)</h2></div></div></div><p class="fmtcapshdr">
+support. It is ignored on receivers without that capability. </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_garmin_o_bitscategory"></a><code class="option">bitscategory</code> option</h3></div></div></div><p>
+      Bitmap of categories.
+    </p><p>
+ This option is closely related to the 'category' option.  While category 
+ allows you to choose a single category that waypoints should appear in,
+ this options allows you to specify a bitmask to be used for the category.
+ Options may be specified in either decimal or hex.
+</p><div class="example"><a id="garmin_bitcategory"></a><p class="title"><b>Example 3.7. Example for garmin bitcategory option to put all waypoints in categories 1 and 16.</b></p><div class="example-contents"><p>
+  The following two commands are equivalent.  They place a the point in both the first and last of the sixteen available categories.
+  <strong class="userinput"><code>
+        gpsbabel -i gpx -f PocketQuery.gpx -o garmin,bitcategory=32769 -F usb:
+  </code></strong>
+  <strong class="userinput"><code>
+        gpsbabel -i gpx -f PocketQuery.gpx -o garmin,bitcategory=0x8001 -F usb:
+  </code></strong>
+  
+</p></div></div><br class="example-break" /></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_gtrnctr"></a>Garmin Training Centerxml (gtrnctr)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           write tracks
@@ -1443,13 +1667,13 @@ calories and heart zone tracking are not supported.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format supports the <a href="http://www.geocaching.com" target="_top">Geocaching.com</a>/<a href="http://www.easygps.com" target="_top">EasyGPS</a> ".loc" format.  This format
+This format supports the <a class="ulink" href="http://www.geocaching.com" target="_top">Geocaching.com</a>/<a class="ulink" href="http://www.easygps.com" target="_top">EasyGPS</a> ".loc" format.  This format
 was created specifically for Geocaching.com and is not the same as the 
-standard EasyGPS .loc format.  See the <a href="#fmt_easygps" title="EasyGPS binary format (easygps)">EasyGPS</a> 
-or <a href="#fmt_gpx" title="GPX XML (gpx)">GPX</a> formats for more general EasyGPS support.
+standard EasyGPS .loc format.  See the <a class="link" href="#fmt_easygps" title="EasyGPS binary format (easygps)">EasyGPS</a> 
+or <a class="link" href="#fmt_gpx" title="GPX XML (gpx)">GPX</a> formats for more general EasyGPS support.
 </p><p>
 This is a simple XML-based format containing only very basic information 
-about geocaches.  If you can use the <a href="#fmt_gpx" title="GPX XML (gpx)">GPX</a> 
+about geocaches.  If you can use the <a class="link" href="#fmt_gpx" title="GPX XML (gpx)">GPX</a> 
 format instead, you should consider doing so as it is a much richer format.
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_geo_o_deficon"></a><code class="option">deficon</code> option</h3></div></div></div><p>
       Default icon name.
@@ -1477,7 +1701,7 @@ This option has no effect on output.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>This is format for the 
-<a href="http://vip.hyperusa.com/~dougs/geocachingdb/geocachingdb.htm" target="_top">
+<a class="ulink" href="http://vip.hyperusa.com/~dougs/geocachingdb/geocachingdb.htm" target="_top">
 GeocachingDB</a> program by DougsBrat.  It works with v2
 and v3 of this program. 
          </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_ggv_log"></a>Geogrid Viewer tracklogs (.log) (ggv_log)</h2></div></div></div><p class="fmtcapshdr">
@@ -1491,14 +1715,14 @@ and v3 of this program.
    GPSBabel has full support for version 1.0 of this file format. 
 </p><p>
    We can also read some GPS data (including coordinates) from version 2.5. But 
-   it seems, that this newer version doesn't more store time stamps. This can be 
+   it seems, that this newer version no longer stores time stamps. This can be 
    a problem when converting to other formats or if you want to use our track filter.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_geonet"></a>GEOnet Names Server (GNS) (geonet)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>Input support for the GEOnet Names Server (GNS) country
 file structure.  Export to this format is not possible, as this format
@@ -1507,7 +1731,7 @@ format.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlep
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
-        </p></li></ul></div><p><a href="http://www.raydarllc.com/" target="_top">Geoniche</a> is a Palm/OS application oriented for the
+        </p></li></ul></div><p><a class="ulink" href="http://www.raydarllc.com/" target="_top">Geoniche</a> is a Palm/OS application oriented for the
 off-road user.  This module was contributed by Rick Richardson.  
          </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_geoniche_o_dbname"></a><code class="option">dbname</code> option</h3></div></div></div><p>
       Database name (filename).
@@ -1521,7 +1745,23 @@ appears in the file browser on your handheld.
 This option specifies the name of the category in which to place the
 waypoints.  If this option is not specified, the default category is
 "Cache".
-</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_kml"></a>Google Earth (Keyhole) Markup Language (kml)</h2></div></div></div><p class="fmtcapshdr">
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_dg-100"></a>GlobalSat DG-100/BT-335 Download (dg-100)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read tracks
+        </p></li></ul></div><p>Serial download protocol for the <span class="productname">GlobalSat DG-100</span>™ GPS data logger. Although untested it is expected that this will also support the BT-335.</p><p>While the DG-100 has a button to record waypoints, they seem to be indistinguishable from trackpoints. Therefore, all points will be presented as trackpoints, disregarding whether they were recorded automatically or manually.</p><p>
+<a class="ulink" href="http://www.globalsat.com.tw/eng/product_detail_00000090.htm" target="_top">GlobalSat DG-100</a>
+</p><div class="example"><a id="dg-100-on-linux"></a><p class="title"><b>Example 3.8. Command showing DG-100 download and erase on Linux</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -t -i dg-100,erase -o gpx /dev/ttyUSB0 outputfile.gpx</code></strong></p></div></div><br class="example-break" /><p>
+The DG-100 provides a physical USB interface to the host computer, but
+internally it uses a Prolific PL-2303 chip to do this.  So you must have
+drivers installed on your computer to recognize the PL-2303 and provide
+that data as a serial port to software like GPSBabel.   Such software
+comes with the unit for Windows.  Prolific provides software for Mac OS/X,
+but unfortunately their driver has a defect which makes it unusable with
+GPSBabel.
+</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_dg-100_o_erase"></a><code class="option">erase</code> option</h3></div></div></div><p>
+      Erase device data after download.
+    </p><p>This option erases the track log from the device after download.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_kml"></a>Google Earth (Keyhole) Markup Language (kml)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
@@ -1531,12 +1771,31 @@ waypoints.  If this option is not specified, the default category is
           read and write routes
         </p></li></ul></div><p> 
 KML, the Keyhole Markup Language, is used by Keyhole and
-<a href="http://earth.google.com" target="_top">Google Earth</a>.  There are features in this file format that GPSBabel
-doesn't support - such as camera views - but waypoints, tracks, and routes 
-work well.
+<a class="ulink" href="http://earth.google.com" target="_top">Google Earth</a>.  
+</p><p>There are concepts in KML that GPSBabel can't support very well on 
+read becuase they don't map well into other programs.  For example, KML has
+ideas of camera views and names and descriptions can have arbitrarily 
+complicated HTML in them.   KML files may have tiered "Styles" which
+can identify sizing info and URLs of associated icons.   Reading such
+files with GPSBabel - even if your goal it to out to KML - can often
+have suprising results.  Simple files with waypoints and paths (which
+GPSBabel represents internally as tracks) work fine.
 </p><p>
 Google Earth also uses GPSBabel internally for receiver communications
 and several file format imports and exports.
+</p><p>
+In general, GPSBabel's KML writer is relatively strong.  GPSBabel handles simple KML on read fairly well, but if you're dealing with handcrafted KML that uses extensive features that have no analog in other formats like nested folders, ringgeometry, camera angles, and such, don't expect GPSBabel to do well with them on read.
+</p><p>
+  Google Earth 4.0 and later have a feature that can suprise users of this 
+  format.   Earth's "time slider" feature controls what timestamped data
+  gets displayed.  If you're using data that has timestampes (e.g. GPX 
+  points that contain time or almost any track data) this will be important
+  to you.  The time slider defaults to the far left position and fully closed.
+  This means that only the first data point will be displayed.  You can
+  tweak Earth's settings to "view-&gt;show time-&gt;never" or
+  you can widen the time slider to show the range of data of interest.
+</p><p>
+  See <a class="ulink" href="http://earth.google.com/userguide/v4/ug_gps.com#timeline" target="_top">Google Earth's documentation on timelines</a> for more info.
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_kml_o_deficon"></a><code class="option">deficon</code> option</h3></div></div></div><p>
       Default icon name.
     </p><p>
@@ -1590,6 +1849,11 @@ By default computed speed, timestamps, and so on are written with the default
 of '1' for this option.   If you are writing large tracks and do not value
 this information, you can reduce the size of the generated file substantially
 by turning this flag off by setting it to '0'.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_kml_o_trackdirection"></a><code class="option">trackdirection</code> option</h3></div></div></div><p>
+      Indicate direction of travel in track icons (default = 0).
+    </p><p>
+  If set, this options creates directional icons for trackpoints.   Arrows 
+  will show the direction of travel on drawn tracks and routes.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_kml_o_units"></a><code class="option">units</code> option</h3></div></div></div><p>
       Units used when writing comments ('s'tatute or 'm'etric).
     </p><p>
@@ -1611,7 +1875,7 @@ This option defaults to one, so labels are added by default.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read tracks
         </p></li></ul></div><p> This format is designed to read the XML emitted when you
-tack "&amp;output=js" onto the end of a <a href="http://www.maps.google.com&gt;Google Maps" target="_top">Google Maps</a>route URL (use
+tack "&amp;output=js" onto the end of a <a class="ulink" href="http://maps.google.com&gt;Google Maps" target="_top">Google Maps</a> route URL (use
 the "link to this page" option to get a usable URL.)  This allows you
 to plan a route using Google Maps, then download it and use it in your
 own mapping program or GPS receiver.   To get a file suitable for use
@@ -1643,7 +1907,7 @@ gpsbabel -i google -f google_map.js -o gpx -F google_map.gpx
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p> This is a Palm/OS file format for 
-            <a href="http://www.cru.fr/perso/cc/GPilotS/" target="_top">GPilotS</a>.
+            <a class="ulink" href="http://www.cru.fr/perso/cc/GPilotS/" target="_top">GPilotS</a>.
        It was tested against version 6.2 of GPilotsS
 </p><p> Neither tracks nor routes are supported at this
 time.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gpilots_o_dbname"></a><code class="option">dbname</code> option</h3></div></div></div><p>
@@ -1661,22 +1925,22 @@ appears in the file browser on your handheld.
         </p></li><li><p class="fmtcapsitem">
           read and write routes
         </p></li></ul></div><p>Input and output support for waypoints, tracks and routes in
-             the <a href="http://www.gpstm.com" target="_top">GPS TrackMaker </a>
+             the <a class="ulink" href="http://www.gpstm.com" target="_top">GPS TrackMaker </a>
               binary format.</p><p>Code implemented by Gustavo Niemeyer.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_arc"></a>GPSBabel arc filter file (arc)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
 This format is used by GPSBabel itself as the input to the 
-<a href="#filter_arc" title="Include Only Points Within Distance of Arc (arc)">arc</a> and 
-<a href="#filter_polygon" title="Include Only Points Inside Polygon (polygon)">polygon</a> filters.  See those filters
+<a class="link" href="#filter_arc" title="Include Only Points Within Distance of Arc (arc)">arc</a> and 
+<a class="link" href="#filter_polygon" title="Include Only Points Inside Polygon (polygon)">polygon</a> filters.  See those filters
 for more information.
 </p><p>
 The arc format reads two numeric fields, a latitude and a longitude, 
-in any format recognized as <a href="#style_def_lathuman" title="LAT_HUMAN_READABLE">human 
+in any format recognized as <a class="link" href="#style_def_lathuman" title="LAT_HUMAN_READABLE">human 
 readable</a> and writes as simple degrees decimal.  It really is
 intended for GPSBabel's own internal use more than general use, though
 it turns out to be a convenient way of expressing simple polylines and 
@@ -1686,16 +1950,16 @@ polygons.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>GpsDrive way.txt file format. A space seperated format
-file. Tested against GpsDrive v 1.30 found at <a href="http://www.kraftvoll.at/software" target="_top">kraftvoll.at</a>.
+file. Tested against GpsDrive v 1.30 found at <a class="ulink" href="http://www.gpsdrive.de" target="_top">gpsdrive.de</a>.
 Contributed by Alan Curry.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_gpsdrivetrack"></a>GpsDrive Format for Tracks (gpsdrivetrack)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>Format used by GpsDrive to save tracks. Like GPSDRIVE a
 space seperated format file. See above for a link to GpsDrive.
@@ -1704,19 +1968,19 @@ Contributed by Tobias Minich.</p></div><div class="section" lang="en" xml:lang="
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
-</p><p> <a href="http://www.ncc.up.pt/gpsman/" target="_top">GPS Manager</a> 
+</p><p> <a class="ulink" href="http://www.ncc.up.pt/gpsman/" target="_top">GPS Manager</a> 
 can read and write formats GPSBabel doesn't understand.  The format defaults
 (WGS84, DDD) work reliably.  Tracks, routes, and non-default format options
 are not supported.
        </p><p>This format is documented at the GPS Manager 
-       <a href="http://www.ncc.up.pt/gpsman/gpsmanhtml/manual/html/GPSMandoc_30.html" target="_top">doc site</a>.
+       <a class="ulink" href="http://www.ncc.up.pt/gpsman/gpsmanhtml/manual/html/GPSMandoc_30.html" target="_top">doc site</a>.
        </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_gpspilot"></a>GPSPilot Tracker for Palm/OS (gpspilot)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
-        </p></li></ul></div><p>The file format for GPSPILOT <a href="http://www.gpspilot.com" target="_top">gpspilot.com</a> was provided by Ron
+        </p></li></ul></div><p>The file format for GPSPILOT <a class="ulink" href="http://www.gpspilot.com" target="_top">gpspilot.com</a> was provided by Ron
 Parker.  The output from this module has been tested with GPSPilot
 Tracker v5.05sx, but it is based on reverse-engineering so it may not
 work with all versions of all GPSPilot products.  It had read-only
@@ -1731,12 +1995,12 @@ appears in the file browser on your handheld.
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
-        </p></li></ul></div><p>The format we call <a href="http://www.cs.uakron.edu/~hennings/gpsutil" target="_top">gpsutil</a> is a simple file format used by a program that runs
+        </p></li></ul></div><p>The format we call <a class="ulink" href="http://www.cs.uakron.edu/~hennings/gpsutil" target="_top">gpsutil</a> is a simple file format used by a program that runs
 on POSIX- compliant OSes like UNIX and Linux.  Reads and writes of
-this format are very reliable.  (<a href="/people/robertlipe.html" target="_top">The lead
+this format are very reliable.  (<a class="ulink" href="/people/robertlipe.html" target="_top">The lead
 developer of GPSBabel</a> also contributed to this that 'gpsutil' 
 the early days.)</p><p>
-       Note that 'gpsutil' is a different format - and program - than the one called <a href="http://www.gpsu.co.uk/index.html" target="_top">GPS Utility</a>; for that one, you should probably use our  <a href="#fmt_pcx" title="Garmin PCX5 (pcx)">PCX module</a>.
+       Note that 'gpsutil' is a different format - and program - than the one called <a class="ulink" href="http://www.gpsu.co.uk/index.html" target="_top">GPS Utility</a>; for that one, you should probably use our  <a class="link" href="#fmt_pcx" title="Garmin PCX5 (pcx)">PCX module</a>.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_gpx"></a>GPX XML (gpx)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -1746,22 +2010,32 @@ the early days.)</p><p>
         </p></li><li><p class="fmtcapsitem">
           read and write routes
         </p></li></ul></div><p>This is the most capable and expressive of all the file
-formats supplied.  It is described at <a href="http://www.topografix.com/gpx.asp" target="_top">topografix.com</a> and is
+formats supplied.  It is described at <a class="ulink" href="http://www.topografix.com/gpx.asp" target="_top">topografix.com</a> and is
 supported by EasyGPS, ExpertGPS, and many other programs described at
-<a href="http://www.topografix.com/gpx_resources.asp" target="_top">topografix.com</a>
+<a class="ulink" href="http://www.topografix.com/gpx_resources.asp" target="_top">topografix.com</a>
          </p><p>
        GPSBabel's reader of this module attempts to preserve tags it doesn't
        really understand.   It also tries to glean interesting data from
-       <a href="http://www.geocaching.com" target="_top">pocket queries from Geocaching.com</a>.
+       <a class="ulink" href="http://www.geocaching.com" target="_top">pocket queries from Geocaching.com</a> and Garmin's "gpxx" GPX extensions.
        </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gpx_o_snlen"></a><code class="option">snlen</code> option</h3></div></div></div><p>
       Length of generated shortnames.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gpx_o_suppresswhite"></a><code class="option">suppresswhite</code> option</h3></div></div></div><p>
+    </p><p>
+  When used with the <code class="option"> -s </code> to control shortnames, the snlen suboption to GPX controls how long the generated smartname will be.  This can be useful for cases like writing GPX files to a GPS that has a fixed waypoint name length.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gpx_o_suppresswhite"></a><code class="option">suppresswhite</code> option</h3></div></div></div><p>
       No whitespace in generated shortnames.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gpx_o_logpoint"></a><code class="option">logpoint</code> option</h3></div></div></div><p>
+    </p><p>
+When used with the <code class="option">-s</code> to generate smart shortnames, this suboption controls whether whitespace is allowed in the generated shortnames.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gpx_o_logpoint"></a><code class="option">logpoint</code> option</h3></div></div></div><p>
       Create waypoints from geocache log entries.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gpx_o_urlbase"></a><code class="option">urlbase</code> option</h3></div></div></div><p>
+    </p><p>
+       When reading <a class="ulink" href="http://www.geocaching.com" target="_top"> Groundspeak Pocket Queries </a>, the <code class="option">logpoint</code> option creates additional waypoints from the log entries.
+</p><p>
+       A typical use for this is to get coordinates read from "corrected coordinates" logs.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gpx_o_urlbase"></a><code class="option">urlbase</code> option</h3></div></div></div><p>
       Base URL for link tag in output.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gpx_o_gpxver"></a><code class="option">gpxver</code> option</h3></div></div></div><p>
+    </p><p>
+  This is a fairly esoteric option.  If the GPX file you are reading has only base pathnames (e.g "foo.html") the value you specify to this argument will be prepended to that.  For example, "-o gpx,urlbase=c:\My Documents\Whatever" would result in the link to that waypoint being written to refer to <code class="filename">c:\My Document\WHatever\foo.html</code>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_gpx_o_gpxver"></a><code class="option">gpxver</code> option</h3></div></div></div><p>
       Target GPX version for output.
     </p><p>
 This option specifies the version of the GPX specification to use for 
@@ -1780,14 +2054,14 @@ result in a horribly mangled GPX file as we can't convert the schema data.
           read and write tracks
         </p></li></ul></div><p>This is the .gps format used by the Mac OS X applications
 written by HikeTech. These include TopoDraw, Link2GPS, and GPSWrite.
-More information about these products can be found at <a href="http://www.hiketech.com" target="_top">hiketech.com</a>
+More information about these products can be found at <a class="ulink" href="http://www.hiketech.com" target="_top">hiketech.com</a>
          </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_holux"></a>Holux (gm-100) .wpo Format (holux)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p> The Holux gm-100 (e-fox) gps receiver uses standard
 compact flash cards.  File formats were provided by Holux-Taiwan
-<a href="http://www.holux.com.tw" target="_top">holux.com</a> to the author.
+<a class="ulink" href="http://www.holux.com.tw" target="_top">holux.com</a> to the author.
 The code was tested against version 2.27E1; other versions and
 receivers may work but have not been explictly tested.  Anyone with
 information on other Holux receivers is encouraged to contact
@@ -1822,7 +2096,7 @@ input file while maintaining almost all of the source HTML formatting.
 This makes this format well suited for generating HTML to hand to programs
 like Plucker for putting in a PDA and especially so for "paperless caching"
 for Geocachers with pocket queries.
-</p><p>This format is similar to the <a href="#fmt_text" title="Textual Output (text)">text</a> format.
+</p><p>This format is similar to the <a class="link" href="#fmt_text" title="Textual Output (text)">text</a> format.
 </p><p> The following command line reads a GPX file with
 Groundspeak extensions and writes an HTML file with encrypted hints
 that is rendered using a custom stylesheet:
@@ -1864,21 +2138,21 @@ encoded. Trackpoints do not have time stamps.
 Because the format supports only one track, this option may be used 
 on output to select a single track from a collection of 
 tracks read from a more expressive format.  If you have, say, a 
-<a href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that contains two tracks, you may
+<a class="link" href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that contains two tracks, you may
 use this option to write them one at a time to individual files.
 </p><p><strong class="userinput"><code>gpsbabel -i gpx -f tracks.gpx -o ignrando,index=1 -F track1.txt -o ignrando,index=2 -F track2.txt</code></strong></p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_ktf2"></a>Kartex 5 Track File (ktf2)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
-          read and write waypoints
+          read and write tracks
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
-</p><p>Support for Kartex 5 trackfiles. For more info see kwf2.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_kwf2"></a>Kartex 5 Waypoint File (kwf2)</h2></div></div></div><p class="fmtcapshdr">
+</p><p>Support for Kartex 5 trackfiles. For more info see <a class="link" href="#fmt_kwf2" title="Kartex 5 Waypoint File (kwf2)">kwf2</a>.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_kwf2"></a>Kartex 5 Waypoint File (kwf2)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>Support for Kartex 5 waypoint files. Kartex is a Swedish 
        map and GPS positioning system. GPSBabel can read and write 
@@ -1889,25 +2163,25 @@ format, so it has all of the same options as that format.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write tracks
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
   This module supports track files used by Kompass and DAV "Deutscher Alpenverein".
 </p><p>
-  <a href="http://www.kompass.at" target="_top">Kompass</a> is a publishing company from Austria.
+  <a class="ulink" href="http://www.kompass.at" target="_top">Kompass</a> is a publishing company from Austria.
   If you want to get more information about DAV, the German alpine association, 
-  and if you are familiar with the german language, please have a look at their <a href="http://www.alpenverein.de" target="_top">homepage</a>.
+  and if you are familiar with the german language, please have a look at their <a class="ulink" href="http://www.alpenverein.de" target="_top">homepage</a>.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_kompass_wp"></a>Kompass (DAV) Waypoints (.wp) (kompass_wp)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
   This module supports waypoint files used by Kompass and DAV "Deutscher Alpenverein".
 </p><p>
-  Some more information under <a href="#fmt_kompass_tk" title="Kompass (DAV) Track (.tk) (kompass_tk)">kompass_tk</a> format.
+  Some more information under <a class="link" href="#fmt_kompass_tk" title="Kompass (DAV) Track (.tk) (kompass_tk)">kompass_tk</a> format.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_psitrex"></a>KuDaTa PsiTrex text (psitrex)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -1930,7 +2204,7 @@ Bradley.</p></div><div class="section" lang="en" xml:lang="en"><div class="title
         </p></li><li><p class="fmtcapsitem">
           read and write routes
         </p></li></ul></div><p> 
-The <a href="http://www.lowrance.com" target="_top">Lowrance iFinder GPS</a> series has the unique capability
+The <a class="ulink" href="http://www.lowrance.com" target="_top">Lowrance iFinder GPS</a> series has the unique capability
 to output its data to an MMC card.  The data is saved to the card as a
 .USR file and can be read by your computer using a card reader.
 Waypoints, icons, routes, tracks are supported.   Event marker icons contain a symbol, name, latitude and longitude
@@ -1958,7 +2232,7 @@ file.
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           write waypoints
-        </p></li></ul></div><p> This format support the on-card format used by the <a href="http://www.magellangps.com" target="_top">Magellan</a> Explorist 400,
+        </p></li></ul></div><p> This format support the on-card format used by the <a class="ulink" href="http://www.magellangps.com" target="_top">Magellan</a> Explorist 400,
 Explorist 500, Explorist 600, Explorist 210, and Explorist XL 
 to describe geocaches.  Notice what while the format can
 hold an infinite number of geocaches, the unit will read and silently
@@ -1973,7 +2247,7 @@ discard all but 200 geocache POIs at a time.</p><p> You should name any file cre
         </p></li><li><p class="fmtcapsitem">
           read and write routes
         </p></li></ul></div><p>
-This format supports the <a href="http://www.magellangps.com" target="_top">Magellan</a> <span class="productname">MapSend</span>™ native
+This format supports the <a class="ulink" href="http://www.magellangps.com" target="_top">Magellan</a> <span class="productname">MapSend</span>™ native
 file format.
 </p><p>
 Kudos to Magellan for having the foresight to document their file formats,
@@ -1989,7 +2263,7 @@ Valid values are 3 (MapSend v3.0) or 4 (MapSend v4.0 and v4.1).
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-<a href="http://www.magellangs.com" target="_top">Magellan</a> NAV Companion for Palm/OS is not really designed
+<a class="ulink" href="http://www.magellangs.com" target="_top">Magellan</a> NAV Companion for Palm/OS is not really designed
 for this sort of use, but its file format is supported and with a
 little bit of patience you can both read and write NAV Companion
 waypoints.  This conversion is based on
@@ -2032,9 +2306,9 @@ the database and fix the record pointers that it keeps on the heap.
         </p></li><li><p class="fmtcapsitem">
           read and write routes
         </p></li></ul></div><p>
-       This is the SD card format used by the <a href="http://www.magellangps.com" target="_top">Magellan</a> Explorist 400,
+       This is the SD card format used by the <a class="ulink" href="http://www.magellangps.com" target="_top">Magellan</a> Explorist 400,
        Explorist 500, Explorist 600, and Explorist XL and internally on those devices plus the 
-       Explorist 210.  Stored waypoints are identical to the <a href="#fmt_magellan" title="Magellan SD files (as for Meridian) (magellan)">Magellan SD format</a>
+       Explorist 210.  Stored waypoints are identical to the <a class="link" href="#fmt_magellan" title="Magellan SD files (as for Meridian) (magellan)">Magellan SD format</a>
        used by Meridian, but the newer models allow longer waypoint names.  Routes are 
        subtly different.
 </p><p>        
@@ -2044,7 +2318,9 @@ the database and fix the record pointers that it keeps on the heap.
        named ".log".
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_magellanx_o_deficon"></a><code class="option">deficon</code> option</h3></div></div></div><p>
       Default icon name.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_magellanx_o_maxcmts"></a><code class="option">maxcmts</code> option</h3></div></div></div><p>
+    </p><p>
+  The deficon option is used to control the icon output when writing to this format.   It overrides any icon informatino that might be present in the source data.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_magellanx_o_maxcmts"></a><code class="option">maxcmts</code> option</h3></div></div></div><p>
       Max number of comments to write (maxcmts=200).
     </p><p>
 The maxcmts option allows you to specify the number comments that will
@@ -2065,7 +2341,7 @@ could provide driving directions for the next ten turns.
           read and write tracks
         </p></li><li><p class="fmtcapsitem">
           read and write routes
-        </p></li></ul></div><p>GPSBabel supports the following <a href="http://www.magellangps.com" target="_top">Magellan</a> receivers:
+        </p></li></ul></div><p>GPSBabel supports the following <a class="ulink" href="http://www.magellangps.com" target="_top">Magellan</a> receivers:
 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>310</td><td>Meridian Color</td></tr><tr><td>315</td><td>Explorist 100 (with aftermarket cable)</td></tr><tr><td>Map330</td><td>Explorist 200 (with aftermarket cable)</td></tr><tr><td>SporTrak Map Color</td><td>Explorist 300 (with aftermarket cable)</td></tr><tr><td>SporTrak Map</td><td>Explorist 210</td></tr><tr><td>SporTrak Map Pro</td><td>Explorist 300</td></tr><tr><td>SporTrak Map Topo</td><td>Explorist 400</td></tr><tr><td>Meridian (green or yellow)</td><td>Explorist 500</td></tr><tr><td>Meridian Gold</td><td>Explorist 600</td></tr><tr><td>Meridian Platinum</td><td>Explorist XL</td></tr></table><p>
 </p><p>
        This format is used for both the serial protocol used on the
@@ -2080,7 +2356,9 @@ could provide driving directions for the next ten turns.
        will results in the file-based format being used.
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_magellan_o_deficon"></a><code class="option">deficon</code> option</h3></div></div></div><p>
       Default icon name.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_magellan_o_maxcmts"></a><code class="option">maxcmts</code> option</h3></div></div></div><p>
+    </p><p>
+  The deficon option is used to control the icon output when writing to this format.   It overrides any icon informatino that might be present in the source data.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_magellan_o_maxcmts"></a><code class="option">maxcmts</code> option</h3></div></div></div><p>
       Max number of comments to write (maxcmts=200).
     </p><p>
 The maxcmts option allows you to specify the number comments that will
@@ -2101,7 +2379,7 @@ could provide driving directions for the next ten turns.
           read and write tracks
         </p></li><li><p class="fmtcapsitem">
           read and write routes
-        </p></li></ul></div><p>GPSBabel supports the following <a href="http://www.magellangps.com" target="_top">Magellan</a> receivers:
+        </p></li></ul></div><p>GPSBabel supports the following <a class="ulink" href="http://www.magellangps.com" target="_top">Magellan</a> receivers:
 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>310</td><td>Meridian Color</td></tr><tr><td>315</td><td>Explorist 100 (with aftermarket cable)</td></tr><tr><td>Map330</td><td>Explorist 200 (with aftermarket cable)</td></tr><tr><td>SporTrak Map Color</td><td>Explorist 300 (with aftermarket cable)</td></tr><tr><td>SporTrak Map</td><td>Explorist 210</td></tr><tr><td>SporTrak Map Pro</td><td>Explorist 300</td></tr><tr><td>SporTrak Map Topo</td><td>Explorist 400</td></tr><tr><td>Meridian (green or yellow)</td><td>Explorist 500</td></tr><tr><td>Meridian Gold</td><td>Explorist 600</td></tr><tr><td>Meridian Platinum</td><td>Explorist XL</td></tr></table><p>
 </p><p>
 The RoadMate family of products is not supported.
@@ -2117,10 +2395,12 @@ The RoadMate family of products is not supported.
        will result in the file-based format being used.
 </p><p>
        Users of the Explorist generation of receivers should probably
-       prefer to use the <a href="#fmt_magellan" title="Magellan SD files (as for Meridian) (magellan)">magellanx</a>
+       prefer to use the <a class="link" href="#fmt_magellan" title="Magellan SD files (as for Meridian) (magellan)">magellanx</a>
        format over this one.
 
-</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_magellan1_o_deficon"></a><code class="option">deficon</code> option</h3></div></div></div><p>
+</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Important</h3><p>
+This module does not support the units that do not follow Magellan's
+documented communications protocols including:</p><table class="simplelist" border="0" summary="Simple list"><tr><td>Maestro 3100</td><td> RoadMate 800</td></tr><tr><td>Maestro 3140</td><td> RoadMate 860T</td></tr><tr><td>Maestro 3200</td><td> RoadMate 1200 </td></tr><tr><td>Maestro 3210</td><td> RoadMate 1400 </td></tr><tr><td>Maestro 3220</td><td> RoadMate 1412 </td></tr><tr><td>Maestro 3225</td><td> RoadMate 1430 </td></tr><tr><td>Maestro 3250</td><td> RoadMate 2000 </td></tr><tr><td>Maestro 4000</td><td> RoadMate 2000 </td></tr><tr><td>Maestro 4040</td><td> RoadMate 2200T</td></tr><tr><td>Maestro 4050</td><td> RoadMate 3000T</td></tr><tr><td>Maestro 4200</td><td> RoadMate 3050T</td></tr><tr><td>Maestro 4210</td><td> RoadMate 6000T</td></tr><tr><td>Maestro 4220</td><td> RoadMate AAA </td></tr><tr><td>Maestro 4250</td><td> Triton 200 </td></tr><tr><td>Maestro 5310</td><td> Triton 300 </td></tr><tr><td> RoadMate 300 </td><td> Triton 400 </td></tr><tr><td> RoadMate 360 </td><td> Triton 500 </td></tr><tr><td> RoadMate 500</td><td> Triton 1500 </td></tr><tr><td> RoadMate 700 </td><td> Triton 2000 </td></tr><tr><td> RoadMate 760</td><td> </td></tr></table></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_magellan1_o_deficon"></a><code class="option">deficon</code> option</h3></div></div></div><p>
       Default icon name.
     </p><p>
 This option specifies the icon or waypoint type to write for each waypoint on
@@ -2178,7 +2458,21 @@ to ensure the units starts with a clean state before sending waypoints to
 it.   Using this option on transmit is a better idea than doing it on 
 receive since the latter would erase all the waypoints before asking the
 unit to send all the waypoints.
-</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_tef"></a>Map&amp;Guide 'TourExchangeFormat' XML (tef)</h2></div></div></div><p class="fmtcapshdr">
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_ik3d"></a>MagicMaps IK3D project file (.ikt) (ik3d)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read waypoints
+        </p></li><li><p class="fmtcapsitem">
+          read tracks
+        </p></li></ul></div><p>
+  This is the format for <a class="ulink" href="http://www.magicmaps.de" target="_top">MagicMaps</a> project (.ikt) files.
+</p><p>
+  <a class="ulink" href="http://www.magicmaps.de" target="_top">MagicMaps</a> <span class="productname">"Das interaktive Kartenwerk"</span>™ is a Software from Germany. It's a
+  route-planning software with a 3-dimensional envirounment.
+</p><p>
+  The project files are XML based and we can read the main GPS items (names and coordinates). 
+  For an output these files are too complex.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_tef"></a>Map&amp;Guide 'TourExchangeFormat' XML (tef)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read routes
@@ -2189,7 +2483,7 @@ used by Map&amp;Guide <span class="productname">Motorrad-Routenplaner 2005/06</s
 Because this is only an export format, GPSBabel does not support writing to
 this format.
 </p><p>
-GPSBabel also supports the <a href="#fmt_bcr" title="Motorrad Routenplaner (Map&amp;Guide) .bcr files (bcr)">bcr</a> format, which 
+GPSBabel also supports the <a class="link" href="#fmt_bcr" title="Motorrad Routenplaner (Map&amp;Guide) .bcr files (bcr)">bcr</a> format, which 
 may also be used with this program and supports both reading and writing.
 </p><p><strong class="userinput"><code> gpsbabel -r -i tef,routevia -f in.xml -o gpx -F out.gpx</code></strong></p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_tef_o_routevia"></a><code class="option">routevia</code> option</h3></div></div></div><p>
       Include only via stations in route.
@@ -2211,7 +2505,7 @@ has been tested with PowerRoute 5+6, Motorrad-Routenplaner
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
 Mapconverter is a format that is read by Mapopolis.com's
@@ -2254,7 +2548,7 @@ Mapconverter is no longer available from the Mapopolis website.  If you
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>Maptech Exchange Format - Another CSV format file.  This
 format complies with (at least) Maptech Terrain Navigator, Terrain
@@ -2264,7 +2558,9 @@ Contributed by Alex Mottram.</p></div><div class="section" lang="en" xml:lang="e
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read routes
         </p></li></ul></div><p> Input support for Microsoft AutoRoute 2002-2006 .axe files
-and Microsoft Streets and Trips .est files.
+and Microsoft Streets and Trips .est files.  This is for reading routes
+created this program and is different than the <a class="link" href="#fmt_s_and_t" title="Microsoft Streets and Trips 2002-2007 (s_and_t)">
+s_and_t</a> format used for writing pushpins.</p><p>
 These files contains only routes. We can extract the coordinates and
 the names of the points within route. An export to this format will
 not be supported.</p><p>Only the start, stops, and end points are stored in the 
@@ -2281,7 +2577,9 @@ adding stops at intersections can also improve the results when converting.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read routes
         </p></li></ul></div><p> Input support for Microsoft AutoRoute 2002-2006 .axe files
-and Microsoft Streets and Trips .est files.
+and Microsoft Streets and Trips .est files.  This is for reading routes
+created this program and is different than the <a class="link" href="#fmt_s_and_t" title="Microsoft Streets and Trips 2002-2007 (s_and_t)">
+s_and_t</a> format used for writing pushpins.</p><p>
 These files contains only routes. We can extract the coordinates and
 the names of the points within route. An export to this format will
 not be supported.</p><p>Only the start, stops, and end points are stored in the 
@@ -2293,19 +2591,21 @@ use the Streets and Trips drawing tools to trace a line over the
 interesting parts of the route to capture intersections or key turns.
 GPSBabel will capture stops in the route and insert those as turns, so 
 adding stops at intersections can also improve the results when converting.
-</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_s_and_t"></a>Microsoft Streets and Trips 2002-2006 (s_and_t)</h2></div></div></div><p class="fmtcapshdr">
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_s_and_t"></a>Microsoft Streets and Trips 2002-2007 (s_and_t)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
-</p><p> This is a format for importing into 
-<a href="http://www.microsoft.com/streets/default.mspx" target="_top"> Microsoft Streets and
-Trips</a>.  It's been exercised on versions from 2003 through 2007. Detailed
+</p><p> This is a format for creating data to be read by
+<a class="ulink" href="http://www.microsoft.com/streets/default.mspx" target="_top"> Microsoft Streets and
+Trips</a>.  It's been exercised on versions from 2003 through 2008. Detailed
 instructions on how to use it, including preserving hyperlinks, are at
-<a href="http://www.gpsbabel.org/formats/s_and_t/Importing_into_Microsoft_Streets_and_Trips_2003.html" target="_top">gpsbabel.org</a>
-         </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_bcr"></a>Motorrad Routenplaner (Map&amp;Guide) .bcr files (bcr)</h2></div></div></div><p class="fmtcapshdr">
+<a class="ulink" href="http://www.gpsbabel.org/formats/s_and_t/Importing_into_Microsoft_Streets_and_Trips_2003.html" target="_top">gpsbabel.org</a>
+         </p><p>
+               This format has nothing to do with the <a class="link" href="#fmt_msroute1" title="Microsoft Streets and Trips (pin/route reader) (msroute)"> .est/axe format</a> used by this program to store routes.
+       </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_bcr"></a>Motorrad Routenplaner (Map&amp;Guide) .bcr files (bcr)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write routes
@@ -2313,7 +2613,7 @@ instructions on how to use it, including preserving hyperlinks, are at
 This file format (extension .bcr) is used in Map&amp;Guide 
 <span class="productname">Motorrad Routenplaner 2002</span>™ and later versions. 
 BCR is a route-only format. If you own a newer release (2005 or later) you 
-may also use the XML export with GPSBabel's <a href="#fmt_tef" title="Map&amp;Guide 'TourExchangeFormat' XML (tef)">tef</a> 
+may also use the XML export with GPSBabel's <a class="link" href="#fmt_tef" title="Map&amp;Guide 'TourExchangeFormat' XML (tef)">tef</a> 
 input format.  
 </p><p>
 There may be other products from Map&amp;Guide that use this format as well.
@@ -2322,13 +2622,13 @@ Coordinates are stored in a BCR file in a Mercator projection. The
 conversion from the Mercator projection to polar (latitude/longitude) 
 coordinates and back again may result in visible differences.  Experience 
 reports are welcome.
-</p><div class="example"><a id="sample_bcr_command"></a><p class="title"><b>Example 3.4. Sample BCR command with all options</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -r -i gpx -f in.gpx -o bcr,index=1,name="From A to B",radius=6371012 -F a_to_b.bcr</code></strong></p></div></div><br class="example-break" /><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_bcr_o_index"></a><code class="option">index</code> option</h3></div></div></div><p>
+</p><div class="example"><a id="sample_bcr_command"></a><p class="title"><b>Example 3.9. Sample BCR command with all options</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -r -i gpx -f in.gpx -o bcr,index=1,name="From A to B",radius=6371012 -F a_to_b.bcr</code></strong></p></div></div><br class="example-break" /><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_bcr_o_index"></a><code class="option">index</code> option</h3></div></div></div><p>
       Index of route to write (if more the one in source).
     </p><p>
 Because the format supports only one route, this option may be used 
 on output to select a single route from a collection of 
 routes read from a more expressive format.  If you have, say, a 
-<a href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that contains two routes, you may
+<a class="link" href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that contains two routes, you may
 use this option to write them one at a time to individual files.
 </p><p><strong class="userinput"><code>gpsbabel -i gpx -f routes.gpx -o bcr,index=1 -F route1.bcr -o bcr,index=2 -F route2.bcr</code></strong></p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_bcr_o_name"></a><code class="option">name</code> option</h3></div></div></div><p>
       New name for the route.
@@ -2400,7 +2700,7 @@ I have 800 waypoints that cover a dozen or so Pocketstreets maps.
 Where can I find documentation for the layout of PSP files?
 </a></dt><dt>13. <a href="#morehelp">
 I have some other problem, what do I do?
-</a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%" /><tbody><tr class="question"><td align="left" valign="top"><a id="why"></a><a id="id2976535"></a><b>1.</b></td><td align="left" valign="top"><p>
+</a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%" /><tbody><tr class="question"><td align="left" valign="top"><a id="why"></a><a id="id2768297"></a><p><b>1.</b></p></td><td align="left" valign="top"><p>
 Why should I use GPSBabel/psp to make pushpins when Streets &amp; Trips (S&amp;T)
    already does that for me?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
@@ -2415,7 +2715,7 @@ GPSBabel/psp has the advantage of being able to create pushpins
    <span class="emphasis"><em>with the proper coordinates</em></span> 
    where S&amp;T does not in some areas of the U.S. 
    (Nashville, TN for instance).
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="blank"></a><a id="id2976579"></a><b>2.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="blank"></a><a id="id2770352"></a><p><b>2.</b></p></td><td align="left" valign="top"><p>
 I keep getting a blank (32 byte) PSP file.
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
 There are either no points to write, or you have botched the command
@@ -2424,49 +2724,49 @@ There are either no points to write, or you have botched the command
    looks like this:
 </p><p><strong class="userinput"><code>gpsbabel -i geo -f geocaching.loc -o psp -F NewOrleans.psp</code></strong></p><p>
    Note the use of "-f" for INPUT files and "-F" for OUTPUT files.
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="now_what"></a><a id="id2976616"></a><b>3.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="now_what"></a><a id="id2770386"></a><p><b>3.</b></p></td><td align="left" valign="top"><p>
 I've created a PSP file, now what do I do with it?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
 To use pushpins in Pocketstreets, you need to have both a map and a
    pushpin file.  These two files must exist in the same folder and have
    exactly the same base name as the map.  For example, the pins that 
    correspond to the map "NewOrleans.mps" should be named "NewOrleans.psp".  
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="no_map"></a><a id="id2977240"></a><b>4.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="no_map"></a><a id="id2770410"></a><p><b>4.</b></p></td><td align="left" valign="top"><p>
 I don't have a map.  What do I do now?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
 Create one using the "Export map to Pocketstreets" option in S&amp;T.  You
    can also pick up some major city maps on the web from the MS Pocketstreets
    website if you are interested in seeing how it works.
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="have_est"></a><a id="id2977270"></a><b>5.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="have_est"></a><a id="id2770437"></a><p><b>5.</b></p></td><td align="left" valign="top"><p>
 I have .EST files, not .PSP files.  What's up with that?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
 In order to make PSP files, you need to use the "Export map to 
    Pocketstreets" function in S&amp;T.  .EST files are for use in S&amp;T, not 
    Pocketstreets.
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="coord_jitter"></a><a id="id2977295"></a><b>6.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="coord_jitter"></a><a id="id2770460"></a><p><b>6.</b></p></td><td align="left" valign="top"><p>
  The .PSP files differ when I use GPSBabel/psp versus Pocketstreets to 
    create them.  What's up?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
 Pocketstreets makes corrections to the S&amp;T waypoint data upon initial 
    loading. GPSBabel/psp writes PSP files with these corrections already made.
    Ask MS.
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="mappoint"></a><a id="id2977323"></a><b>7.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="mappoint"></a><a id="id2770487"></a><p><b>7.</b></p></td><td align="left" valign="top"><p>
 Does GPSBabel/psp work with (Autoroute, Mappoint, etc..) .PSP files?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
 As of this writing, I haven't seen any so I can't be sure.  If they 
    follow the same layout as S&amp;T 2002, I'd imagine so.
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="after2001"></a><a id="id2977347"></a><b>8.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="after2001"></a><a id="id2770509"></a><p><b>8.</b></p></td><td align="left" valign="top"><p>
  Does GPSBabel/psp work with (S&amp;T 2001, S&amp;T 2002, etc...) files?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
 MS changed the file layout between S&amp;T 2001 and S&amp;T 2002.  The GPSBabel psp
    module is known to work fine with S&amp;T 2002 and 2003.
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="non_us"></a><a id="id2977373"></a><b>9.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="non_us"></a><a id="id2770533"></a><p><b>9.</b></p></td><td align="left" valign="top"><p>
 Does GPSBabel/psp work with (insert your country/location here) maps?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
 If it doesn't, feel free to inquire on the 
-<a href="https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc" target="_top">GPSBabel-Misc</a>
+<a class="ulink" href="https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc" target="_top">GPSBabel-Misc</a>
 mailing list.
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="wrong_coords"></a><a id="id2977403"></a><b>10.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="wrong_coords"></a><a id="id2770560"></a><p><b>10.</b></p></td><td align="left" valign="top"><p>
 What do you mean S&amp;T writes points with the wrong coordinates?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
 At some point in the "Export map to Pocketstreets" function in S&amp;T,
@@ -2474,7 +2774,7 @@ At some point in the "Export map to Pocketstreets" function in S&amp;T,
    1.4 miles WEST of their original location.  I'm not a geometry buff,
    but I'd imagine they have a reference point for generating coordinates
    that's wrong in (at least) that area.
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="splitting"></a><a id="id2977439"></a><b>11.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="splitting"></a><a id="id2770594"></a><p><b>11.</b></p></td><td align="left" valign="top"><p>
 I have 800 waypoints that cover a dozen or so Pocketstreets maps.  
    Do I need to to split my points up into smaller chunks to match the 
    area covered by the maps?
@@ -2483,17 +2783,65 @@ I have 800 waypoints that cover a dozen or so Pocketstreets maps.
    area.  Points that are not on the current map will be "grayed out"
    in pushpin explorer in Pocketsreets.  This is the reason the PSP 
    module was written for GPSBabel in the first place.
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="doc_for_layout"></a><a id="id2977466"></a><b>12.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="doc_for_layout"></a><a id="id2770620"></a><p><b>12.</b></p></td><td align="left" valign="top"><p>
 Where can I find documentation for the layout of PSP files?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
 Just about everything I know about the PSP file format is documented 
    in the source.  To the best of my knowledge, there is no documentation 
    (and for good reason, I've come to discover). 
-</p></td></tr><tr class="question"><td align="left" valign="top"><a id="morehelp"></a><a id="id2977491"></a><b>13.</b></td><td align="left" valign="top"><p>
+</p></td></tr><tr class="question"><td align="left" valign="top"><a id="morehelp"></a><a id="id2770642"></a><p><b>13.</b></p></td><td align="left" valign="top"><p>
 I have some other problem, what do I do?
 </p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
-Ask your question on the <a href="https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc" target="_top">GPSBabel-Misc</a> mailing list.
-</p></td></tr></tbody></table></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_tpg"></a>National Geographic Topo .tpg (waypoints) (tpg)</h2></div></div></div><p class="fmtcapshdr">
+Ask your question on the <a class="ulink" href="https://lists.sourceforge.net/lists/listinfo/gpsbabel-misc" target="_top">GPSBabel-Misc</a> mailing list.
+</p></td></tr></tbody></table></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_mtk-bin"></a>MTK Logger (iBlue 747,...) Binary File Format (mtk-bin)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read tracks
+        </p></li></ul></div><p>Binary file protocol converter for MTK based GPS loggers.
+This format reads the raw binary format created by the MTK Windows application
+and outputs to other formats  supported by GPSBabel
+When using the csv option a MTK application compatible output file will also be created.</p><p>
+It has been tested with <span class="productname">Transystem i-Blue 747</span>™ but other devices should
+work as well (Qstarz BT-Q1000, iTrek Z1, ...)
+</p><p>
+All position items (including button push) will be listed as trackpoints in the output. 
+Log items due to button push are presented as waypoints. 
+In theory we would not add waypoints to the list of trackpoints. But as the MTK logger restart the 
+log session from the button press we would loose a trackpoint unless we include/duplicate it.
+
+</p><p>
+<a class="ulink" href="http://www.transystem.com.tw/p-gps-iblue747.htm" target="_top">Transystem i-Blue 747</a>
+</p><div class="example"><a id="mtk-bin-on-linux"></a><p class="title"><b>Example 3.10. Convert MTK binary trackpoints to GPX</b></p><div class="example-contents"><p>
+  <strong class="userinput"><code>gpsbabel -t -i mtk-bin,csv=extra.csv -f data.bin -o gpx -F out.gpx</code></strong>
+   Additionally a CSV output file is created.
+  </p></div></div><br class="example-break" /><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_mtk-bin_o_csv"></a><code class="option">csv</code> option</h3></div></div></div><p>
+      MTK compatible CSV output file.
+    </p><p>
+  Specifies a filename into which  MTK-compatible CSV output will be written.
+</p><p>
+  Note that this option is a bit of an oddity in the GPSBabel arsenal.  This
+  should probably be a "real" output type of its own instead of being bolted
+  onto an input type.
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_mtk"></a>MTK Logger (iBlue 747,Qstarz BT-1000,...) download (mtk)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read tracks
+        </p></li></ul></div><p>Serial download protocol for the <span class="productname">i-Blue 747</span>™ and other MTK based GPS data loggers. Observe that it is only possible to download data using USB cable, Bluetooth requires a hardware modification.</p><p>
+<a class="ulink" href="http://www.transystem.com.tw/p-gps-iblue747.htm" target="_top">Transystem i-Blue 747</a>
+Downloaded data will be stored in data.bin file in the current directory together with
+the choosen output format.
+</p><p>It has been tested with Transystem i-Blue 747 but other devices should work as well (Qstarz BT-Q1000, iTrek Z1, ...)</p><p>See <a class="link" href="#fmt_mtk-bin" title="MTK Logger (iBlue 747,...) Binary File Format (mtk-bin)">mtk-bin</a> on how trackpoints/waypoints are handled</p><div class="example"><a id="mtk-on-linux"></a><p class="title"><b>Example 3.11. Command showing MTK download track and waypoints and erase on Linux</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -t -w -i mtk,erase -f /dev/ttyUSB0 -o gpx -F out.gpx</code></strong></p></div></div><br class="example-break" /><p>
+  For more info and tweaks on MTK based loggers: 
+   <a class="ulink" href="http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=81990" target="_top">MTK Tips ans Tweaks</a>
+   <a class="ulink" href="http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=81315" target="_top">iBlue 747 Logger</a>
+ For info about the used log format:
+  <a class="ulink" href="http://spreadsheets.google.com/pub?key=pyCLH-0TdNe-5N-5tBokuOA&amp;gid=5" target="_top">MTK binary format</a>
+</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_mtk_o_erase"></a><code class="option">erase</code> option</h3></div></div></div><p>
+      Erase device data after download.
+    </p><p>This option erases the track log from the device after download.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_mtk_o_csv"></a><code class="option">csv</code> option</h3></div></div></div><p>
+      MTK compatible CSV output file.
+    </p><p>This option will create an additional CSV output file.
+The CSV file is compatible with the original MTK logger application.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_tpg"></a>National Geographic Topo .tpg (waypoints) (tpg)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
@@ -2503,7 +2851,7 @@ Reading/writing of route data is not supported yet.</p><p>Contributed by Alex Mo
       Datum (default=NAD27).
     </p><p>The option 'datum="datum name"' can be used to override
 the default of NAD27 ("N. America 1927 mean") which is correct for the
-continental U.S.</p><p>Any legal <a href="#Datums" title="Appendix A. Supported Datums">datum supported
+continental U.S.</p><p>Any legal <a class="link" href="#Datums" title="Appendix A. Supported Datums">datum supported
 by GPSBabel</a> may be used.  For example, points in Hawaii should 
 use "Old Hawaiian_mean".</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_tpo2"></a>National Geographic Topo 2.x .tpo (tpo2)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
@@ -2531,10 +2879,12 @@ text notes.  The latter three are converted to waypoints.</p><p>Contributed by C
         </p></li></ul></div><p>This is the XML format that's used by Navicache.com for
 their geocaching data.  There are a number of fields in it that are
 marked "required" but are Navicache-specific, so GPSBabel can not
-write these files, but we can still read them. <a href="http://www.navicache.com/cgi-bin/ib312a/ikonboard.cgi?act=ST;f=23;t=334" target="_top">navicache.com</a>
+write these files, but we can still read them. <a class="ulink" href="http://www.navicache.com/cgi-bin/ib312a/ikonboard.cgi?act=ST;f=23;t=334" target="_top">navicache.com</a>
          </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_navicache_o_noretired"></a><code class="option">noretired</code> option</h3></div></div></div><p>
       Suppress retired geocaches.
-    </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_nmn4"></a>Navigon Mobile Navigator .rte files (nmn4)</h2></div></div></div><p class="fmtcapshdr">
+    </p><p>
+  If this option is present, retired (archived) caches will be suppressed on write.
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_nmn4"></a>Navigon Mobile Navigator .rte files (nmn4)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write routes
@@ -2542,21 +2892,85 @@ write these files, but we can still read them. <a href="http://www.navicache.com
 This is a very simple text format that only requires coordinates, but
 has fields for many other things.  We only write coordinates as fields
 like 'city' and 'street' cannot typically be populated from other
-formats. <a href="http://www.navigon.com" target="_top">www.navigon.com</a>
+formats. <a class="ulink" href="http://www.navigon.com" target="_top">www.navigon.com</a>
          </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_nmn4_o_index"></a><code class="option">index</code> option</h3></div></div></div><p>
       Index of route to write (if more the one in source).
     </p><p>
 Because the format supports only one route, this option may be used 
 on output to select a single route from a collection of 
 routes read from a more expressive format.  If you have, say, a 
-<a href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that contains two routes, you may
+<a class="link" href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that contains two routes, you may
 use this option to write them one at a time to individual files.
-</p><p><strong class="userinput"><code>gpsbabel -i gpx -f routes.gpx -o nmn4,index=1 -F route1.rte -o nmn4,index=2 -F route2.rte</code></strong></p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_dna"></a>Navitrak DNA marker format (dna)</h2></div></div></div><p class="fmtcapshdr">
+</p><p><strong class="userinput"><code>gpsbabel -i gpx -f routes.gpx -o nmn4,index=1 -F route1.rte -o nmn4,index=2 -F route2.rte</code></strong></p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_navilink"></a>NaviGPS GT-11/BGT-11 Download (navilink)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read and write waypoints
+        </p></li><li><p class="fmtcapsitem">
+          read and write tracks
+        </p></li><li><p class="fmtcapsitem">
+          read and write routes
+        </p></li></ul></div><p>
+       GPSBabel supports the Navilink protocol used by the
+       <a class="ulink" href="http://www.locosystech.com/product.php?zln=en&amp;id=5" target="_top">Locosys GT-11</a>
+       GPS receivers. These are sold under a variety of names including:
+</p><table class="simplelist" border="0" summary="Simple list"><tr><td>NaviGPS</td><td>GT-11</td><td>Amaryllo</td></tr><tr><td>NaviGPS-BT</td><td>BGT-11</td><td> </td></tr></table><p>
+</p><p>
+       This format is used for both the serial protocol used on
+       the USB link and for the files which can be copied from the
+       internal memory to the SD card using recent firmware versions.
+</p><p>
+       If you specify a serial port for the file (.e.g. "COM1", "/dev/ttyUSB0")
+       to be read or written, GPSBabel will use the serial protocol. Specifying
+       a file, either on local filesystem or on a mounted flash card reader,
+       will results in the file-based format being used.
+</p><p>
+       To access the device using the serial protocol over USB the
+       device needs to be in Navilink mode, which can be activated
+       from the main menu of the device.
+</p><p>
+       Details of the Navilink serial protocol can be found
+       <a class="ulink" href="http://wiki.splitbrain.org/navilink" target="_top">here</a>.
+</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_navilink_o_nuketrk"></a><code class="option">nuketrk</code> option</h3></div></div></div><p>
+      Delete all track points.
+    </p><p>
+This option erases all track data in the receiver before doing a transfer.
+</p><p>
+This is a convenient option to use in automated processes where you want
+to ensure the units starts with a clean state before sending track data to
+it.   Using this option on transmit is a better idea than doing it on 
+receive since the latter would erase all the waypoints before asking the
+unit to send all the waypoints.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_navilink_o_nukerte"></a><code class="option">nukerte</code> option</h3></div></div></div><p>
+      Delete all routes.
+    </p><p>
+This option erases all routes in the receiver before doing a transfer.
+</p><p>
+This is a convenient option to use in automated processes where you want
+to ensure the units starts with a clean state before sending routes to
+it.   Using this option on transmit is a better idea than doing it on 
+receive since the latter would erase all the waypoints before asking the
+unit to send all the waypoints.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_navilink_o_nukewpt"></a><code class="option">nukewpt</code> option</h3></div></div></div><p>
+      Delete all waypoints.
+    </p><p>
+This option erases all waypoints in the receiver before doing a transfer.
+</p><p>
+This is a convenient option to use in automated processes where you want
+to ensure the units starts with a clean state before sending waypoints to
+it.   Using this option on transmit is a better idea than doing it on 
+receive since the latter would erase all the waypoints before asking the
+unit to send all the waypoints.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_navilink_o_power_off"></a><code class="option">power_off</code> option</h3></div></div></div><p>
+      Command unit to power itself down.
+    </p><p>
+This options powers down the Navilink receiver once any transfers are
+complete.
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_dna"></a>Navitrak DNA marker format (dna)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>Navitrak DNA marker format - Another CSV format file. This
 is the format that is compatible with the DNA Desktop import/export
@@ -2578,9 +2992,9 @@ Different icons are assigned to encrypted,
 non-encrypted, stealth, and non-stealth access points; these may be
 changed with options. 
 </p><p>
-<a href="http://www.netstumbler.com/" target="_top">NetStumbler</a>
+<a class="ulink" href="http://www.netstumbler.com/" target="_top">NetStumbler</a>
 </p><p>
-<a href="http://www.macstumbler.com/" target="_top">MacStumbler</a>   
+<a class="ulink" href="http://www.macstumbler.com/" target="_top">MacStumbler</a>   
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_netstumbler_o_nseicon"></a><code class="option">nseicon</code> option</h3></div></div></div><p>
       Non-stealth encrypted icon name.
     </p><p>
@@ -2611,7 +3025,7 @@ waypoint.  The unmodified SSID is included in the waypoint description.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>This is a CSV format from the National Imagery and Mapping
 Agency.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_nmea"></a>NMEA 0183 sentences (nmea)</h2></div></div></div><p class="fmtcapshdr">
@@ -2625,32 +3039,32 @@ Agency.</p></div><div class="section" lang="en" xml:lang="en"><div class="titlep
 log and waypoint format for GPS devices.  Some hardware and software
 that work with NMEA-0183 formatted data include:
 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>
-  <a href="http://homepages.tig.com.au/~robk/datalogger.html" target="_top">GPS Data Logger</a>
+  <a class="ulink" href="http://homepages.tig.com.au/~robk/datalogger.html" target="_top">GPS Data Logger</a>
 </td><td>
-  <a href="http://www.visualgps.net/VisualGPSce/default.htm" target="_top">VisualGPS</a>
+  <a class="ulink" href="http://www.visualgps.net/VisualGPSce/default.htm" target="_top">VisualGPS</a>
 </td><td>
-  <a href="http://www.sparkfun.com/" target="_top">SparkFun GPS Datalogger</a>
+  <a class="ulink" href="http://www.sparkfun.com/" target="_top">SparkFun GPS Datalogger</a>
 </td></tr><tr><td>
-  <a href="http://www.gpstm.com/eng/features_eng.htm " target="_top">GPS TrackMaker</a>
+  <a class="ulink" href="http://www.gpstm.com/eng/features_eng.htm " target="_top">GPS TrackMaker</a>
 </td><td>
-  <a href="http://www.gpsu.co.uk/" target="_top">GPS Utility</a>
+  <a class="ulink" href="http://www.gpsu.co.uk/" target="_top">GPS Utility</a>
 </td><td>
-  <a href="http://www.sonystyle.com/is-bin/INTERSHOP.enfinity/eCS/Store/en/-/USD/SY_DisplayProductInformation-Start?ProductSKU=GPSCS1" target="_top">Sony GPS-CS1</a>
+  <a class="ulink" href="http://www.sonystyle.com/is-bin/INTERSHOP.enfinity/eCS/Store/en/-/USD/SY_DisplayProductInformation-Start?ProductSKU=GPSCS1" target="_top">Sony GPS-CS1</a>
 </td></tr><tr><td>
-  <a href="http://www.gpsmaster.nl/ " target="_top">GPSMaster</a>
+  <a class="ulink" href="http://www.gpsmaster.nl/ " target="_top">GPSMaster</a>
 </td><td>
-  <a href="http://www.kolumbus.fi/eino.uikkanen/geoconvgb/index.htm" target="_top">GeoConv</a>
+  <a class="ulink" href="http://www.kolumbus.fi/eino.uikkanen/geoconvgb/index.htm" target="_top">GeoConv</a>
 </td><td> </td></tr><tr><td>
-  <a href="http://www.silcom.com/~rwhately/index.html" target="_top">NMEAlog</a>
+  <a class="ulink" href="http://www.silcom.com/~rwhately/index.html" target="_top">NMEAlog</a>
 </td><td>
-  <a href="http://www.commlinx.com.au/GPS_recorder.htm" target="_top">CommLinx GPS recorder</a>
+  <a class="ulink" href="http://www.commlinx.com.au/GPS_recorder.htm" target="_top">CommLinx GPS recorder</a>
 </td><td> </td></tr></table><p>
-This module also supports <a href="#tracking" title="Realtime tracking">realtime tracking</a> 
+This module also supports <a class="link" href="#tracking" title="Realtime tracking">realtime tracking</a> 
 which allows realtime position reports from a GPS, such as one connected 
 serially, over Bluetooth, or a USB module emulating a serial port, to be used
 with selected output formats.
 </p><p>
-When used in <a href="#tracking" title="Realtime tracking">realtime tracking</a> mode, if
+When used in <a class="link" href="#tracking" title="Realtime tracking">realtime tracking</a> mode, if
 GPSBabel does not sense incoming NMEA sentences arriving from the port, it
 will send Sirf "reset to NMEA" commands to the port at a variety of speeds
 in an attempt to communicate with an attached GPS.   This lets devices
@@ -2739,7 +3153,7 @@ be as much as plus or minus 100 milliseconds.
 </p><p>
 If you are using this option with compressed or simplified tracks from 
 your handheld GPS receiver, you might find the 
-<a href="#filter_interpolate" title="Interpolate between trackpoints (interpolate)">interpolate</a> filter useful.
+<a class="link" href="#filter_interpolate" title="Interpolate between trackpoints (interpolate)">interpolate</a> filter useful.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_nmea_o_append_positioning"></a><code class="option">append_positioning</code> option</h3></div></div></div><p>
       Append realtime positioning data to the output file instead of truncating.
     </p><p>
@@ -2751,6 +3165,60 @@ your handheld GPS receiver, you might find the
     </p><p>
 To the "nmea" module, the "baud" option specifies the baud rate of the
 serial connection when used with the real-time tracking option.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_nmea_o_gisteq"></a><code class="option">gisteq</code> option</h3></div></div></div><p>
+      Write tracks for Gisteq Phototracker.
+    </p><p>
+  This option writes the Gisteq format - which has the extension of .GPS - 
+  to allow third-party GPS hardware with the Gisteq PhotoTrackr software.  
+</p><p>
+  The Gisteq PhotoTrackr is a GPS data logger hardware and software package
+  that allows one to easily record the locations of where the user has taken
+  photos.  The PhotoTrackr software works by comparing EXIF timestamps in
+  digital photos with the timestamps in the tracking data.  In doing so, the
+  software plots the locations of the photos using Google Maps.  The logging
+  format used by the Gisteq hardware is very close to NMEA format, but with a
+  few small quirks.  
+</p><p>
+More information can be found at the 
+<a class="ulink" href="http://www.gisteq.com/" target="_top">Gisteq</a> site.
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_lmx"></a>Nokia Landmark Exchange (lmx)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read and write waypoints
+        </p></li></ul></div><p> 
+This format supports Nokia Landmark Exchange (LMX) files used by several
+Nokia phones.   GPSBabel supports only the traditional XML format and 
+not the compressed binary format.   
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_osm"></a>OpenStreetMap data files (osm)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read and write waypoints
+        </p></li><li><p class="fmtcapsitem">
+          write tracks
+        </p></li><li><p class="fmtcapsitem">
+          read and write routes
+        </p></li></ul></div><p>
+  This format is used to exchange data with the <a class="ulink" href="http://www.openstreetmap.org" target="_top">OpenStreetMap</a> project. 
+  The main goal of this collaborative project is to create free editable maps.
+</p><p>
+  These data files are XML based. Every GPS element (way or node) described by the files has a unique
+  number as identifier. When we write OSM data files and don't know something about the id's,
+  negative numbers will be used as identifier. This has been tested with <a class="ulink" href="http://wiki.openstreetmap.org/index.php/JOSM" target="_top">JOSM</a>.
+</p><p>
+  Because the resulting timestamps of OSM ways differ from real GPS tracks, 
+  we read OSM ways into routes. On the output side we write all available routes and tracks into the osm target file.
+</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_osm_o_tag"></a><code class="option">tag</code> option</h3></div></div></div><p>
+      Write additional way tag key/value pairs.
+    </p><p>
+  With this option you can preset OSM <a class="ulink" href="http://wiki.openstreetmap.org/index.php/Map_Features" target="_top">features</a> (tags) on all exported ways.
+</p><p>
+  <strong class="userinput"><code>gpsbabel -i gdb -f ways.gdb -o osm,tag="highway:motorway" -F ways.osm</code></strong>
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_osm_o_tagnd"></a><code class="option">tagnd</code> option</h3></div></div></div><p>
+      Write additional node tag key/value pairs.
+    </p><p>
+  With this option you can preset OSM <a class="ulink" href="http://wiki.openstreetmap.org/index.php/Map_Features" target="_top">features</a> (tags) on every written nodes.
+</p><p>
+  <strong class="userinput"><code>gpsbabel -i gdb -f nodes.gdb -o osm,tagnd="amenity:pub;building:yes" -F nodes.osm</code></strong>
 </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_ozi"></a>OziExplorer (ozi)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -2773,22 +3241,39 @@ Mottram</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><
   </code></strong>
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_snlen"></a><code class="option">snlen</code> option</h3></div></div></div><p>
       Max synthesized shortname length.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_snwhite"></a><code class="option">snwhite</code> option</h3></div></div></div><p>
+    </p><p>
+  This option allows you to specify the length of waypoint names written to this format when used with the <code class="option">-s</code> option.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_snwhite"></a><code class="option">snwhite</code> option</h3></div></div></div><p>
       Allow whitespace synth. shortnames.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_snupper"></a><code class="option">snupper</code> option</h3></div></div></div><p>
+    </p><p>
+  This option forces waypoint names generated with <code class="option"> -s </code> to allow whitespace in the names.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_snupper"></a><code class="option">snupper</code> option</h3></div></div></div><p>
       UPPERCASE synth. shortnames.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_snunique"></a><code class="option">snunique</code> option</h3></div></div></div><p>
+    </p><p>
+  When specified, this option will force generated shortnames to be in all uppercase letters.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_snunique"></a><code class="option">snunique</code> option</h3></div></div></div><p>
       Make synth. shortnames unique.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_wptfgcolor"></a><code class="option">wptfgcolor</code> option</h3></div></div></div><p>
+    </p><p>
+  When specified, this option will force the generated waypoint names to be unique.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_wptfgcolor"></a><code class="option">wptfgcolor</code> option</h3></div></div></div><p>
       Waypoint foreground color.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_wptbgcolor"></a><code class="option">wptbgcolor</code> option</h3></div></div></div><p>
+    </p><p>
+  This option allows you to specify a foreground color of a waypoint.  You can specify it as either a decimal number or one of the standard web colors.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_wptbgcolor"></a><code class="option">wptbgcolor</code> option</h3></div></div></div><p>
       Waypoint background color.
-    </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_palmdoc"></a>PalmDoc Output (palmdoc)</h2></div></div></div><p class="fmtcapshdr">
+    </p><p>
+  This option allows you to specify a background color of a waypoint.  You can specify it as either a decimal number or one of the standard web colors.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_ozi_o_proximity"></a><code class="option">proximity</code> option</h3></div></div></div><p>
+      Proximity distance.
+    </p><p>
+  This option, specified in meters, allows you to set the proximity of 
+written in waypoints.
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_palmdoc"></a>PalmDoc Output (palmdoc)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           write waypoints
         </p></li></ul></div><p> 
-PalmDoc output is similar to <a href="#fmt_text" title="Textual Output (text)">Text</a>
+PalmDoc output is similar to <a class="link" href="#fmt_text" title="Textual Output (text)">Text</a>
 output, except that it generates a Palm Database (PDB) file suitable for 
 use with programs like CSpotRun, TealDoc, AportisDoc, Palm Reader, and 
 others.  The resulting file also contains bookmarks to make it easy to jump 
@@ -2848,13 +3333,17 @@ not the same thing as the file name on your computer; this is the name that
 appears in the file browser on your handheld.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_pathaway_o_deficon"></a><code class="option">deficon</code> option</h3></div></div></div><p>
       Default icon name.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_pathaway_o_snlen"></a><code class="option">snlen</code> option</h3></div></div></div><p>
+    </p><p>
+  The deficon option is used to control the icon output when writing to this format.   It overrides any icon informatino that might be present in the source data.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_pathaway_o_snlen"></a><code class="option">snlen</code> option</h3></div></div></div><p>
       Length of generated shortnames.
-    </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_quovadis"></a>Quovadis (quovadis)</h2></div></div></div><p class="fmtcapshdr">
+    </p><p>
+  This option allows you to specify the length of waypoint names written to this format when used with the <code class="option">-s</code> option.
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_quovadis"></a>Quovadis (quovadis)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
-        </p></li></ul></div><p> QuoVadis for Palm OS <a href="http://www.marcosoft.com/" target="_top">marcosoft.com</a> is a program for
+        </p></li></ul></div><p> QuoVadis for Palm OS <a class="ulink" href="http://www.marcosoft.com/" target="_top">marcosoft.com</a> is a program for
 Palm/OS. Working with record definitions provided by MarcoSoft and
 further experimentation by Bruce Thompson and "Fuzzy" from the
 Geocaching Forums to nail down the format precisely.</p><p> Should work fine for import and export.</p><p> One thing of note, QuoVadis stores all waypoints in a
@@ -2881,7 +3370,7 @@ appears in the file browser on your handheld.
           read and write routes
         </p></li></ul></div><p>
   This format supports the "Raymarine Waypoint File" format (.rwf).
-  More information to Raymarine you'll find at their <a href="http://www.raymarine.com" target="_top">homepage</a>.
+  More information to Raymarine you'll find at their <a class="ulink" href="http://www.raymarine.com" target="_top">homepage</a>.
 </p><p>
   Known limits: max. 16 characters for waypoint names and max. 50 waypoints per route.
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_raymarine_o_location"></a><code class="option">location</code> option</h3></div></div></div><p>
@@ -2896,11 +3385,11 @@ appears in the file browser on your handheld.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
   This format supports flight analysis data from the 
-       <a href="http://www.seeyou.ws/" target="_top">See You</a> 
+       <a class="ulink" href="http://www.seeyou.ws/" target="_top">See You</a> 
   program.
 </p><p>
   Position information is preserved, but the aviation-specific 
@@ -2911,9 +3400,9 @@ format, so it has all of the same options as that format.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_sportsim"></a>Sportsim track files (part of zipped .ssz files) (sportsim)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
-          read and write waypoints
+          read and write tracks
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
        With this format we support Sportsim trackfiles located in zipped .ssz archives. 
@@ -2921,7 +3410,7 @@ format, so it has all of the same options as that format.
        Currently we cannot read zipped files directly with GPSBabel. So you have 
        to extract the archive before you can use any file. The trackfiles have .txt extensions.
 </p><p>
-<a href="http://www.sportsim.com/web/index.php?url=about" target="_top">From the Sportsim homepage:</a>
+<a class="ulink" href="http://www.sportsim.com/web/index.php?url=about" target="_top">From the Sportsim homepage:</a>
 </p><p>
        Sportsim provide software applications and web-based graphically 
        simulated performance information and image solutions to outdoor active people.
@@ -2937,13 +3426,13 @@ format, so it has all of the same options as that format.
        The contents of the sdf file depends on the used product and can
        be one route or one track. Thatswhy when you want to use sdf on the
        output side you have to use the
-       <a href="#Route_And_Track_Modes" title="Route and Track Modes">-r OR the -t</a> option. This will tell
+       <a class="link" href="#Route_And_Track_Modes" title="Route and Track Modes">-r OR the -t</a> option. This will tell
        GPSBabel which type of data should be written.
 </p><p>
        Currently we can read the following file types:
        </p><table class="simplelist" border="0" summary="Simple list"><tr><td>4 = M9 TrackLog</td></tr><tr><td>5 = Route</td></tr><tr><td>28 = X9 TrackLog</td></tr></table><p>
 </p><p><strong class="userinput"><code>gpsbabel -i gpx -f some-routes.gpx -r -o stmsdf,index=3 -F single-route.sdf</code></strong></p><p>
-       <a href="http://www.suunto.fi" target="_top">Suunto Website</a>
+       <a class="ulink" href="http://www.suunto.fi" target="_top">Suunto Website</a>
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_stmsdf_o_index"></a><code class="option">index</code> option</h3></div></div></div><p>
       Index of route (if more the one in source).
     </p><p>
@@ -2970,21 +3459,32 @@ This is a simple format with coordinates and a time stamp.  Route points
 also have a short name.  A single file may only contain one route or one
 track.
 </p><p>
-<a href="http://www.suunto.fi" target="_top">Suunto Website</a>
+<a class="ulink" href="http://www.suunto.fi" target="_top">Suunto Website</a>
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_stmwpp_o_index"></a><code class="option">index</code> option</h3></div></div></div><p>
       Index of route/track to write (if more the one in source).
     </p><p>
 Because the format supports only one route or track, this option may be used 
 on output to select a single route or track from a collection of routes and
 tracks read from a more expressive format.  If you have, say, a 
-<a href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that contains three routes, you may
+<a class="link" href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that contains three routes, you may
 use this option to write them one at a time to individual files.
-</p><p><strong class="userinput"><code>gpsbabel -i gpx -f routes.gpx -o stmwpp,index=1 -F route1.txt -o stmwpp,index=2 -F route2.txt -o stmwpp,index=3 -F route3.txt</code></strong></p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_openoffice"></a>Tab delimited fields useful for OpenOffice, Ploticus etc. (openoffice)</h2></div></div></div><p class="fmtcapshdr">
+</p><p><strong class="userinput"><code>gpsbabel -i gpx -f routes.gpx -o stmwpp,index=1 -F route1.txt -o stmwpp,index=2 -F route2.txt -o stmwpp,index=3 -F route3.txt</code></strong></p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_xol"></a>Swiss Map # (.xol) format (xol)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read and write waypoints
+        </p></li><li><p class="fmtcapsitem">
+          read and write tracks
+        </p></li></ul></div><p>
+   This module reads and writes xml based (.xol) files used by
+   <a class="ulink" href="http://www.swisstopo.ch" target="_top">Swiss Map</a> software.
+</p><p>
+   These files uses the "Swiss national grid" (CS-1903) to store coordinates.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_openoffice"></a>Tab delimited fields useful for OpenOffice, Ploticus etc. (openoffice)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p> Tab seperated export-all (except geocaching data) file
 format.  Intended to serve as source for number-processing
@@ -3028,7 +3528,7 @@ This option should be 'f' if you want the altitude expressed in feet and
     </p><p>
   Splits output into separate files for each waypoint by appending a
   decimal number to the output filename.
-</p><div class="example"><a id="text_splitoutput"></a><p class="title"><b>Example 3.5. Example for splitoutput option to text format</b></p><div class="example-contents"><p>
+</p><div class="example"><a id="text_splitoutput"></a><p class="title"><b>Example 3.12. Example for splitoutput option to text format</b></p><div class="example-contents"><p>
     If "MyPQ.gpx" contains five waypoints, 
        <strong class="userinput"><code>
            gpsbabel -i gpx -f MyPocketQuery -o text,split -F blah
@@ -3040,26 +3540,26 @@ This option should be 'f' if you want the altitude expressed in feet and
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write routes
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
-   tomtom_itn can be used to read and write <a href="http://www.tomtom.com" target="_top">TomTom</a> Navigator Itineraries (Routes).
+   tomtom_itn can be used to read and write <a class="ulink" href="http://www.tomtom.com" target="_top">TomTom</a> Navigator Itineraries (Routes).
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_tomtom_asc"></a>TomTom POI file (.asc) (tomtom_asc)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>
-This format is derived from the <a href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
+This format is derived from the <a class="link" href="#fmt_xcsv" title="? Character Separated Values (xcsv)">xcsv</a>
 format, so it has all of the same options as that format.
 </p><p>
-   With this format you can read and write <a href="http://www.tomtom.com" target="_top">TomTom</a>
+   With this format you can read and write <a class="ulink" href="http://www.tomtom.com" target="_top">TomTom</a>
    Points of Interest - POI (ascii) files.
    It is a simple text (csv) format with only latitude, longitude and a short name.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_tomtom"></a>TomTom POI file (.ov2) (tomtom)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
-        </p></li></ul></div><p> This format can read and write <a href="http://www.tomtom.com" target="_top">TomTom</a> .ov2 (POI) files,
+        </p></li></ul></div><p> This format can read and write <a class="ulink" href="http://www.tomtom.com" target="_top">TomTom</a> .ov2 (POI) files,
 as used by the TomTom GO and TomTom Navigator.  It has been tested
 with an original TomTom GO running version 5.00 of the TomTom
 software.  There may be some records that confuse the input module -
@@ -3073,7 +3573,7 @@ the same name (not including the extension) as the .ov2 file.
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>Reads and writes places files for
-use in <a href="http://www.topomappro.com" target="_top">TopoMapPro places files</a>.  As this file
+use in <a class="ulink" href="http://www.topomappro.com" target="_top">TopoMapPro places files</a>.  As this file
 type can store links other than web links, anything that is not a http
 url will be discarded.  Note that this does not do datum conversions,
 so if your input file does not have WGS84/NZGD2000 data, your output
@@ -3085,7 +3585,7 @@ file won't either. Colour of waypoint icons defaults to red.</p></div><div class
           read and write tracks
         </p></li></ul></div><p>
        This format can be used to convert files from
-       <a href="http://www.tracklogs.co.uk" target="_top">TrackLogs Digital Mapping</a>. The files 
+       <a class="ulink" href="http://www.tracklogs.co.uk" target="_top">TrackLogs Digital Mapping</a>. The files 
        have extension .trl and can contain waypoints and tracks.
 </p><p>
        We have seen three different types of this format. Two are binary 
@@ -3103,14 +3603,14 @@ file won't either. Colour of waypoint icons defaults to red.</p></div><div class
 </p><p>
    The default index is 1 (the first track of a possible list of tracks).
 </p><p>
-   An example usage you can find at the <a href="#fmt_ignrando" title="IGN Rando track files (ignrando)">ignrando</a> format,
-   which uses option <a href="#fmt_ignrando_o_index" title="index option">index</a> in same manner.
+   An example usage you can find at the <a class="link" href="#fmt_ignrando" title="IGN Rando track files (ignrando)">ignrando</a> format,
+   which uses option <a class="link" href="#fmt_ignrando_o_index" title="index option">index</a> in same manner.
 </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_tiger"></a>U.S. Census Bureau Tiger Mapping Service (tiger)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
         </p></li></ul></div><p>The U.S. Census Bureau provides online mapping facilities.
-This format is described at: <a href="http://tiger.census.gov/instruct.html" target="_top">tiger.census.gov</a>.
+This format is described at: <a class="ulink" href="http://tiger.census.gov/instruct.html" target="_top">tiger.census.gov</a>.
 Do notice that this format is not the actual Tiger line mapping
 records, but rather the interface to their online mapping
 program.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_tiger_o_nolabels"></a><code class="option">nolabels</code> option</h3></div></div></div><p>
@@ -3189,7 +3689,8 @@ Geocaching traits when available.</p></div></div><div class="section" lang="en"
           read and write routes
         </p></li></ul></div><p>
    Unicsv examines the first line of a file to determine the field
-   order and field separator in that file.   It is thus read-only format.
+   order and field separator in that file.   On write, it tries to 
+   figure out what data it has and writes headers and all the data it can.
 </p><p>
    If the first line contains any tabs, the data lines are assumed
    to be tab separated.   Otherwise the fields are assumed to be
@@ -3197,7 +3698,7 @@ Geocaching traits when available.</p></div></div><div class="section" lang="en"
 </p><p>
    The list of keywords include:
    </p><pre class="screen">
-      alt =      Altitude
+      alt =      Elevation (in meters) of the point
       bng_e =    British National Grid's easting
       bng =      full coordinate in BNG format (zone easting northing)
       bng_pos =  full coordinate in BNG format (zone easting northing)
@@ -3209,18 +3710,21 @@ Geocaching traits when available.</p></div></div><div class="section" lang="en"
       date =     Date (yyyy/mm/dd)
       depth =    Depth
       desc =     Description
-      ele =      Altitude (elevation)
+      ele =      Elevation (in meters) of the point
+      e/w =      'e' for eastern hemisphere, 'w' for western
       fix =      3d, 2d, etc.
       geschw =   Geschwindigkeit (speed)
-      hdop =     Horizontal precision
+      hdop =     Horizontal dilution of precision
       head =     Heading / Course true
       heart =    Heartrate
+      height =   Elevation (in meters) of the point
       icon =     Symbol (icon) name
       lat =      Latitude
       lon =      Longitude
       name =     Waypoint name ("Shortname")
+      n/s =      'n' for northern hemisphere, 's' for southern
       notes =    Notes
-      pdop =     Precision summary (horizontal &amp; vertical)
+      pdop =     Position dilution of precision
       prox =     Proximity
       sat =      Number of sats used for fix
       speed =    Speed
@@ -3237,7 +3741,7 @@ Geocaching traits when available.</p></div></div><div class="section" lang="en"
       utm_pos =  full coordinate in UTM format (zone zone-ch easting northing)
       utm_n =    UTM northing
       utm_z =    UTM zone
-      vdop =     Vertical precision
+      vdop =     Vertical dilution of precision
       x =        Longitude
       x_pos =    Longitude
       y =        Latitude
@@ -3245,9 +3749,9 @@ Geocaching traits when available.</p></div></div><div class="section" lang="en"
       z =        Altitude (elevation)
    </pre><p>
    We support some enhanced Garmin attributes. They are also available in 
-   <a href="#fmt_gpx" title="GPX XML (gpx)">gpx</a>, <a href="#fmt_gdb" title="Garmin MapSource - gdb (gdb)">gdb</a>, 
-   <a href="#fmt_garmin_gpi" title="Garmin Points of Interest (.gpi) (garmin_gpi)">garmin_gpi</a> and partly 
-   <a href="#fmt_garmin_txt" title="Garmin MapSource - txt (tab delimited) (garmin_txt)">garmin_txt</a>. These entities are currently 
+   <a class="link" href="#fmt_gpx" title="GPX XML (gpx)">gpx</a>, <a class="link" href="#fmt_gdb" title="Garmin MapSource - gdb (gdb)">gdb</a>, 
+   <a class="link" href="#fmt_garmin_gpi" title="Garmin Points of Interest (.gpi) (garmin_gpi)">garmin_gpi</a> and partly 
+   <a class="link" href="#fmt_garmin_txt" title="Garmin MapSource - txt (tab delimited) (garmin_txt)">garmin_txt</a>. These entities are currently 
    not visible in <span class="productname">MapSource</span>™ (6.12.4), but are NOT dropped  
    when working with GDB (version 3) or GPX files.
    </p><pre class="screen"></pre><p>
@@ -3285,15 +3789,21 @@ Geocaching traits when available.</p></div></div><div class="section" lang="en"
       GPS datum (def. WGS 84).
     </p><p>
    This option specifies the datum to be used on output. Valid values for this 
-   option are listed in <a href="#Datums" title="Appendix A. Supported Datums">Appendix A, <i>Supported Datums</i></a>.
+   option are listed in <a class="xref" href="#Datums" title="Appendix A. Supported Datums">Appendix A, <i>Supported Datums</i></a>.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_unicsv_o_grid"></a><code class="option">grid</code> option</h3></div></div></div><p>
       Write position using this grid..
     </p><p>
    This value specifies the grid to be used on write. It is similar to
-   the grid option of garmin_txt (see <a href="#garmin_grid" title="Table 3.1. Grid values for garmin_txt">Table 3.1, “Grid values for garmin_txt”</a>). The only difference is that unicsv does not
+   the grid option of garmin_txt (see <a class="xref" href="#garmin_grid" title="Table 3.1. Grid values for garmin_txt">Table 3.1, “Grid values for garmin_txt”</a>). The only difference is that unicsv does not
    write a degree sign (°) into the output file.
 </p><p>
    Without this option unicsv writes the coordinates as simple numbers like in the samples above.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_unicsv_o_utc"></a><code class="option">utc</code> option</h3></div></div></div><p>
+      Write timestamps with offset x to UTC time.
+    </p><p>
+This option specifies the local time zone to use when writing times.  It
+is specified as an offset from Universal Coordinated Time (UTC) in hours.  
+Valid values are from -23 to +23.
 </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_vcard"></a>Vcard Output (for iPod) (vcard)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
@@ -3310,7 +3820,16 @@ with the iPod using iSync.
       Encrypt hints using ROT13.
     </p><p>
 By default geocaching hints are unencrypted; use this option to encrypt them.
-</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_vitosmt"></a>Vito Navigator II tracks (vitosmt)</h2></div></div></div><p class="fmtcapshdr">
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_vidaone"></a>VidaOne GPS for Pocket PC (.gpb) (vidaone)</h2></div></div></div><p class="fmtcapshdr">
+    This format can...
+    </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
+          read and write tracks
+        </p></li></ul></div><p>
+  This format supports the <a class="ulink" href="http://www.vidaone.com" target="_top">VidaOne</a> GPS for pocket PC GPB file type.
+</p><p>
+  This is have a very simple binary format which stores only the coordinates 
+  in the tracklog (.gpb) files.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_vitosmt"></a>Vito Navigator II tracks (vitosmt)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read and write waypoints
@@ -3328,7 +3847,7 @@ may crash VitoNavigator II on the Pocket PC.</p></div><div class="section" lang=
           read tracks
         </p></li></ul></div><p>
   This format reads the binary (.vtt) track logs recorded by
-  <a href="http://vitotechnology.com/en/products/smartmap_nokia_series60.html" target="_top">
+  <a class="ulink" href="http://vitotechnology.com/en/products/smartmap_nokia_series60.html" target="_top">
   <span class="application">VITO SmartMap for Nokia Series 60</span>
   </a> 1.0, a GPS application for smartphones connected to
   NMEA 0183-compatible Bluetooth GPS receivers. It may work
@@ -3343,7 +3862,7 @@ may crash VitoNavigator II on the Pocket PC.</p></div><div class="section" lang=
   The rest of the entry has not yet been decoded. The format
   uses little-endian byte ordering. The application displays
   metric units by default. Time is UTC.
-</p><div class="table"><a id="id2984364"></a><p class="title"><b>Table 3.2. track file header (8 bytes)</b></p><div class="table-contents"><table summary="track file header (8 bytes)" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Position</th><th>Field info</th></tr></thead><tbody><tr><td>bytes 0-3</td><td>Probably a version field. Int value is 3 in sample file.</td></tr><tr><td>bytes 4-7</td><td>Number of points in file as int.</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="id2984418"></a><p class="title"><b>Table 3.3. track point (32 bytes)</b></p><div class="table-contents"><table summary="track point (32 bytes)" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Position</th><th>Field info</th></tr></thead><tbody><tr><td>bytes 0-3</td><td>Decimal latitude multiplied by 20000000 as int.</td></tr><tr><td>bytes 4-7</td><td>Decimal longitude multiplied by 10000000 as int.</td></tr><tr><td>bytes 8-11</td><td>Altitude in meters as float.</td></tr><tr><td>bytes 12-13</td><td>Year, with century, as int.</td></tr><tr><td>byte 14</td><td>Month, ranging 1-12.</td></tr><tr><td>byte 15</td><td>Day of month, ranging 1-31.</td></tr><tr><td>byte 16</td><td>Hour, ranging 0-23.</td></tr><tr><td>byte 17</td><td>Minute, ranging 0-59.</td></tr><tr><td>bytes 18-21</td><td>Decimal second multiplied by 30000000 as int.</td></tr><tr><td>bytes 22-25</td><td>
+</p><div class="table"><a id="id2780734"></a><p class="title"><b>Table 3.4. track file header (8 bytes)</b></p><div class="table-contents"><table summary="track file header (8 bytes)" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Position</th><th>Field info</th></tr></thead><tbody><tr><td>bytes 0-3</td><td>Probably a version field. Int value is 3 in sample file.</td></tr><tr><td>bytes 4-7</td><td>Number of points in file as int.</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="id2782515"></a><p class="title"><b>Table 3.5. track point (32 bytes)</b></p><div class="table-contents"><table summary="track point (32 bytes)" border="1"><colgroup><col /><col /></colgroup><thead><tr><th>Position</th><th>Field info</th></tr></thead><tbody><tr><td>bytes 0-3</td><td>Decimal latitude multiplied by 20000000 as int.</td></tr><tr><td>bytes 4-7</td><td>Decimal longitude multiplied by 10000000 as int.</td></tr><tr><td>bytes 8-11</td><td>Altitude in meters as float.</td></tr><tr><td>bytes 12-13</td><td>Year, with century, as int.</td></tr><tr><td>byte 14</td><td>Month, ranging 1-12.</td></tr><tr><td>byte 15</td><td>Day of month, ranging 1-31.</td></tr><tr><td>byte 16</td><td>Hour, ranging 0-23.</td></tr><tr><td>byte 17</td><td>Minute, ranging 0-59.</td></tr><tr><td>bytes 18-21</td><td>Decimal second multiplied by 30000000 as int.</td></tr><tr><td>bytes 22-25</td><td>
         Probably speed in meters per second as float.
         Ranges 0-~3 in file, seems reasonable since sample
         file was acquired on foot.
@@ -3360,34 +3879,58 @@ may crash VitoNavigator II on the Pocket PC.</p></div><div class="section" lang=
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read waypoints
-        </p></li></ul></div><p> WFFF is the export format for Aspecto Software's WiFiFoFum 2.0 for Windows Mobile PCs.</p><p>It is a simple XML format that is read-only to GPSBabel and stores information about a WiFi stumbling session.</p><p>All WiFi-specific elements are written in the description  field, similar to the netstumbler format.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wfff_o_aicicon"></a><code class="option">aicicon</code> option</h3></div></div></div><p>
+        </p></li></ul></div><p> WFFF is the export format for <a class="ulink" href="http://www.aspecto-software.com/rw/applications/wififofum/index.html" target="_top">Aspecto Software's WiFiFoFum</a> 2.0 for Windows Mobile PCs.</p><p>It is a simple XML format that is read-only to GPSBabel and stores information about a WiFi stumbling session.</p><p>All WiFi-specific elements are written in the description  field, similar to the netstumbler format.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wfff_o_aicicon"></a><code class="option">aicicon</code> option</h3></div></div></div><p>
       Infrastructure closed icon name.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wfff_o_aioicon"></a><code class="option">aioicon</code> option</h3></div></div></div><p>
+    </p><p>
+This option lets you specify an icon for infrastructure closed points.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wfff_o_aioicon"></a><code class="option">aioicon</code> option</h3></div></div></div><p>
       Infrastructure open icon name.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wfff_o_ahcicon"></a><code class="option">ahcicon</code> option</h3></div></div></div><p>
+    </p><p>
+This option lets you specify an icon for infrastructure open points.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wfff_o_ahcicon"></a><code class="option">ahcicon</code> option</h3></div></div></div><p>
       Ad-hoc closed icon name.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wfff_o_ahoicon"></a><code class="option">ahoicon</code> option</h3></div></div></div><p>
+    </p><p>
+This options lets you specify an icon for an Ad-hoc, closed, waypoint.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wfff_o_ahoicon"></a><code class="option">ahoicon</code> option</h3></div></div></div><p>
       Ad-hoc open icon name.
-    </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wfff_o_snmac"></a><code class="option">snmac</code> option</h3></div></div></div><p>
+    </p><p>
+This options lets you specify an icon for an Ad-hoc, open, waypoint.
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wfff_o_snmac"></a><code class="option">snmac</code> option</h3></div></div></div><p>
       Shortname is MAC address.
-    </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_wbt-bin"></a>Wintec WBT-100/200 Binary File Format (wbt-bin)</h2></div></div></div><p class="fmtcapshdr">
+    </p><p>
+  This options lets you specify that the shortname of the waypoint is the MAC address.
+</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_wbt-bin"></a>Wintec WBT-100/200 Binary File Format (wbt-bin)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read tracks
         </p></li></ul></div><p>File protocol for the <span class="productname">Wintec WBT-200</span>™
-GPS data logger. This format reads the binary file format created
+and <span class="productname">Wintec WBT-201</span>™ (sometimes called the <span class="productname"> G-Rays 2</span>™)GPS data loggers. This format reads the binary file format created
 by Wintec's Windows application.</p><p>
-<a href="http://www.semsons.com/wi3mugpsrebt.html" target="_top">Wintec WBT-200 </a>
-</p><div class="example"><a id="wbt-bin-on-macos"></a><p class="title"><b>Example 3.6. Command showing conversion of a Wintec binary file to GPX</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -i wbt-bin -f tracks.bin -o
+<a class="ulink" href="http://www.semsons.com/wiwbmu3gpsre2.html" target="_top">Wintec WBT-201 </a>
+</p><div class="example"><a id="wbt-bin-on-macos"></a><p class="title"><b>Example 3.13. Command showing conversion of a Wintec binary file to GPX</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -i wbt-bin -f tracks.bin -o
 gpx -F out.gpx</code></strong></p></div></div><br class="example-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_wbt"></a>Wintec WBT-100/200 GPS Download (wbt)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read waypoints
         </p></li><li><p class="fmtcapsitem">
           read tracks
-        </p></li></ul></div><p>Serial download protocol for the <span class="productname">Wintec WBT-200</span>™ GPS data logger. Although untested it is expected that this will also support the WBT-100.</p><p>
-<a href="http://www.semsons.com/wi3mugpsrebt.html" target="_top">Wintec WBT-200</a>
-</p><div class="example"><a id="wbt-on-macos"></a><p class="title"><b>Example 3.7. Command showing WBT-200 download and erase over Bluetooth on Mac OS X</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -t -w -i wbt,erase -f /dev/cu.WBT200-SPPslave-1 -o gpx -F out.gpx</code></strong></p></div></div><br class="example-break" /><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wbt_o_erase"></a><code class="option">erase</code> option</h3></div></div></div><p>
+        </p></li></ul></div><p>Serial download protocol for the 
+<span class="productname">Wintec WBT-200</span>™  and
+<span class="productname">Wintec WBT-201</span>™ 
+GPS data loggers. Although untested it is expected that this will also support the WBT-100.</p><p>
+<a class="ulink" href="http://www.semsons.com/wiwbmu3gpsre2.html" target="_top">Wintec WBT-201</a>
+</p><div class="example"><a id="wbt-on-macos"></a><p class="title"><b>Example 3.14. Command showing WBT-200 download and erase over Bluetooth on Mac OS X</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -t -w -i wbt,erase -f /dev/cu.WBT200-SPPslave-1 -o gpx -F out.gpx</code></strong></p></div></div><br class="example-break" /><p>
+Internally, this is actually a serial device that has a serial/USB adapter
+built into it.  It uses the CP210x chip by Silicon labs.   You will probably
+need a driver for this chip.  The product ships with one for Windows.  
+The Linux 210x driver seems to work fine.  Mac users will need to download 
+the <a class="ulink" href="http://www.silabs.com/tgwWebApp/public/web_content/products/Microcontrollers/USB/en/mcu_vcp.htm" target="_top">Mac driver for CP210x</a>.
+</p><p>
+GPSBabel does not try to offer an interface to configure these units. That
+is left to the Windows software that comes with it or tools like the 
+<a class="ulink" href="http://www.daria.co.uk/gps" target="_top">WBT 201 Viewer</a> for Mac OS/X
+and Linux.
+</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_wbt_o_erase"></a><code class="option">erase</code> option</h3></div></div></div><p>
       Erase device data after download.
     </p><p>This option erases the track log from the device after download.</p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_wbt-tk1"></a>Wintec WBT-201/G-Rays 2 Binary File Format (wbt-tk1)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
@@ -3396,14 +3939,14 @@ gpx -F out.gpx</code></strong></p></div></div><br class="example-break" /></div>
         </p></li></ul></div><p>File protocol for the <span class="productname">Wintec WBT-201 / G-Rays 2</span>™
 GPS data logger. This format reads the binary file format created
 by Wintec's Time Machine X application.</p><p>
-<a href="http://www.semsons.com/wiwbmu3gpsre2.html" target="_top">Wintec WBT-201</a>
-</p><div class="example"><a id="wbt-tk1"></a><p class="title"><b>Example 3.8. Command showing conversion of a Wintec binary file to GPX</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -w -t -i wbt-tk1 -f tracks.tk1 -o gpx -F out.gpx</code></strong></p></div></div><br class="example-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_yahoo"></a>Yahoo Geocode API data (yahoo)</h2></div></div></div><p class="fmtcapshdr">
+<a class="ulink" href="http://www.semsons.com/wiwbmu3gpsre2.html" target="_top">Wintec WBT-201</a>
+</p><div class="example"><a id="wbt-tk1"></a><p class="title"><b>Example 3.15. Command showing conversion of a Wintec binary file to GPX</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -w -t -i wbt-tk1 -f tracks.tk1 -o gpx -F out.gpx</code></strong></p></div></div><br class="example-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="fmt_yahoo"></a>Yahoo Geocode API data (yahoo)</h2></div></div></div><p class="fmtcapshdr">
     This format can...
     </p><div class="itemizedlist"><ul type="disc"><li><p class="fmtcapsitem">
           read waypoints
         </p></li></ul></div><p>
 This format reads output from the 
-<a href="http://developer.yahoo.com/maps/rest/V1/geocode.html" target="_top">Yahoo geocoding API</a>.  
+<a class="ulink" href="http://developer.yahoo.com/maps/rest/V1/geocode.html" target="_top">Yahoo geocoding API</a>.  
 This feature of GPSBabel makes it easy to get geocoded results from 
 Yahoo into your favorite mapping program, GPS receiver, or other format.
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_yahoo_o_addrsep"></a><code class="option">addrsep</code> option</h3></div></div></div><p>
@@ -3415,7 +3958,7 @@ not support street addresses, the street address fields from the Yahoo file
 are concatenated into the waypoint "notes" field.
 </p><p>
 The default value for this option is a comma followed by a space (", ").
-</p></div></div><div class="footnotes"><br /><hr width="100" align="left" /><div class="footnote"><p><sup>[<a id="ftn.posnonly" href="#posnonly">1</a>] </sup>This model does not support transfer of waypoints, tracks, or routes, but may be used with the <a href="#tracking" title="Realtime tracking">realtime tracking</a> feature.</p></div><div class="footnote"><p><sup>[<a id="ftn.gpx" href="#gpx">2</a>] </sup>This unit uses GPX format, not Garmin protocol.  Therefore one should communicate with it by reading and writing GPX files instead of using this format.  Members of this class of products do not support realtime positioning protocol.</p></div></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="Data_Filters"></a>Chapter 4. Data Filters</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#filter_polygon">Include Only Points Inside Polygon (polygon)</a></span></dt><dt><span class="section"><a href="#filter_arc">Include Only Points Within Distance of Arc (arc)</a></span></dt><dt><span class="section"><a href="#filter_radius">Include Only Points Within Radius (radius)</a></span></dt><dt><span class="section"><a href="#filter_interpolate">Interpolate between trackpoints (interpolate)</a></span></dt><dt><span class="section"><a href="#filter_track">Manipulate track lists (track)</a></span></dt><dt><span class="section"><a href="#filter_sort">Rearrange waypoints by resorting (sort)</a></span></dt><dt><span class="section"><a href="#filter_nuketypes">Remove all waypoints, tracks, or routes (nuketypes)</a></span></dt><dt><span class="section"><a href="#filter_duplicate">Remove Duplicates (duplicate)</a></span></dt><dt><span class="section"><a href="#filter_position">Remove Points Within Distance (position)</a></span></dt><dt><span class="section"><a href="#filter_discard">Remove unreliable points with high hdop or vdop (discard)</a></span></dt><dt><span class="section"><a href="#filter_reverse">Reverse stops within routes (reverse)</a></span></dt><dt><span class="section"><a href="#filter_stack">Save and restore waypoint lists (stack)</a></span></dt><dt><span class="section"><a href="#filter_simplify">Simplify routes (simplify)</a></span></dt><dt><span class="section"><a href="#filter_transform">Transform waypoints into a route, tracks into routes, ... (transform)</a></span></dt></dl></div><p> GPSBabel supports data filtering.  Data filters are
+</p></div></div><div class="footnotes"><br /><hr width="100" align="left" /><div class="footnote"><p><sup>[<a id="ftn.posnonly" href="#posnonly" class="para">1</a>] </sup>This model does not support transfer of waypoints, tracks, or routes, but may be used with the <a class="link" href="#tracking" title="Realtime tracking">realtime tracking</a> feature.</p></div><div class="footnote"><p><sup>[<a id="ftn.gpx" href="#gpx" class="para">2</a>] </sup>This unit uses GPX format, not Garmin protocol.  Therefore one should communicate with it by reading and writing GPX files instead of using this format.  Members of this class of products do not support realtime positioning protocol.</p></div></div></div><div class="chapter" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="Data_Filters"></a>Chapter 4. Data Filters</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#filter_polygon">Include Only Points Inside Polygon (polygon)</a></span></dt><dt><span class="section"><a href="#filter_arc">Include Only Points Within Distance of Arc (arc)</a></span></dt><dt><span class="section"><a href="#filter_radius">Include Only Points Within Radius (radius)</a></span></dt><dt><span class="section"><a href="#filter_interpolate">Interpolate between trackpoints (interpolate)</a></span></dt><dt><span class="section"><a href="#filter_track">Manipulate track lists (track)</a></span></dt><dt><span class="section"><a href="#filter_sort">Rearrange waypoints by resorting (sort)</a></span></dt><dt><span class="section"><a href="#filter_nuketypes">Remove all waypoints, tracks, or routes (nuketypes)</a></span></dt><dt><span class="section"><a href="#filter_duplicate">Remove Duplicates (duplicate)</a></span></dt><dt><span class="section"><a href="#filter_position">Remove Points Within Distance (position)</a></span></dt><dt><span class="section"><a href="#filter_discard">Remove unreliable points with high hdop or vdop (discard)</a></span></dt><dt><span class="section"><a href="#filter_reverse">Reverse stops within routes (reverse)</a></span></dt><dt><span class="section"><a href="#filter_stack">Save and restore waypoint lists (stack)</a></span></dt><dt><span class="section"><a href="#filter_simplify">Simplify routes (simplify)</a></span></dt><dt><span class="section"><a href="#filter_transform">Transform waypoints into a route, tracks into routes, ... (transform)</a></span></dt></dl></div><p> GPSBabel supports data filtering.  Data filters are
       invoked from the command line via the '-x' option.  It should be
       noted that data filters are invoked in the internal pipeline at
       the point that corresponds to their position on the
@@ -3430,12 +3973,12 @@ The default value for this option is a comma followed by a space (", ").
 </p><p> Beware that most filters only apply to a certain kind of
       data. This is usually indicated below by referring to points,
       tracks or routes in the first sentence which describes each
-      filter or in the table at <a href="http://www.gpsbabel.org/capabilities.html" target="_top">gpsbabel.org</a>
+      filter or in the table at <a class="ulink" href="http://www.gpsbabel.org/capabilities.html" target="_top">gpsbabel.org</a>
       .
 </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="filter_polygon"></a>Include Only Points Inside Polygon (polygon)</h2></div></div></div><p> 
 The polygon filter includes points if they are inside
 of a polygon.  A polygon file looks like an 
-<a href="#filter_arc" title="Include Only Points Within Distance of Arc (arc)">arc</a> file, except
+<a class="link" href="#filter_arc" title="Include Only Points Within Distance of Arc (arc)">arc</a> file, except
 that the arc it describes must be a closed cycle.  That is,
 for a simple polygon, the first and last points must be the
 same.  Here's a square:
@@ -3475,7 +4018,7 @@ called mycounty.txt.  This command line will give you only the points
 in your county:
 </p><p><strong class="userinput"><code>gpsbabel -i geo -f 1.loc -x polygon,file=mycounty.txt -o mapsend -F 2.wpt</code></strong></p></div></div><br class="example-break" /><div class="example"><a id="example_in_or_close_to"></a><p class="title"><b>Example 4.2. Using the polygon and arc filters to find points in or nearly in a 
 polygon</b></p><div class="example-contents"><p>
-Because the polygon and <a href="#filter_arc" title="Include Only Points Within Distance of Arc (arc)">arc</a> filters use
+Because the polygon and <a class="link" href="#filter_arc" title="Include Only Points Within Distance of Arc (arc)">arc</a> filters use
 the same file format, you can use them together to find all points that are
 "in or nearly in" a polygon.  This can be useful if your waypoints or the 
 boundaries of your polygon are not quite perfect, so you want to provide a 
@@ -3502,7 +4045,7 @@ filtering.  The format of the file is as described above.
 </p><p>
 GPSBabel supports converting any route or track to a file usable by this
 filter; simply read it in the normal way and write it using the 
-<a href="#fmt_arc" title="GPSBabel arc filter file (arc)">arc</a> file format.  Afterward, you will 
+<a class="link" href="#fmt_arc" title="GPSBabel arc filter file (arc)">arc</a> file format.  Afterward, you will 
 need to make sure that the first point and the last point in the 
 file are the same, as the polygon filter depends on that.  You can do so
 with any text editor.
@@ -3550,7 +4093,7 @@ filtering.  The format of the file is as described above.
 </p><p>
 GPSBabel supports converting any route or track to a file usable by this
 filter; simply read it in the normal way and write it using the 
-<a href="#fmt_arc" title="GPSBabel arc filter file (arc)">arc</a> file format.
+<a class="link" href="#fmt_arc" title="GPSBabel arc filter file (arc)">arc</a> file format.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_arc_o_distance"></a>distance option</h3></div></div></div><p>
       Maximum distance from arc.
     </p><p>
@@ -3578,7 +4121,7 @@ normal mode of operation in that in the normal mode, points that are close to
 the lines between points are also kept.
 </p><p>
 This option makes the arc filter act like a multi-point version of the
-<a href="#filter_radius" title="Include Only Points Within Radius (radius)">radius</a> filter.
+<a class="link" href="#filter_radius" title="Include Only Points Within Radius (radius)">radius</a> filter.
 </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="filter_radius"></a>Include Only Points Within Radius (radius)</h2></div></div></div><p> 
 This filter includes or excludes waypoints based on their proximity to a 
 central point.  All waypoints more than the specified distance from the 
@@ -3847,7 +4390,7 @@ contain GPS fix status to one that requires it.
 This option computes (or recomputes) a value for the GPS heading at each 
 trackpoint.  This is most useful with trackpoints from formats that don't 
 support heading information or for trackpoints synthesized by the 
-<a href="#filter_interpolate" title="Interpolate between trackpoints (interpolate)">interpolate</a>
+<a class="link" href="#filter_interpolate" title="Interpolate between trackpoints (interpolate)">interpolate</a>
 filter.  The heading at each trackpoint is simply the course from the
 previous trackpoint in the track.  The first trackpoint in each track
 is arbitrarily assigned a heading of 0 degrees.
@@ -3857,7 +4400,7 @@ is arbitrarily assigned a heading of 0 degrees.
 This option computes a value for the GPS speed at each trackpoint.
 This is most useful with trackpoints from formats that don't support
 speed information or for trackoints synthesized by the 
-<a href="#filter_interpolate" title="Interpolate between trackpoints (interpolate)">interpolate</a>
+<a class="link" href="#filter_interpolate" title="Interpolate between trackpoints (interpolate)">interpolate</a>
 filter.  The speed at each trackpoint is the average speed from the
 previous trackpoint (distance divided by time).  The first trackpoint 
 in each track is assigned a speed of "unknown."
@@ -3925,7 +4468,7 @@ Generally, at least one of these options is required.
          name and location</b></p><div class="example-contents"><p>
   This command line removes points that have duplicate short names
   and duplicate locations.  The result would be a 
-  <a href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that more than likely 
+  <a class="link" href="#fmt_gpx" title="GPX XML (gpx)">gpx</a> file that more than likely 
   contains only unique points and point data.
   </p><p><strong class="userinput"><code> gpsbabel -i gpx -f 1.gpx -f 2.gpx -x duplicate,location,shortname -o gpx -F merged_with_no_dupes.gpx</code></strong></p></div></div><br class="example-break" /><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_duplicate_o_shortname"></a>shortname option</h3></div></div></div><p>
       Suppress duplicate waypoints based on name.
@@ -3996,10 +4539,18 @@ the specified distance of one another, rather than leaving just one of them.
 This option may be used to entirely remove clusters of points.
 </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="filter_discard"></a>Remove unreliable points with high hdop or vdop (discard)</h2></div></div></div><p>
 This filter is used to "fix" unreliable GPS data by discarding points
-with HDOP and/or VDOP above a specified limit.  HDOP and VDOP are 
-measures of the best possible horizontal or vertical precision 
-for a given configuration of GPS satellites.
-</p><div class="example"><a id="example_discard_filter"></a><p class="title"><b>Example 4.14. Using the discard filter</b></p><div class="example-contents"><p><strong class="userinput"><code> gpsbabel -i gpx -f in.gpx -x discard,hdop=10,vdop=20,hdopandvdop -o gpx -F out.gpx</code></strong></p></div></div><br class="example-break" /><p> Contributed by Tobias Minich.</p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_discard_o_hdop"></a>hdop option</h3></div></div></div><p>
+that are believed to be unreliable.  You may specify an 
+HDOP and/or VDOP above a specified limit, a minimum number of satellits
+that must have been in view for a fix to be considered, or both.
+</p><p>
+HDOP and VDOP are measures of the best possible horizontal or vertical precision for a given configuration of GPS satellites.   Higher numbers indicate a higher dilution of precision and therefore mathematically less useful.
+</p><p>
+</p><div class="example"><a id="example_discard_filter"></a><p class="title"><b>Example 4.14. Using the discard filter for HDOP and VDOP. </b></p><div class="example-contents"><p><strong class="userinput"><code> gpsbabel -i gpx -f in.gpx -x discard,hdop=10,vdop=20,hdopandvdop -o gpx -F out.gpx</code></strong></p></div></div><p><br class="example-break" />
+</p><p>
+You may specify a minimmum number of  satellites.  
+</p><p>
+</p><div class="example"><a id="example_discard_filter_sats"></a><p class="title"><b>Example 4.15. Using the discard filter to require at least three satellites. </b></p><div class="example-contents"><p><strong class="userinput"><code> gpsbabel -i gpx -f in.gpx -x discard,sat=3 -o gpx -F out.gpx</code></strong></p></div></div><p><br class="example-break" />
+</p><p> Contributed by Tobias Minich and Serge Droz. </p><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_discard_o_hdop"></a>hdop option</h3></div></div></div><p>
       Suppress waypoints with higher hdop.
     </p><p>
 This option specifies the maximum allowable Horizontal Dilution of 
@@ -4020,6 +4571,10 @@ If this option is used, only points that exceed both the maximum
 allowable HDOP and the maximum allowable VDOP will be discarded.  This
 option requires that both the <code class="option">hdop</code> and 
 <code class="option">vdop</code> options be specified.  
+</p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_discard_o_sat"></a>sat option</h3></div></div></div><p>
+      Minimium sats to keep waypoints.
+    </p><p>
+This option specifies the minimum required number of satelites.
 </p></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="filter_reverse"></a>Reverse stops within routes (reverse)</h2></div></div></div><p> The reverse filter is used to reverse tracks and routes.
        It's mostly useful for those few formats where track/route
        sequence matters and there isn't a way to reverse them using
@@ -4204,13 +4759,13 @@ smallest change in the overall length of the route first.
     </p><p>
 This option selects the destination type of this filter to be waypoints.  
 Choose this when you want to convert tracks or routes into waypoints.
-</p><div class="example"><a id="transform_to_wpt"></a><p class="title"><b>Example 4.15. Converting a track to a sequence of waypoints</b></p><div class="example-contents"><p>
+</p><div class="example"><a id="transform_to_wpt"></a><p class="title"><b>Example 4.16. Converting a track to a sequence of waypoints</b></p><div class="example-contents"><p>
 Say you you have a KML file that contains a track but you want to convert it to a CSV file that can contain only waypoints, perhaps to import into a spreadsheet.  Use the following command:
 </p><p><strong class="userinput"><code>gpsbabel -i kml -f blah.kml -x transform,wpt=trk -o csv -F blah.txt</code></strong></p></div></div><br class="example-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_transform_o_rte"></a>rte option</h3></div></div></div><p>
       Transform waypoint(s) or track(s) into route(s) [W/T].
     </p><p>
 This option selects the destination type of this filter to be routes.  Choose this when you want to convert tracks into waypoints routes.  A single route will be created in the sequence they appear in the input.
-</p><div class="example"><a id="transform_to_rte"></a><p class="title"><b>Example 4.16. Converting a pile of waypoints to a GPX route</b></p><div class="example-contents"><p>
+</p><div class="example"><a id="transform_to_rte"></a><p class="title"><b>Example 4.17. Converting a pile of waypoints to a GPX route</b></p><div class="example-contents"><p>
 Say you you have a data file that came from CSV file that you want to convert  
 to a GPX route that can be loaded into Mapsource.  Use the following command:
 </p><p><strong class="userinput"><code>gpsbabel -i csv -f blah.txt -x transform,rte=wpt -o gdb -F blah.gdb</code></strong></p></div></div><br class="example-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_transform_o_trk"></a>trk option</h3></div></div></div><p>
@@ -4219,7 +4774,7 @@ to a GPX route that can be loaded into Mapsource.  Use the following command:
 This option selects the destination type of this filter to be tracks.  
 Choose this when you want to create tracks from a list of waypoints or routes. 
 A single track will be created in the sequence they appear in the input.
-</p><div class="example"><a id="transform_to_trk"></a><p class="title"><b>Example 4.17. Converting a pile of waypoints to a GPX track</b></p><div class="example-contents"><p>
+</p><div class="example"><a id="transform_to_trk"></a><p class="title"><b>Example 4.18. Converting a pile of waypoints to a GPX track</b></p><div class="example-contents"><p>
 Say you you have a data file that came from CSV file that you want to convert  
 to a GPX track that can be loaded into Mapsource.  Use the following command:
 </p><p><strong class="userinput"><code>gpsbabel -i csv -f blah.txt -x transform,trk=wpt -o gdb -F blah.gdb</code></strong></p></div></div><br class="example-break" /></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="fmt_transform_o_del"></a>del option</h3></div></div></div><p>
@@ -4228,24 +4783,24 @@ to a GPX track that can be loaded into Mapsource.  Use the following command:
 This option, when used in connction with the wpt, rte, or trk options, tells
 GPSBabel to delete the source data after conversion.  This is most useful if 
 you are trying to avoid duplicated data in the output.
-</p><div class="example"><a id="transform_del"></a><p class="title"><b>Example 4.18. Convert a GPX track to GPX waypoints, tossing the original track</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -i gpx -f blah.gpx -x transform,wpt=trk,del -o gpx -F converted.gpx</code></strong></p></div></div><br class="example-break" /></div></div></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="Datums"></a>Appendix A. Supported Datums</h2></div></div></div><p>
+</p><div class="example"><a id="transform_del"></a><p class="title"><b>Example 4.19. Convert a GPX track to GPX waypoints, tossing the original track</b></p><div class="example-contents"><p><strong class="userinput"><code>gpsbabel -i gpx -f blah.gpx -x transform,wpt=trk,del -o gpx -F converted.gpx</code></strong></p></div></div><br class="example-break" /></div></div></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="Datums"></a>Appendix A. Supported Datums</h2></div></div></div><p>
 Some formats in GPSBabel support multiple datums.  For example, the 
 <code class="option">datum</code> option to the 
-<a href="#fmt_garmin_txt" title="Garmin MapSource - txt (tab delimited) (garmin_txt)">garmin_txt</a> format allows you to specify
+<a class="link" href="#fmt_garmin_txt" title="Garmin MapSource - txt (tab delimited) (garmin_txt)">garmin_txt</a> format allows you to specify
 a datum for the output file.  
 </p><p>
 The following is a list of the datums supported by GPSBabel.
 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>Adindan</td><td>Cuba NAD27</td><td>La Reunion</td><td>Qornoq</td></tr><tr><td>AFG</td><td>Cyprus</td><td>Liberia 1964</td><td>Quatar National</td></tr><tr><td>Ain-El-Abd</td><td>Djakarta(Batavia)</td><td>Luzon</td><td>Rome 1940</td></tr><tr><td>Alaska-NAD27</td><td>DOS 1968</td><td>Mahe 1971</td><td>S-42(Pulkovo1942)</td></tr><tr><td>Alaska-Canada</td><td>Easter lsland 1967</td><td>Marco Astro</td><td>S.E.Asia_(Indian)</td></tr><tr><td>Anna-1-Astro</td><td>Egypt</td><td>Masirah Is. Nahrwan</td><td>SAD-69/Brazil</td></tr><tr><td>ARC 1950 Mean</td><td>European 1950</td><td>Massawa</td><td>Santa Braz</td></tr><tr><td>ARC 1960 Mean</td><td>European 1950 mean</td><td>Merchich</td><td>Santo (DOS)</td></tr><tr><td>Asc Island 58</td><td>European 1979 mean</td><td>Mexico NAD27</td><td>Sapper Hill 43</td></tr><tr><td>Astro B4</td><td>Finnish Nautical</td><td>Midway Astro 61</td><td>Schwarzeck</td></tr><tr><td>Astro Beacon E</td><td>Gandajika Base</td><td>Mindanao</td><td>Sicily</td></tr><tr><td>Astro pos 71/4</td><td>Geodetic Datum 49</td><td>Minna</td><td>Sierra Leone 1960</td></tr><tr><td>Astro stn 52</td><td>Ghana</td><td>Montjong Lowe</td><td>S. Am. 1969 mean</td></tr><tr><td>Australia Geo 1984</td><td>Greenland NAD27</td><td>Nahrwan</td><td>South Asia</td></tr><tr><td>Bahamas NAD27</td><td>Guam 1963</td><td>Naparima BWI</td><td>Southeast Base</td></tr><tr><td>Bellevue IGN</td><td>Gunung Segara</td><td>North America 83</td><td>Southwest Base</td></tr><tr><td>Bermuda 1957</td><td>Gunung Serindung 1962</td><td>N. America 1927 mean</td><td>Tananarive Obs 25</td></tr><tr><td>Bukit Rimpah</td><td>GUX1 Astro</td><td>Observatorio 1966</td><td>Thai/Viet (Indian)</td></tr><tr><td>Camp_Area_Astro</td><td>Herat North</td><td>Old Egyptian</td><td>Timbalai 1948</td></tr><tr><td>Campo_Inchauspe</td><td>Hjorsey 1955</td><td>Old Hawaiian_mean</td><td>Tokyo mean</td></tr><tr><td>Canada_Mean(NAD27)</td><td>Hong Kong 1963</td><td>Old Hawaiian Kauai</td><td>Tristan Astro 1968</td></tr><tr><td>Canal_Zone_(NAD27)</td><td>Hu-Tzu-Shan</td><td>Old Hawaiian Maui</td><td>United Arab Emirates</td></tr><tr><td>Canton_Island_1966</td><td>Indian</td><td>Old Hawaiian Oahu</td><td>Viti Levu 1916</td></tr><tr><td>Cape</td><td>Iran</td><td>Oman</td><td>Wake Eniwetok 60</td></tr><tr><td>Cape_Canaveral_mean</td><td>Ireland 1965</td><td>OSGB36</td><td>WGS 72</td></tr><tr><td>Carribean NAD27</td><td>ISTS 073 Astro 69</td><td>Pico De Las Nieves</td><td>WGS 84</td></tr><tr><td>Carthage</td><td>Johnston Island 61</td><td>Pitcairn Astro 67</td><td>Yacare</td></tr><tr><td>Cent America NAD27</td><td>Kandawala</td><td>S. Am. 1956 mean(P)</td><td>Zanderij</td></tr><tr><td>Chatham 1971</td><td>Kerguelen Island</td><td>S. Chilean 1963 (P)</td><td>Sweden</td></tr><tr><td>Chua Astro</td><td>Kertau 48</td><td>Puerto Rico</td><td> </td></tr><tr><td>Corrego Alegre</td><td>L.C. 5 Astro</td><td>Pulkovo 1942</td><td> </td></tr></table></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="GarminIcons"></a>Appendix B. Garmin Icons</h2></div></div></div><p>
 Following is a list of the valid values for the 
-<a href="#fmt_garmin" title="Garmin serial/USB protocol (garmin)">garmin</a> <code class="option">deficon</code> option.
+<a class="link" href="#fmt_garmin" title="Garmin serial/USB protocol (garmin)">garmin</a> <code class="option">deficon</code> option.
 These values are also used internally by the 
-<a href="#fmt_gdb" title="Garmin MapSource - gdb (gdb)">GDB</a>,
-<a href="#fmt_bcr" title="Motorrad Routenplaner (Map&amp;Guide) .bcr files (bcr)">BCR</a>,
-<a href="#fmt_mapsource" title="Garmin MapSource - mps (mapsource)">Mapsource</a>,
-<a href="#fmt_geoniche" title="GeoNiche .pdb (geoniche)">Geoniche</a>,
-<a href="#fmt_gpilots" title="GpilotS (gpilots)">GPilotS</a>,
-<a href="#fmt_pcx" title="Garmin PCX5 (pcx)">PCX</a>, and
-<a href="#fmt_psitrex" title="KuDaTa PsiTrex text (psitrex)">PSITrex</a> 
+<a class="link" href="#fmt_gdb" title="Garmin MapSource - gdb (gdb)">GDB</a>,
+<a class="link" href="#fmt_bcr" title="Motorrad Routenplaner (Map&amp;Guide) .bcr files (bcr)">BCR</a>,
+<a class="link" href="#fmt_mapsource" title="Garmin MapSource - mps (mapsource)">Mapsource</a>,
+<a class="link" href="#fmt_geoniche" title="GeoNiche .pdb (geoniche)">Geoniche</a>,
+<a class="link" href="#fmt_gpilots" title="GpilotS (gpilots)">GPilotS</a>,
+<a class="link" href="#fmt_pcx" title="Garmin PCX5 (pcx)">PCX</a>, and
+<a class="link" href="#fmt_psitrex" title="KuDaTa PsiTrex text (psitrex)">PSITrex</a> 
 formats.
 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>ATV</td><td>Contact, Glasses</td><td>Hunting Area</td><td>Number 0, Green</td><td>Scales</td></tr><tr><td>Airport</td><td>Contact, Goatee</td><td>Ice Skating</td><td>Number 0, Red</td><td>Scenic Area</td></tr><tr><td>Amusement Park</td><td>Contact, Kung-Fu</td><td>Information</td><td>Number 1, Blue</td><td>School</td></tr><tr><td>Anchor</td><td>Contact, Panda</td><td>Intersection</td><td>Number 1, Green</td><td>Seafood</td></tr><tr><td>Anchor Prohibited</td><td>Contact, Pig</td><td>Intl freeway hwy</td><td>Number 1, Red</td><td>Seaplane Base</td></tr><tr><td>Animal Tracks</td><td>Contact, Pirate</td><td>Intl national hwy</td><td>Number 2, Blue</td><td>Shipwreck</td></tr><tr><td>Asian Food</td><td>Contact, Ranger</td><td>Italian food</td><td>Number 2, Green</td><td>Shopping Center</td></tr><tr><td>Bait and Tackle</td><td>Contact, Smiley</td><td>Large Ramp intersection</td><td>Number 2, Red</td><td>Short Tower</td></tr><tr><td>Ball Park</td><td>Contact, Spike</td><td>Large exit without services</td><td>Number 3, Blue</td><td>Shower</td></tr><tr><td>Bank</td><td>Contact, Sumo</td><td>Letter A, Blue</td><td>Number 3, Green</td><td>Ski Resort</td></tr><tr><td>Bar</td><td>Controlled Area</td><td>Letter A, Green</td><td>Number 3, Red</td><td>Skiing Area</td></tr><tr><td>Beach</td><td>Convenience Store</td><td>Letter A, Red</td><td>Number 4, Blue</td><td>Skull and Crossbones</td></tr><tr><td>Beacon</td><td>Cover</td><td>Letter B, Blue</td><td>Number 4, Green</td><td>Small City</td></tr><tr><td>Bell</td><td>Covey</td><td>Letter B, Green</td><td>Number 4, Red</td><td>Small Game</td></tr><tr><td>Big Game</td><td>Crossing</td><td>Letter B, Red</td><td>Number 5, Blue</td><td>Soft Field</td></tr><tr><td>Bike Trail</td><td>Dam</td><td>Letter C, Blue</td><td>Number 5, Green</td><td>Square, Blue</td></tr><tr><td>Blind</td><td>Danger Area</td><td>Letter C, Green</td><td>Number 5, Red</td><td>Square, Green</td></tr><tr><td>Block, Blue</td><td>Deli</td><td>Letter C, Red</td><td>Number 6, Blue</td><td>Square, Red</td></tr><tr><td>Block, Green</td><td>Department Store</td><td>Letter D, Blue</td><td>Number 6, Green</td><td>Stadium</td></tr><tr><td>Block, Red</td><td>Diamond, Blue</td><td>Letter D, Green</td><td>Number 6, Red</td><td>State Hwy</td></tr><tr><td>Blood Trail</td><td>Diamond, Green</td><td>Letter D, Red</td><td>Number 7, Blue</td><td>Steak</td></tr><tr><td>Boat Ramp</td><td>Diamond, Red</td><td>Letterbox Cache</td><td>Number 7, Green</td><td>Street Intersection</td></tr><tr><td>Border Crossing (Port Of Entry)</td><td>Diver Down Flag 1</td><td>Levee</td><td>Number 7, Red</td><td>Stump</td></tr><tr><td>Bottom Conditions</td><td>Diver Down Flag 2</td><td>Library</td><td>Number 8, Blue</td><td>Summit</td></tr><tr><td>Bowling</td><td>Dock</td><td>Light</td><td>Number 8, Green</td><td>Swimming Area</td></tr><tr><td>Bridge</td><td>Dot, White</td><td>Live Theater</td><td>Number 8, Red</td><td>TACAN</td></tr><tr><td>Building</td><td>Drinking Water</td><td>Localizer Outer Marker</td><td>Number 9, Blue</td><td>Tall Tower</td></tr><tr><td>Buoy, White</td><td>Dropoff</td><td>Locationless (Reverse) Cache</td><td>Number 9, Green</td><td>Telephone</td></tr><tr><td>Campground</td><td>Elevation point</td><td>Lodge</td><td>Number 9, Red</td><td>Tide/Current PRediction Station</td></tr><tr><td>Car</td><td>Event Cache</td><td>Lodging</td><td>Oil Field</td><td>Toll Booth</td></tr><tr><td>Car Rental</td><td>Exit</td><td>Man Overboard</td><td>Open 24 Hours</td><td>TracBack Point</td></tr><tr><td>Car Repair</td><td>Exit without services</td><td>Marina</td><td>Oval, Blue</td><td>Trail Head</td></tr><tr><td>Cemetery</td><td>Fast Food</td><td>Medical Facility</td><td>Oval, Green</td><td>Tree Stand</td></tr><tr><td>Church</td><td>First approach fix</td><td>Micro-Cache</td><td>Oval, Red</td><td>Treed Quarry</td></tr><tr><td>Circle with X</td><td>Fishing Area</td><td>Mile Marker</td><td>Parachute Area</td><td>Triangle, Blue</td></tr><tr><td>Circle, Blue</td><td>Fishing Hot Spot Facility</td><td>Military</td><td>Park</td><td>Triangle, Green</td></tr><tr><td>Circle, Green</td><td>Fitness Center</td><td>Mine</td><td>Parking Area</td><td>Triangle, Red</td></tr><tr><td>Circle, Red</td><td>Flag</td><td>Missed approach point</td><td>Pharmacy</td><td>Truck</td></tr><tr><td>City (Capitol)</td><td>Flag, Blue</td><td>Movie Theater</td><td>Picnic Area</td><td>Truck Stop</td></tr><tr><td>City (Large)</td><td>Flag, Green</td><td>Multi-Cache</td><td>Pin, Blue</td><td>Tunnel</td></tr><tr><td>City (Medium)</td><td>Flag, Red</td><td>Multi-Cache</td><td>Pin, Green</td><td>U Marina</td></tr><tr><td>City (Small)</td><td>Food Source</td><td>Museum</td><td>Pin, Red</td><td>U stump</td></tr><tr><td>City Hall</td><td>Forest</td><td>Navaid, Amber</td><td>Pizza</td><td>US hwy</td></tr><tr><td>Civil</td><td>Furbearer</td><td>Navaid, Black</td><td>Police Station</td><td>Ultralight Area</td></tr><tr><td>Coast Guard</td><td>Gambling/casino</td><td>Navaid, Blue</td><td>Post Office</td><td>Unknown Cache</td></tr><tr><td>Contact, Afro</td><td>Gas Station</td><td>Navaid, Green</td><td>Post Office</td><td>Upland Game</td></tr><tr><td>Contact, Alien</td><td>Geocache</td><td>Navaid, Green/Red</td><td>Private Field</td><td>VHF Omni-range</td></tr><tr><td>Contact, Ball Cap</td><td>Geocache Found</td><td>Navaid, Green/White</td><td>Puzzle Cache</td><td>VOR-DME</td></tr><tr><td>Contact, Big Ears</td><td>Geographic place name, Man-made</td><td>Navaid, Orange</td><td>RV Park</td><td>VOR/TACAN</td></tr><tr><td>Contact, Biker</td><td>Geographic place name, land</td><td>Navaid, Red</td><td>Radio Beacon</td><td>Virtual cache</td></tr><tr><td>Contact, Blonde</td><td>Geographic place name, water</td><td>Navaid, Red/Green</td><td>Ramp intersection</td><td>Water Hydrant</td></tr><tr><td>Contact, Bug</td><td>Ghost Town</td><td>Navaid, Red/White</td><td>Rectangle, Blue</td><td>Water Source</td></tr><tr><td>Contact, Cat</td><td>Glider Area</td><td>Navaid, Violet</td><td>Rectangle, Green</td><td>Waterfowl</td></tr><tr><td>Contact, Clown</td><td>Golf Course</td><td>Navaid, White</td><td>Rectangle, Red</td><td>Waypoint</td></tr><tr><td>Contact, Dog</td><td>Ground Transportation</td><td>Navaid, White/Green</td><td>Reef</td><td>Webcam Cache</td></tr><tr><td>Contact, Dreadlocks</td><td>Heliport</td><td>Navaid, White/Red</td><td>Residence</td><td>Weed Bed</td></tr><tr><td>Contact, Female1</td><td>Horn</td><td>Non-directional beacon</td><td>Restaurant</td><td>Winery</td></tr><tr><td>Contact, Female2</td><td>Hotel</td><td>Null</td><td>Restricted Area</td><td>Wrecker</td></tr><tr><td>Contact, Female3</td><td>House</td><td>Number 0, Blue</td><td>Restroom</td><td>Zoo</td></tr></table></div><div class="appendix" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="Styles"></a>Appendix C. GPSBabel XCSV Style Files</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#styles_intro">Introduction</a></span></dt><dt><span class="section"><a href="#style_intro2">Style file overview</a></span></dt><dt><span class="section"><a href="#styles_internal_const">Internal Constants</a></span></dt><dt><span class="section"><a href="#style_global">Global Properties of the File</a></span></dt><dt><span class="section"><a href="#style_behavior">GPSBabel Behavior Directives</a></span></dt><dt><span class="section"><a href="#style_layout">Defining the Layout of the File</a></span></dt><dt><span class="section"><a href="#style_define">Defining Fields Within the File</a></span></dt><dt><span class="section"><a href="#style_examples">Examples</a></span></dt><dt><span class="section"><a href="#style_notes">Miscellaneous Notes</a></span></dt></dl></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="styles_intro"></a>Introduction</h2></div></div></div><p>
 Often it is desirable to add a new file format for "one-off" work (perhaps
@@ -4354,7 +4909,7 @@ must be one listed by 'gpsbabel -l'.    example:
 </p><pre class="screen">   ENCODING          UTF-8     # Use UTF-8 for input and output.
 </pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_global_datum"></a>DATUM</h3></div></div></div><p>
 This value specifies the GPS datum to be used on read or write. Valid values for this 
-option are listed in <a href="#Datums" title="Appendix A. Supported Datums">Appendix A, <i>Supported Datums</i></a>.
+option are listed in <a class="xref" href="#Datums" title="Appendix A. Supported Datums">Appendix A, <i>Supported Datums</i></a>.
 </p><pre class="screen">   DATUM             European 1950
 </pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_global_datatype"></a>DATATYPE</h3></div></div></div><p>
 Specifies the kind of data we have to read or write.
@@ -4679,7 +5234,7 @@ example:
 </pre><p>
    Search the web for 'strptime man page' for details strptime, but one 
    such page can be found at
-<a href="http://www.die.net/doc/linux/man/man3/strptime.3.html" target="_top">http://www.die.net/doc/linux/man/man3/strptime.3.html</a>
+<a class="ulink" href="http://www.die.net/doc/linux/man/man3/strptime.3.html" target="_top">http://www.die.net/doc/linux/man/man3/strptime.3.html</a>
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_def_localtime"></a>LOCAL_TIME</h3></div></div></div><p>
  LOCAL_TIME is the waypoint's creation time, in the local
  time zone.  It uses strptime conversion format tags.  See GMT_TIME for a
@@ -4755,6 +5310,18 @@ example:
 </p><p>
 example:
 </p><pre class="screen">   GEOCACHE_PLACER,"","%s"
+</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_def_isavailable"></a>GEOCACHE_ISAVAILABLE</h3></div></div></div><p>
+   GEOCACHE_ISAVAILABLE is a string containing "True" or "False" 
+   indicating whether a geocache is currently available or not.  
+</p><p>
+example:
+</p><pre class="screen">   GEOCACHE_ISAVAILABLE,"","%s"
+</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_def_isarchived"></a>GEOCACHE_ISARCHIVED</h3></div></div></div><p>
+   GEOCACHE_ISARCHIVED is a string containing "True" or "False" 
+   indicating whether a geocache has been archived.   
+</p><p>
+example:
+</p><pre class="screen">   GEOCACHE_ISARCHIVED,"","%s"
 </pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_def_geofound"></a>GEOCACHE_LAST_FOUND</h3></div></div></div><p>
    A long integer in format YYYYMMDD containing the last time this geocache
    was found.
@@ -4786,7 +5353,7 @@ example:
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_def_pathspeed"></a>PATH_SPEED</h3></div></div></div><p>
    Speed in meters per second. Gpsbabel does NOT calculate this data by 
    default; it is read from the input file if present.  (If not present,
-   it may be calculated with the <a href="#filter_track" title="Manipulate track lists (track)">track</a>
+   it may be calculated with the <a class="link" href="#filter_track" title="Manipulate track lists (track)">track</a>
    filter.)
 </p><p>
 example:
@@ -4809,7 +5376,7 @@ example:
 </pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_def_pathcourse"></a>PATH_COURSE</h3></div></div></div><p>
    Course in degerees.  Gpsbabel does not calculate this data by default; 
    it is read from the input file if present.  (If not present, it may be
-   calculated with the <a href="#filter_track" title="Manipulate track lists (track)">track</a> filter.)
+   calculated with the <a class="link" href="#filter_track" title="Manipulate track lists (track)">track</a> filter.)
 </p><p>
 example:
 </p><pre class="screen">   PATH_COURSE,"","%f"
@@ -4826,12 +5393,12 @@ example:
 example:
 </p><pre class="screen">   GPS_SAT,"","%d"
 </pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_def_gpsfix"></a>GPS_FIX</h3></div></div></div><p>
-   Type of fix (see GPX spec or <a href="#filter_track" title="Manipulate track lists (track)">track</a>
+   Type of fix (see GPX spec or <a class="link" href="#filter_track" title="Manipulate track lists (track)">track</a>
 filter). Needs string conversion.
 </p><p>
 example:
 </p><pre class="screen">   GPS_FIX,"","%s"
-</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_track_name"></a>TRACK_NAME</h3></div></div></div><p>The name of the track currently being operated on.  Needs string conversion.</p><p>example:</p><pre class="screen">TRACK_NAME, "", "%s"</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_route_name"></a>ROUTE_NAME</h3></div></div></div><p>The name of the route currently being operated on.  Needs string conversion.</p><p>example:</p><pre class="screen">ROUTE_NAME, "", "%s"</pre></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="style_examples"></a>Examples</h2></div></div></div><p>
+</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_track_name"></a>TRACK_NAME</h3></div></div></div><p>The name of the track currently being operated on.  Needs string conversion.</p><p>example:</p><pre class="screen">TRACK_NAME, "", "%s"</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_route_name"></a>ROUTE_NAME</h3></div></div></div><p>The name of the route currently being operated on.  Needs string conversion.</p><p>example:</p><pre class="screen">ROUTE_NAME, "", "%s"</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_street_addr"></a>STREET_NAME</h3></div></div></div><p>Street address including house number.  Notice that this is not used for any geocoding, it's merely textual description associated with a position.</p><p>example:</p><pre class="screen">STREET_ADDR, "", "%s"</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_city"></a>CITY</h3></div></div></div><p>The name of a city. Sometimes part of "Points of Interest".   This is simple textual data associated with a position, no geocoding will be done..</p><p>example:</p><pre class="screen">CITY, "", "%s"</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_country"></a>COUNTRY</h3></div></div></div><p>The name of a country associated with a position.</p><p>example:</p><pre class="screen">COUNTRY, "", "%s"</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_facility"></a>FACILITY</h3></div></div></div><p>The name of a facility to associate with a position.</p><p>example:</p><pre class="screen">FACILITY, "", "%s"</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_phone_nr"></a>PHONE_NR</h3></div></div></div><p>A phone number associated with a position.  This is just textual data attached for convenience.</p><p>example:</p><pre class="screen">PHONE_NR, "", "%s"</pre></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_postal_code"></a>POSTAL_CODE</h3></div></div></div><p>A postal code to associate with a position.  It is freeform text and is not used by GPSBabel for any geocoding or such.</p><p>example:</p><pre class="screen">POSTAL_CODE, "", "%s"</pre></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="style_examples"></a>Examples</h2></div></div></div><p>
 Here is one example style file from the GPSBabel source.
 </p><div class="literallayout"><p><br />
 # gpsbabel XCSV style file<br />
@@ -4879,7 +5446,7 @@ that are suitable for Garmin's POI loader.
 </p><p>
 For additional examples, please see the 
 <code class="filename">*.style</code> files in the 
-<code class="filename">style/</code> subdirectory of GPSBabel or at the <a href="http://gpsbabel.cvs.sourceforge.net/gpsbabel/gpsbabel/style/" target="_top">online source tree</a>.
+<code class="filename">style/</code> subdirectory of GPSBabel or at the <a class="ulink" href="http://gpsbabel.cvs.sourceforge.net/gpsbabel/gpsbabel/style/" target="_top">online source tree</a>.
 </p></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="style_notes"></a>Miscellaneous Notes</h2></div></div></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h3 class="title"><a id="style_notes_default"></a>Default Values</h3></div></div></div><p>   
 Default values are supported for any output fields that contain pure 
    character data output such as URL and NOTES.  Default values are only
@@ -4887,7 +5454,7 @@ Default values are supported for any output fields that contain pure
    using default values your mileage will vary greatly depending on the 
    input formats used to populate waypoint data.
 </p></div></div></div><div class="glossary"><div class="titlepage"><div><div><h2 class="title"><a id="Glossary"></a>Glossary</h2></div></div></div><p>Terms that are used in conjunction with GPSBabel.</p><div class="glossdiv"><h3 class="title">G</h3><dl><dt><a id="gl_xml"></a>Geocaching</dt><dd><p>GPS based "paper chase", see 
-          <a href="http://en.wikipedia.org/wiki/Geocaching" target="_top">http://en.wikipedia.org/wiki/Geocaching</a></p></dd></dl></div><div class="glossdiv"><h3 class="title">I</h3><dl><dt><a id="gl_itinerary"></a>Itinerary</dt><dd><p>same as a Route (e.g. used by TomTom)</p></dd></dl></div><div class="glossdiv"><h3 class="title">P</h3><dl><dt><a id="gl_poi"></a>Points of Interest (POI)</dt><dd><p>a collection of gas stations, post boxes, shops and
+          <a class="ulink" href="http://en.wikipedia.org/wiki/Geocaching" target="_top">http://en.wikipedia.org/wiki/Geocaching</a></p></dd></dl></div><div class="glossdiv"><h3 class="title">I</h3><dl><dt><a id="gl_itinerary"></a>Itinerary</dt><dd><p>same as a Route (e.g. used by TomTom)</p></dd></dl></div><div class="glossdiv"><h3 class="title">P</h3><dl><dt><a id="gl_poi"></a>Points of Interest (POI)</dt><dd><p>a collection of gas stations, post boxes, shops and
           like.</p></dd></dl></div><div class="glossdiv"><h3 class="title">R</h3><dl><dt><a id="gl_route"></a>Route</dt><dd><p>a list of geopoints (often with names) connected in
           a specific order. Usually a collection of geopoints
           defining the route you want to pass while traveling,
index 024cd47e1849c26d9fde78497a40bcee556c1a5b..8a0d3e6b4cbe067d4bf0082eeedbdfb5963e3638 100644 (file)
--- a/gpssim.c
+++ b/gpssim.c
@@ -23,7 +23,7 @@
 
 #define MYNAME "gpssim"
 
-static FILE *fout;
+static gbfile *fout;
 static char *wayptspd;
 static char *splitfiles_opt;
 static int splitfiles;
@@ -60,7 +60,7 @@ gpssim_wr_init(const char *fname)
        }
 
        if (!splitfiles) {
-               fout = xfopen(fname, "wb", MYNAME);
+               fout = gbfopen(fname, "wb", MYNAME);
        }
 }
 
@@ -68,7 +68,7 @@ static void
 gpssim_wr_deinit(void)
 {
        if (fout) {
-               fclose(fout);
+               gbfclose(fout);
                fout = NULL;
        }
 
@@ -84,7 +84,7 @@ gpssim_wr_deinit(void)
 static void 
 gpssim_write_sentence(const char *const s)
 {
-       fprintf(fout, "$%s*%02X\r\n", s, nmea_cksum(s));
+       gbfprintf(fout, "$%s*%02X\r\n", s, nmea_cksum(s));
 }
 
 static void
@@ -145,7 +145,7 @@ gpssim_trk_hdr(const route_head *rh)
                        doing_tracks ? "-track" : "-route",
                        trk_count++);
                ofname = xstrappend(ofname, c);
-               fout = xfopen(ofname, "wb", MYNAME);
+               fout = gbfopen(ofname, "wb", MYNAME);
                xfree(ofname);
        }
        track_recompute(rh, NULL);
@@ -155,7 +155,7 @@ static void
 gpssim_trk_ftr(const route_head *rh)
 {
        if (splitfiles) {
-               fclose(fout);
+               gbfclose(fout);
                fout = NULL;
        }
 }
@@ -167,7 +167,7 @@ gpssim_write(void)
                if (splitfiles) {
                        char *ofname = xstrdup(fnamestr);
                        ofname = xstrappend(ofname, "-waypoints.gpssim");
-                       fout = xfopen(ofname, "wb", MYNAME);
+                       fout = gbfopen(ofname, "wb", MYNAME);
                        xfree(ofname);
                }
                if (wayptspd && wayptspd[0]) {
@@ -175,7 +175,7 @@ gpssim_write(void)
                }
                waypt_disp_all(gpssim_write_pt);
                if (splitfiles) {
-                       fclose(fout);
+                       gbfclose(fout);
                        fout = NULL;
                }
        }
diff --git a/gpx.c b/gpx.c
index 7e9bc32320cad6a777cc44f8a55cb354d05bf8e2..20121117bbd7a8ab04bd6d7c59244e5fd2c2cea6 100644 (file)
--- a/gpx.c
+++ b/gpx.c
@@ -46,6 +46,7 @@ static vmem_t current_tag;
 static waypoint *wpt_tmp;
 static int cache_descr_is_html;
 static gbfile *fd;
+static const char *input_fname;
 static gbfile *ofd;
 static short_handle mkshort_handle;
 static const char *link_url;
@@ -291,17 +292,21 @@ tag_mapping tag_path_map[] = {
        /* Double up the GPX 1.0 and GPX 1.1 styles */
 #define GEOTAG(type,name) \
   {type, 1, "/gpx/wpt/groundspeak:cache/groundspeak:" name, 0UL }, \
-  {type, 1, "/gpx/wpt/extensions/cache/" name, 0UL }
+  {type, 1, "/gpx/wpt/extensions/cache/" name, 0UL }, \
+  {type, 1, "/gpx/wpt/geocache/" name, 0UL }  /* opencaching.de */
 
 #define GARMIN_WPT_EXT "/gpx/wpt/extensions/gpxx:WaypointExtension"
 
-       GEOTAG( tt_cache,               "cache"),
+//     GEOTAG( tt_cache,               "cache"),
+       { tt_cache, 1, "/gpx/wpt/groundspeak:cache" },
+
        GEOTAG( tt_cache_name,          "name"),
        GEOTAG( tt_cache_container,     "container"),
        GEOTAG( tt_cache_type,          "type"),
        GEOTAG( tt_cache_difficulty,    "difficulty"),
        GEOTAG( tt_cache_terrain,       "terrain"),
        GEOTAG( tt_cache_hint,          "encoded_hints"),
+       GEOTAG( tt_cache_hint,          "hints"), /* opencaching.de */
        GEOTAG( tt_cache_desc_short,    "short_description"),
        GEOTAG( tt_cache_desc_long,     "long_description"),
        GEOTAG( tt_cache_placer,        "owner"),
@@ -480,6 +485,20 @@ tag_gs_cache(const char **attrv)
        for (avp = &attrv[0]; *avp; avp+=2) {
                if (strcmp(avp[0], "id") == 0) {
                                wpt_tmp->gc_data.id = atoi(avp[1]);
+               } else if (strcmp(avp[0], "available") == 0) {
+                       if (case_ignore_strcmp(avp[1], "True") == 0) {
+                               wpt_tmp->gc_data.is_available = status_true;
+                       }
+                       else if (case_ignore_strcmp(avp[1], "False") == 0) {
+                               wpt_tmp->gc_data.is_available = status_false;
+                       }                       
+               } else if (strcmp(avp[0], "archived") == 0) {
+                       if (case_ignore_strcmp(avp[1], "True") == 0) {
+                               wpt_tmp->gc_data.is_archived = status_true;
+                       }
+                       else if (case_ignore_strcmp(avp[1], "False") == 0) {
+                               wpt_tmp->gc_data.is_archived = status_false;
+                       }                       
                }
        }
 }
@@ -685,12 +704,18 @@ gs_type_mapping{
        const char *name;
 } gs_type_map[] = {
        { gt_traditional, "Traditional Cache" },
+       { gt_traditional, "Traditional" }, /* opencaching.de */
        { gt_multi, "Multi-cache" },
+       { gt_multi, "Multi" }, /* opencaching.de */
        { gt_virtual, "Virtual Cache" },
+       { gt_virtual, "Virtual" }, /* opencaching.de */
        { gt_event, "Event Cache" },
+       { gt_event, "Event" }, /* opencaching.de */
        { gt_webcam, "Webcam Cache" },
+       { gt_webcam, "Webcam" }, /* opencaching.de */
        { gt_suprise, "Unknown Cache" },
        { gt_earth, "Earthcache" },
+       { gt_earth, "Earth" }, /* opencaching.de */
        { gt_cito, "Cache In Trash Out Event" },
        { gt_letterbox, "Letterbox Hybrid" },
        { gt_locationless, "Locationless (Reverse) Cache" },
@@ -886,22 +911,6 @@ gpx_end(void *data, const XML_Char *xml_el)
        /*
         * Waypoint-specific tags.
         */
-       case tt_wpt_url:
-               wpt_tmp->url = xstrdup(cdatastrp);
-               break;
-       case tt_wpt_urlname:
-               wpt_tmp->url_link_text = xstrdup(cdatastrp);
-               break;
-       case tt_wpt_link: {
-               char *lt = link_text;
-               if (lt) {
-                       lt = xstrdup(lrtrim(link_text));
-               }
-               
-               waypt_add_url(wpt_tmp, xstrdup(link_url), lt);
-               link_text = NULL;
-               }
-               break;
        case tt_wpt:
                waypt_add(wpt_tmp);
                logpoint_ct = 0;
@@ -1085,6 +1094,29 @@ gpx_end(void *data, const XML_Char *xml_el)
                                wpt_tmp->fix = fix_unknown;
                }
                break;
+       case tt_wpt_url:
+       case tt_trk_trkseg_trkpt_url:
+       case tt_rte_rtept_url:
+               wpt_tmp->url = xstrdup(cdatastrp);
+               break;
+       case tt_wpt_urlname:
+       case tt_trk_trkseg_trkpt_urlname:
+       case tt_rte_rtept_urlname:
+               wpt_tmp->url_link_text = xstrdup(cdatastrp);
+               break;
+       case tt_wpt_link: 
+//TODO: implement GPX 1.1      case tt_trk_trkseg_trkpt_link: 
+//TODO: implement GPX 1.1      case tt_rte_rtept_link: 
+               {
+               char *lt = link_text;
+               if (lt) {
+                       lt = xstrdup(lrtrim(link_text));
+               }
+               
+               waypt_add_url(wpt_tmp, xstrdup(link_url), lt);
+               link_text = NULL;
+               }
+               break;
        case tt_unknown:
                end_something_else();
                *s = 0;
@@ -1164,11 +1196,13 @@ gpx_rd_init(const char *fname)
 {
        if ( fname[0] ) {
                fd = gbfopen(fname, "r", MYNAME);
+               input_fname = fname;
        }
        else {
                fd = NULL;
                input_string = fname+1;
                input_string_len = strlen(input_string);
+               input_fname = NULL;
        }
 
 
@@ -1245,6 +1279,7 @@ gpx_rd_deinit(void)
        psr = NULL;
        wpt_tmp = NULL;
        cur_tag = NULL;
+       input_fname = NULL;
 }
 #endif
 
@@ -1320,11 +1355,12 @@ gpx_read(void)
                                        semi = strchr( badchar, ';' );
                                        if ( semi ) {
                                                while (*hexit && *hexit != ';') {
+                                                       char hc = isalpha(*hexit) ? tolower (*hexit) : *hexit;
                                                        val *= 16;
-                                                       val += strchr( hex, *hexit )-hex;
+                                                       val += strchr( hex, hc)-hex;
                                                        hexit++;
                                                }
-                                               
+
                                                if ( val < 32 ) {
                                                        warning( MYNAME ": Ignoring illegal character %s;\n\tConsider emailing %s at <%s>\n\tabout illegal characters in their GPX files.\n", badchar, gpx_author?gpx_author:"(unknown author)", gpx_email?gpx_email:"(unknown email address)" );
                                                        memmove( badchar, semi+1, strlen(semi+1)+1 );
@@ -1348,8 +1384,9 @@ gpx_read(void)
                        result = -1;
                }
                if (!result) {
-                       fatal(MYNAME ": XML parse error at %d: %s\n", 
+                       fatal(MYNAME ": XML parse error at line %d of '%s' : %s\n", 
                                (int) XML_GetCurrentLineNumber(psr),
+                               input_fname ? input_fname : "unknown file",
                                XML_ErrorString(XML_GetErrorCode(psr)));
                }
        }
index 07425d417bddf87927c29ffc3b8f4127093b9220..12446e91b9ed51701c466a300c79c81ba19034a7 100644 (file)
--- a/gtrnctr.c
+++ b/gtrnctr.c
@@ -22,7 +22,7 @@
 #include "defs.h"
 #include "xmlgeneric.h"
 
-static FILE *ofd;
+static gbfile *ofd;
 static waypoint *wpt_tmp;
 static route_head *trk_head;
 
@@ -77,13 +77,13 @@ gtc_rd_deinit(void)
 static void
 gtc_wr_init(const char *fname)
 {
-        ofd = xfopen(fname, "w", MYNAME);
+        ofd = gbfopen(fname, "w", MYNAME);
 }
 
 static void
 gtc_wr_deinit(void)
 {
-        fclose(ofd);
+        gbfclose(ofd);
 }
 
 static int gtc_indent_level;
@@ -91,38 +91,34 @@ static void
 gtc_write_xml(int indent, const char *fmt, ...)
 {
        va_list args;
-       int i;
+
        va_start(args, fmt);
 
        if (indent < 0) gtc_indent_level--;
 
-       for (i = 0; i < gtc_indent_level; i++) {
-               fputs("  ", ofd);
-       }
-
-       vfprintf(ofd, fmt, args);
+       gbfprintf(ofd, "%*s", gtc_indent_level * 2, "");
+       gbvfprintf(ofd, fmt, args);
 
        if (indent > 0) gtc_indent_level++;
 
        va_end(args);
-
 }
 
 static void
 gtc_waypt_pr(const waypoint *wpt)
 {      
 #if 0
-       fprintf(ofd, "            <Trackpoint>\n");
-       fprintf(ofd, "                <Position>\n");
-       fprintf(ofd, "                    <Latitude>%.5f</Latitude>\n", wpt->latitude);
-       fprintf(ofd, "                    <Longitude>%.5f</Longitude>\n", wpt->longitude);
+       gbfprintf(ofd, "            <Trackpoint>\n");
+       gbfprintf(ofd, "                <Position>\n");
+       gbfprintf(ofd, "                    <Latitude>%.5f</Latitude>\n", wpt->latitude);
+       gbfprintf(ofd, "                    <Longitude>%.5f</Longitude>\n", wpt->longitude);
        if (wpt->altitude != unknown_alt) {
-               fprintf(ofd, "                    <Altitude>%.3f</Altitude>\n", wpt->altitude);
+               gbfprintf(ofd, "                    <Altitude>%.3f</Altitude>\n", wpt->altitude);
        }
-       fprintf(ofd, "                </Position>\n");
-       fprintf(ofd, "                ");
+       gbfprintf(ofd, "                </Position>\n");
+       gbfprintf(ofd, "                ");
        xml_write_time(ofd, wpt->creation_time, "Time");
-       fprintf(ofd, "            </Trackpoint>\n");
+       gbfprintf(ofd, "            </Trackpoint>\n");
 #else
        gtc_write_xml(1, "<Trackpoint>\n");
        if (wpt->creation_time) {
@@ -208,12 +204,12 @@ void
 gtc_write(void)
 {
 #if 0
-       fprintf(ofd, "<?xml version=\"1.0\" ?>\n");
-       fprintf(ofd, "<History xmlns=\"http://www.garmin.com/xmlschemas/ForerunnerLogbook\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.garmin.com/xmlschemas/ForerunnerLogbook http://www.garmin.com/xmlschemas/ForerunnerLogbookv1.xsd\" version=\"1\">\n");
-       fprintf(ofd, "    <Run>\n");
+       gbfprintf(ofd, "<?xml version=\"1.0\" ?>\n");
+       gbfprintf(ofd, "<History xmlns=\"http://www.garmin.com/xmlschemas/ForerunnerLogbook\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.garmin.com/xmlschemas/ForerunnerLogbook http://www.garmin.com/xmlschemas/ForerunnerLogbookv1.xsd\" version=\"1\">\n");
+       gbfprintf(ofd, "    <Run>\n");
        track_disp_all(gtc_hdr, gtc_ftr, gtc_waypt_pr);
-       fprintf(ofd, "    </Run>\n");
-       fprintf(ofd, "</History>\n");
+       gbfprintf(ofd, "    </Run>\n");
+       gbfprintf(ofd, "</History>\n");
 #else
        gtc_write_xml(0, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n");
        gtc_write_xml(1, "<TrainingCenterDatabase\nxmlns=\"http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1\"\nxmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\nxsi:schemaLocation=\"http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v1\nhttp://www.garmin.com/xmlschemas/TrainingCenterDatabasev1.xsd\">\n");
@@ -234,7 +230,7 @@ gtc_write(void)
        }
        gtc_fake_hdr();
        track_disp_all(gtc_hdr, gtc_ftr, gtc_waypt_pr);
-       gtc_write_xml(1, "</Lap>\n");
+       gtc_write_xml(-1, "</Lap>\n");
        gtc_write_xml(-1, "</Run>\n");
        gtc_write_xml(-1, "</Running>\n");
        gtc_write_xml(0, "<Biking />\n");
diff --git a/holux.c b/holux.c
index a3ffe6baa3a4e13a0ceb645182447ab6027fcca1..ba1010c0ce3cc683265e89c0e35e64612632e3b2 100644 (file)
--- a/holux.c
+++ b/holux.c
@@ -32,10 +32,10 @@ History:
 #include "holux.h"
 
 
-static  gbfile *file_in;
+static  gbfile *file_in, *file_out;
 static         unsigned char *HxWFile;
 static  short_handle mkshort_handle;
-static  char fOutname[256];
+
 #define MYNAME "Holux"
 
 
@@ -61,7 +61,7 @@ wr_init(const char *fname)
 
        HxWFile = xcalloc(GM100_WPO_FILE_SIZE, 1);
 
-       strcpy (fOutname,fname);
+       file_out = gbfopen_le(fname, "wb", MYNAME);
 }
 
 
@@ -71,7 +71,7 @@ wr_init(const char *fname)
 static void wr_deinit(void)
 {   
         mkshort_del_handle(&mkshort_handle);
-
+       gbfclose(file_out);
 }
 
 
@@ -99,7 +99,7 @@ static void data_read(void)
 
     if (iDataRead == 0)
     {
-               fatal("GPSBABEL: Error reading data from .wpo file\n");
+               fatal(MYNAME ": Error reading data from %s.\n", file_in->name);
     }
 
     iWptNum = le_read16(&((WPTHDR *)HxWpt)->num);
@@ -255,7 +255,6 @@ static void holux_disp(const waypoint *wpt)
 static void data_write(void)
 {
     int iWritten;
-    FILE *file_out;
     short sCount;
 
     /* init the waypoint area*/
@@ -283,16 +282,11 @@ static void data_write(void)
 
     waypt_disp_all(holux_disp);
    
-
-    file_out = xfopen(fOutname, "wb", MYNAME);
-  
-    iWritten = fwrite (HxWFile, 1, GM100_WPO_FILE_SIZE,file_out);  
+    iWritten = gbfwrite (HxWFile, 1, GM100_WPO_FILE_SIZE,file_out);  
     if (iWritten == 0)
     {
-               fatal("GPSBABEL: Error writing .%s\n", fOutname);
+               fatal(MYNAME ": Error writing data to %s.\n", file_out->name);
     }
-
-       fclose(file_out);
     xfree(HxWFile);
 }
 
diff --git a/ik3d.c b/ik3d.c
new file mode 100644 (file)
index 0000000..8685886
--- /dev/null
+++ b/ik3d.c
@@ -0,0 +1,196 @@
+/* 
+
+       Support for "MagicMaps" project files (.ikt)
+
+       Copyright (C) 2008 Olaf Klein, o.b.klein@gpsbabel.org
+
+       This program is free software; you can redistribute it and/or modify
+       it under the terms of the GNU General Public License as published by
+       the Free Software Foundation; either version 2 of the License, or
+       (at your option) any later version.
+
+       This program is distributed in the hope that it will be useful,
+       but WITHOUT ANY WARRANTY; without even the implied warranty of
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       GNU General Public License for more details.
+
+       You should have received a copy of the GNU General Public License
+       along with this program; if not, write to the Free Software
+       Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+*/
+
+#include "defs.h"
+#include "xmlgeneric.h"
+
+static arglist_t ikt_args[] = 
+{
+       ARG_TERMINATOR
+};
+
+#define MYNAME "ikt"
+
+#if ! HAVE_LIBEXPAT
+void
+ikt_rd_init(const char *fname)
+{
+       fatal(MYNAME ": This build excluded \" MYNAME \" support because expat was not installed.\n");
+}
+
+void
+ikt_read(void)
+{
+}
+
+#else
+
+static route_head *track;
+static waypoint *waypt;
+static char *name, *text;
+
+static xg_callback     iktobj_waypt, iktobj_type, iktobj_name, iktobj_trkpt, iktobj_text;
+
+#define IKTOBJ   "/Root/Content/MMGeoObjects/MMGeoObject"
+
+/* Here we are working with wildcards in the tag list.
+   Please ensure that the longest entries comes first */
+
+static 
+xg_tag_mapping ikt_map[] = {
+       { iktobj_trkpt, cb_start,       IKTOBJ "_*/PathPoints/Point_*/GeoPosition" },
+       { iktobj_type,  cb_cdata,       IKTOBJ "_*/GeoObjectType" },
+       { iktobj_waypt, cb_start,       IKTOBJ "_*/GeoPosition" },
+       { iktobj_name,  cb_cdata,       IKTOBJ "_*/Name" },
+       { iktobj_text,  cb_cdata,       IKTOBJ "_*/POIDrawable2D/Text" },
+       { NULL,         0,              NULL }
+};
+
+static void
+ikt_object_end(void)
+{
+       if (track) {
+               track->rte_name = name;
+               track_add_head(track);
+               name = NULL;
+       }
+       else if (waypt) {
+               waypt->shortname = name;
+               waypt->description = text;
+               waypt_add(waypt);
+               name = NULL;
+               text = NULL;
+       }
+       if (name) {
+               xfree(name);
+               name = NULL;
+       }
+       if (text) {
+               xfree(text);
+               text = NULL;
+       }
+       track = NULL;
+       waypt = NULL; 
+}
+
+static void 
+iktobj_waypt(const char *args, const char **attrv)
+{
+       const char **avp = &attrv[0];
+
+        while (*avp) {
+               if (strcmp(avp[0], "X") == 0) waypt->longitude = atof(avp[1]);
+               else if (strcmp(avp[0], "Y") == 0) waypt->latitude = atof(avp[1]);
+               avp+=2;
+       }
+}
+
+static void
+iktobj_trkpt(const char *args, const char **attrv)
+{
+       const char **avp = &attrv[0];
+
+       waypt = waypt_new();
+       while (*avp) {
+               if (strcmp(avp[0], "X") == 0) waypt->longitude = atof(avp[1]);
+               else if (strcmp(avp[0], "Y") == 0) waypt->latitude = atof(avp[1]);
+               avp+=2;
+       }
+       track_add_wpt(track, waypt);
+       waypt = NULL;
+}
+
+static void 
+iktobj_name(const char *args, const char **unused)
+{
+       name = xstrdup(args);
+}
+
+static void 
+iktobj_text(const char *args, const char **unused)
+{
+       text = xstrdup(args);
+}
+
+static void 
+iktobj_type(const char *args, const char **unused)
+{
+       ikt_object_end();
+
+       switch(atoi(args)) {
+               case 0: 
+                       waypt = waypt_new();
+                       break;
+               case 1: 
+                       track = route_head_alloc(); 
+                       break;
+               default: 
+                       fatal(MYNAME ": Unknown object type %s!\n", args);
+       }
+}
+
+static void 
+ikt_rd_init(const char *fname)
+{
+       xml_init(fname, ikt_map, NULL);
+       
+       track = NULL;
+       waypt = NULL;
+       name = NULL;
+       text = NULL;
+}
+
+static void 
+ikt_read(void)
+{
+       xml_read();
+}
+
+#endif
+
+static void 
+ikt_rd_deinit(void)
+{
+       ikt_object_end();
+       if (name) xfree(name);
+       if (text) xfree(text);
+
+       xml_deinit();
+}
+
+ff_vecs_t ik3d_vecs = {
+       ff_type_file,
+       {
+         ff_cap_read,  /* waypoints */
+         ff_cap_read,  /* tracks */
+         ff_cap_none   /* routes */
+       },
+       ikt_rd_init,    
+       NULL,   
+       ikt_rd_deinit,
+       NULL,
+       ikt_read,
+       NULL,
+       NULL, 
+       ikt_args,
+       CET_CHARSET_UTF8, 1
+};
index 0e6d70e6ac4cc4132a8d80c176a42cbf7439590d..b370c6e9046d8599bebe2cbd48aca533a43e56b7 100644 (file)
@@ -536,6 +536,7 @@ static char ktf2[] =
 "# \n"
 "DESCRIPTION   Kartex 5 Track File\n"
 "EXTENSION     ktf\n"
+"DATATYPE      TRACK\n"
 "SHORTLEN      10\n"
 "SHORTWHITE    1\n"
 "#\n"
@@ -792,7 +793,7 @@ static char s_and_t[] =
 "# GC171C,44.70605,-85.62265,The Michigan Frog by RealDcoy & LRB,http://www.geocaching.com/seek/cache_details.aspx?ID=5916,Traditional Cache\n"
 "#\n"
 
-"DESCRIPTION           Microsoft Streets and Trips 2002-2006\n"
+"DESCRIPTION           Microsoft Streets and Trips 2002-2007\n"
 "EXTENSION               txt\n"
 
 
@@ -859,6 +860,7 @@ static char sportsim[] =
 "#\n"
 "DESCRIPTION   Sportsim track files (part of zipped .ssz files) \n"
 "EXTENSION     txt\n"
+"DATATYPE      TRACK\n"
 
 "#\n"
 "# FILE LAYOUT DEFINITIIONS:\n"
@@ -992,11 +994,45 @@ static char tomtom_itn[] =
 "#\n"
 "# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:\n"
 "#\n"
-"IFIELD        LAT_10E5, \"\", \"%.f\"\n"
 "IFIELD        LON_10E5, \"\", \"%.f\"\n"
+"IFIELD        LAT_10E5, \"\", \"%.f\"\n"
 "IFIELD        SHORTNAME, \"\", \"%s\"\n"
 "IFIELD        CONSTANT, \"0\", \"%s\"\n"
 ;
+static char xmap[] = 
+"# gpsbabel XCSV style file\n"
+"#\n"
+"# Format: DeLorme Xmap Conduit\n"
+"# Author: Alex Mottram\n"
+"#   Date: 12/09/2002\n"
+"#\n"
+"# \n"
+"# As defined in csv.c/xmap\n"
+"#\n"
+
+"DESCRIPTION           DeLorme XMap HH Native .WPT\n"
+"EXTENSION             wpt\n"
+
+"#\n"
+"# FILE LAYOUT DEFINITIIONS:\n"
+"#\n"
+"FIELD_DELIMITER               COMMASPACE\n"
+"RECORD_DELIMITER      NEWLINE\n"
+"BADCHARS              COMMA\n"
+
+"PROLOGUE      BEGIN SYMBOL\n"
+"EPILOGUE      END\n"
+"#\n"
+"# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:\n"
+"#\n"
+"IFIELD        LAT_HUMAN_READABLE, \"\", \"%08.5f\"\n"
+"IFIELD        LON_HUMAN_READABLE, \"\", \"%08.5f\"\n"
+"IFIELD        DESCRIPTION, \"\", \"%s\"\n"
+
+"OFIELD        LAT_DECIMAL, \"\", \"%08.5f\"\n"
+"OFIELD        LON_DECIMAL, \"\", \"%08.5f\"\n"
+"OFIELD        DESCRIPTION, \"\", \"%s\"\n"
+;
 static char xmap2006[] = 
 "# gpsbabel XCSV style file\n"
 "#\n"
@@ -1035,40 +1071,6 @@ static char xmap2006[] =
 
 
 
-;
-static char xmap[] = 
-"# gpsbabel XCSV style file\n"
-"#\n"
-"# Format: DeLorme Xmap Conduit\n"
-"# Author: Alex Mottram\n"
-"#   Date: 12/09/2002\n"
-"#\n"
-"# \n"
-"# As defined in csv.c/xmap\n"
-"#\n"
-
-"DESCRIPTION           DeLorme XMap HH Native .WPT\n"
-"EXTENSION             wpt\n"
-
-"#\n"
-"# FILE LAYOUT DEFINITIIONS:\n"
-"#\n"
-"FIELD_DELIMITER               COMMASPACE\n"
-"RECORD_DELIMITER      NEWLINE\n"
-"BADCHARS              COMMA\n"
-
-"PROLOGUE      BEGIN SYMBOL\n"
-"EPILOGUE      END\n"
-"#\n"
-"# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:\n"
-"#\n"
-"IFIELD        LAT_HUMAN_READABLE, \"\", \"%08.5f\"\n"
-"IFIELD        LON_HUMAN_READABLE, \"\", \"%08.5f\"\n"
-"IFIELD        DESCRIPTION, \"\", \"%s\"\n"
-
-"OFIELD        LAT_DECIMAL, \"\", \"%08.5f\"\n"
-"OFIELD        LON_DECIMAL, \"\", \"%08.5f\"\n"
-"OFIELD        DESCRIPTION, \"\", \"%s\"\n"
 ;
 static char xmapwpt[] = 
 "# gpsbabel XCSV style file\n"
@@ -1102,7 +1104,7 @@ static char xmapwpt[] =
 "IFIELD        IGNORE, \"\", \"%-.31s\"\n"
 "IFIELD        DESCRIPTION, \"\", \"%-.78s\"\n"
 ;
-style_vecs_t style_list[] = {{ "xmapwpt", xmapwpt } , { "xmap", xmap } , { "xmap2006", xmap2006 } , { "tomtom_itn", tomtom_itn } , { "tomtom_asc", tomtom_asc } , { "tabsep", tabsep } , { "sportsim", sportsim } , { "saplus", saplus } , { "s_and_t", s_and_t } , { "openoffice", openoffice } , { "nima", nima } , { "mxf", mxf } , { "mapconverter", mapconverter } , { "kwf2", kwf2 } , { "ktf2", ktf2 } , { "kompass_wp", kompass_wp } , { "kompass_tk", kompass_tk } , { "gpsman", gpsman } , { "gpsdrivetrack", gpsdrivetrack } , { "gpsdrive", gpsdrive } , { "geonet", geonet } , { "garmin_poi", garmin_poi } , { "garmin301", garmin301 } , { "fugawi", fugawi } , { "dna", dna } , { "custom", custom } , { "cup", cup } , { "csv", csv } , { "cambridge", cambridge } , { "arc", arc } ,  {0,0}};
+style_vecs_t style_list[] = {{ "xmapwpt", xmapwpt } , { "xmap2006", xmap2006 } , { "xmap", xmap } , { "tomtom_itn", tomtom_itn } , { "tomtom_asc", tomtom_asc } , { "tabsep", tabsep } , { "sportsim", sportsim } , { "saplus", saplus } , { "s_and_t", s_and_t } , { "openoffice", openoffice } , { "nima", nima } , { "mxf", mxf } , { "mapconverter", mapconverter } , { "kwf2", kwf2 } , { "ktf2", ktf2 } , { "kompass_wp", kompass_wp } , { "kompass_tk", kompass_tk } , { "gpsman", gpsman } , { "gpsdrivetrack", gpsdrivetrack } , { "gpsdrive", gpsdrive } , { "geonet", geonet } , { "garmin_poi", garmin_poi } , { "garmin301", garmin301 } , { "fugawi", fugawi } , { "dna", dna } , { "custom", custom } , { "cup", cup } , { "csv", csv } , { "cambridge", cambridge } , { "arc", arc } ,  {0,0}};
 size_t nstyles = 30;
 #else /* CSVFMTS_ENABLED */
 style_vecs_t style_list[] = {{0,0}};
index b0474ab2a2ceb150424aee8392d82302e1cce78b..651ed61e3a22686c039cca5e1085a4a04ae4504c 100644 (file)
@@ -124,6 +124,7 @@ void copy_char_array(UC **dst, char* src, int count, copycase mustupper)
        int ocount =  count;
        do {
                UC sc = *src++;
+               if (!isalnum(sc)) continue;
                if (sc == 0) {
                        while (count--) 
                                *d++ = ' ';
@@ -2495,7 +2496,6 @@ static void GPS_D154_Send(UC *data, GPS_PWay way, int32 *len)
 static void GPS_D155_Send(UC *data, GPS_PWay way, int32 *len)
 {
     UC *p;
-    int32 i;
     
     p = data;
 
@@ -2518,11 +2518,11 @@ static void GPS_D155_Send(UC *data, GPS_PWay way, int32 *len)
     GPS_Util_Put_Short(p,(US) way->alt);
     p+=sizeof(int16);
 
-    for(i=0;i<2;++i) *p++ = way->cc[i];
+    copy_char_array(&p, way->cc, 2, UpperYes);
     *p++ = 0;
 
-    if(way->wpt_class == 5) way->wpt_class = 0;
-    *p++   = way->wpt_class;
+    /* Ignore wpt_class; our D155 points are always user type which is "4". */
+    *p++ = 4;
 
     GPS_Util_Put_Short(p,(int16)way->smbl);
     p+=sizeof(int16);
index 054c1160841009366602c1406f9baae9c8e15cc9..005aeb0a734342d60dc84d02d4d4b34ed124fa4a 100644 (file)
@@ -43,7 +43,7 @@ GPS_OEllipse GPS_Ellipse[]=
     { "WGS60",                   6378165.000, 298.3 },
     { "WGS66",                   6378145.000, 298.25 },
     { "WGS72",                   6378135.000, 298.26 },
-    { "WGS84",                   6378137.000, 298.257223563 }
+    { "WGS84",                   6378137.000, 298.257223563 },
 };
 
 
@@ -181,10 +181,50 @@ GPS_ODatum GPS_Datum[]=
 /* 119 */    { "Yacare",               17,     -155,   171,    37      },
 /* 120 */    { "Zanderij",             17,     -265,   120,    -358    },
 /* 121 */    { "Sweden",               4,      424.3,  -80.5,  613.1   },
+/* 122 */    { "GDA 94",               21,     0,      0,      0       },
+/* 123 */    { "CH-1903",              4,      674,    15,     405     },
             { NULL,                    0,      0,      0,      0       }
 };
 
 
+typedef struct GPS_SDatum_Alias
+{
+    char *alias;
+    const int datum;
+} GPS_ODatum_Alias, *GPS_PDatum_Alias;
+
+GPS_ODatum_Alias GPS_DatumAlias[] =
+{
+    { "Australian GDA94", 122 },
+    { "GDA94", 122 },
+    { "GDA-94", 122 },
+    { "CH1903", 123 },
+    { "CH 1903", 123 },
+    { "Geodetic Datum 1949", 42 },
+    { "NAD27 Alaska", 3 },
+    { "NAD27 Bahamas", 14 },
+    { "NAD27 Canada", 4 },
+    { "NAD27 Canal Zone", 21 },
+    { "NAD27 Caribbean", 25 },
+    { "NAD27 Central", 27 },
+    { "NAD27 CONUS", 78 },
+    { "NAD27 Cuba", 31 },
+    { "NAD27 Greenland", 44 },
+    { "NAD27 Mexico", 70 },
+    { "NAD83", 77 },
+    { "NAD 83", 77 },
+    { "NAD-83", 77 },
+    { "OSGB 36", 86 },
+    { "OSGB-36", 86 },
+    { "Wake-Eniwetok 1960", 116 },
+    { "WGS72", 117 },
+    { "WGS-72", 117 },
+    { "WGS84", 118 },
+    { "WGS-84", 118 },
+    { NULL, -1 }
+};
+
+
 /* UK Ordnance Survey Nation Grid Map Codes */
 static char *UKNG[]=
 {
index 89d0797c84e13fe2b79cd17655b389d7528bd0c7..9cdf8474147713d2e67553974f349507a52557c0 100644 (file)
@@ -41,7 +41,7 @@ static int32 GPS_Input_Get_D105(GPS_PWay *way, FILE *inf);
 static int32 GPS_Input_Get_D106(GPS_PWay *way, FILE *inf);
 static int32 GPS_Input_Get_D107(GPS_PWay *way, FILE *inf);
 static int32 GPS_Input_Get_D108(GPS_PWay *way, FILE *inf);
-static int32 GPS_Input_Get_D109(GPS_PWay *way, FILE *inf);
+static int32 GPS_Input_Get_D109(GPS_PWay *way, FILE *inf, int protonum);
 static int32 GPS_Input_Get_D150(GPS_PWay *way, FILE *inf);
 static int32 GPS_Input_Get_D151(GPS_PWay *way, FILE *inf);
 static int32 GPS_Input_Get_D152(GPS_PWay *way, FILE *inf);
index 92493c79e619662c0348e7dd212426056210e3e1..a8d40d9273948093fc967f1edae905597c673b3e 100644 (file)
@@ -28,7 +28,6 @@
 #include "gpsdatum.h"
 
 
-
 static int32 GPS_Math_LatLon_To_UTM_Param(double lat, double lon, int32 *zone,
                                          char *zc, double *Mc, double *E0,
                                          double *N0, double *F0);
@@ -505,11 +504,6 @@ void GPS_Math_XYZ_To_WGS84LatLonH(double *phi, double *lambda, double *H,
 }
 
 
-
-
-
-
-    
 /* @func  GPS_Math_LatLon_To_EN **********************************
 **
 ** Convert latitude and longitude to eastings and northings
@@ -675,8 +669,374 @@ void GPS_Math_Airy1830LatLonToNGEN(double phi, double lambda, double *E,
 }
 
 
+/* @func GPS_Math_WGS84_To_CH1903_NGEN *********************************
+**
+** Convert WGS84 latitude and longitude to 
+** Swiss CH-1903 National Grid Eastings and Northings
+** ( Oblique Mercator Projection )
+**
+** @param [r] phi [double] WGS84 latitude     (deg)
+** @param [r] lambda [double] WGS84 longitude (deg)
+** @param [w] E [double *] Swiss-NG easting (metres)
+** @param [w] N [double *] Swiss-NG northing (metres)
+**
+** @return [void]
+************************************************************************/
+
+int32 GPS_Math_WGS84_To_CH1903_NGEN(double lat, double lon, double *E,
+                                  double *N)
+{
+#if 1
+       double alat, alon, aht;
+       
+       GPS_Math_WGS84_To_Known_Datum_M(lat, lon, 0, &alat, &alon, &aht, 123);
+       return GPS_Math_LatLon_To_OM_EN(alat, alon, E, N,
+               46.95240555555556,      /* phiC, center of projection */
+               7.439583333333333,      /* lambdaC, center of projection */
+               90,                     /* azimuth true (initial line) */
+               90,                     /* Angle from Rectified to Skew Grid */
+               1,                      /* const double kC,     */
+               600000,                 /* false easting */
+               200000,                 /* false northing */
+               GPS_Ellipse[4].a,
+               GPS_Ellipse[4].invf,
+               0,                      /* const char hotine, */
+               1                       /* const char degrees */ );
+#else
+
+       /* short-hand method, only good for swiss area */
+       /* reference: http://www.swisstopo.ch/pub/down/basics/geo/system/ch1903_wgs84_en.pdf */
+       /* reference: <http://www.remotesensing.org/geotiff/proj_list/epsg_om.html> */
+       
+       double phi = ((lat * 3600) - 169028.66) / 10000;
+       double lambda = ((lon * 3600) - 26782.5) / 10000;
+       
+       if ((lat < 0) || (lon < 0)) return 0;
+       
+       *E =  (double)600072.37 +
+            ((double)211455.93 * lambda) -
+            ((double)10938.51 * lambda * phi) -
+            ((double)0.36 * lambda * (phi * phi)) -
+            ((double)44.54 * (lambda * lambda * lambda));
+            
+       *N = (double)200147.07 +
+           ((double)308807.95 * phi) +
+           ((double)3745.25 * (lambda * lambda)) +
+           ((double)76.63 * (phi * phi)) -
+           ((double)194.56 * (lambda * lambda * phi)) +
+           ((double)119.79 * (phi * phi * phi));
+
+       return ((*E >= 0) && (*N >=0)) ? 1 : 0;
+#endif
+}
 
 
+/* @func GPS_Math_CH1903_NGEN_To_WGS84 *********************************
+**
+** Convert WGS84 latitude and longitude to 
+** Swiss CH-1903 National Grid Eastings and Northings
+**
+** @param [r] E [double] Swiss-NG easting (metres)
+** @param [r] N [double] Swiss-NG northing (metres)
+** @param [w] lat [double *] WGS84 latitude     (deg)
+** @param [w] lon [double *] WGS84 longitude (deg)
+**
+** @return [void]
+************************************************************************/
+
+void GPS_Math_CH1903_NGEN_To_WGS84(double E, double N, double *lat, double *lon)
+{
+#if 0
+       double alat, alon, aht;
+       GPS_Math_OM_EN_To_LatLon(E, N, &alat, &alon,
+               46.95240555555556,      /* phiC, center of projection */
+               7.439583333333333,      /* lambdaC, center of projection */
+               90,                     /* azimuth true (initial line) */
+               90,                     /* ??? Angle from Rectified to Skew Grid */
+               1,                      /* const double kC,     */
+               600000,                 /* false easting */
+               200000,                 /* false northing */
+               GPS_Ellipse[4].a,
+               GPS_Ellipse[4].invf,
+               0,                      /* const char hotine, */
+               1                       /* const char degrees */ );
+       GPS_Math_Known_Datum_To_WGS84_M(alat, alon, 0, lat, lon, &aht, 123);
+#else
+       /* short-hand method 1 (only good for swiss area) */
+       
+       double y = (E - 600000) / 1000000;
+       double x = (N - 200000) / 1000000;
+       
+       *lon = (double)2.6779094 +
+               ((double)4.728982 * y) +
+               ((double)0.791484 * y * x) +
+               ((double)0.1306 * y * x * x) -
+               ((double)0.0436 * y * y * y);
+            
+       *lat = (double)16.9023892 +
+               ((double)3.238272 * x) -
+               ((double)0.270978 * y * y) -
+               ((double)0.002528 * x * x) -
+               ((double)0.0447 * y * y * x) -
+               ((double)0.0140 * x * x * x);
+               
+       *lat *= ((double)100 / 36);
+       *lon *= ((double)100 / 36);
+#endif
+}
+
+#define SIGN(a) (((a) < 0) ? -1 : (((a) > 0) ? +1 : 0))
+
+/* @func GPS_Math_LatLon_To_OM_EN *********************************
+**
+** Convert latitude and longitude to Oblique Mercator or Hotine Oblique 
+** Mercator projection easting and northing
+**
+** status: OKAY
+** reference: <http://www.remotesensing.org/geotiff/proj_list/epsg_om.html>
+**
+** @param [r] phi [double] latitude
+** @param [r] lambda [double] latitude
+** @param [w] E [double *] easting
+** @param [w] N [double *] northing
+** @param [r] phiC [double] center of projection
+** @param [r] lamdaC [double] center of projection
+** @param [r] azmC [double] azimuth true (initial line)
+** @param [r] gammaC [double] angle from Rectified to Skew Grid
+** @param [r] kC [double] skaling factor
+** @param [r] FE [double] false easting / E0 for Hotine OM
+** @param [r] FN [double] false northing / N0 for Hotine OM
+** @param [r] a [double] semi-major axis (meter)
+** @param [r] invf [double] flattening (inv.)
+** @param [r] hotine [int] use Hotine Hotine Oblique Mercator projection
+** @param [r] degrees [int] 1 = parameters in degrees, otherwise radians
+**
+** @return [int32] result 1 = success
+************************************************************************/
+
+int32 GPS_Math_LatLon_To_OM_EN(
+       double phi, double lambda, double *E, double *N,
+       double phiC, double lambdaC, double azmC, double gammaC, const double kC,
+       const double FE, const double FN, const double a, const double invf,
+       const char hotine, const char degrees)
+{
+       double e, e2, f;
+       double A, B, t0, D, F, G, H, t, Q, S, T, V, U, v, u;
+       double lambda0, gamma0, uC;
+       double cos4, D2;
+       
+       /* prepare parameter */
+       
+       if (degrees) {
+               phi = phi * M_PI / 180.0;
+               lambda = lambda * M_PI / 180.0;
+               phiC = phiC * M_PI / 180.0;
+               lambdaC = lambdaC * M_PI / 180.0;
+               azmC = azmC * M_PI / 180.0;
+               gammaC = gammaC * M_PI / 180.0;
+       }
+       f = 1 / invf;
+       e2 = 2 * f - f * f;
+       e = sqrt(e2);
+       
+       cos4 = cos(phiC);
+       cos4 *= cos4;
+       cos4 *= cos4;
+       
+       B = sqrt(1 + (e2 * cos4) / (1 - e2));
+       A = a * B * kC * sqrt(1 - e2) / (1 - e2 * sin(phiC) * sin(phiC));
+       t0 = tan((M_PI/4) - (phiC/2)) / pow((1 - e * sin(phiC)) / (1 + e * sin(phiC)), e/2);
+       D = B * sqrt(1 - e2) / (cos(phiC) * sqrt(1 - e2 * sin(phiC) * sin(phiC)));
+       D2 = (D < 1) ? 1 : (D * D);
+       F = D + sqrt(D2 - 1) * SIGN(phiC);
+
+       H = F * pow(t0, B);
+       G = (F - (1 / F)) / 2;
+       gamma0 = asin(sin(azmC) / D);
+       lambda0 = lambdaC - asin(G * tan(gamma0)) / B;
+
+       if (azmC == (M_PI / 2)) {
+               uC = A * (lambdaC - lambda0);
+       }
+       else {
+               uC = (A / B) * atan(sqrt(D2 - 1) / cos(azmC)) * SIGN(phiC);
+       }
+       
+       /* now calculate from LatLon to EN */
+       
+       t = tan(M_PI/4 - phi/2) / pow((1 - e * sin(phi)) / (1 + e * sin(phi)), e/2);
+       
+       Q = H / pow(t, B);
+       S = (Q - 1.0 / Q) / 2;
+       T = (Q + 1.0 / Q) / 2;
+       V = sin(B * (lambda - lambda0));
+       U = ((-1.0 * V * cos(gamma0)) + (S * sin(gamma0))) / T;
+       v = A * log((1.0 - U) / (1.0 + U)) / (2.0 * B);
+       if (hotine) {
+               u = A * atan((S * cos(gamma0) + V * sin(gamma0)) / cos(B * (lambda - lambda0))) / B;
+       }
+       else {
+               double tmp = fabs(uC) * SIGN(phiC);
+               u = (A * atan((S * cos(gamma0) + V * sin(gamma0)) / cos(B * (lambda - lambda0))) / B);
+               if (u < 0) u = u + tmp;
+               else u = u - tmp;
+       }
+
+       *E = (v * cos(gammaC)) + (u * sin(gammaC)) + FE;
+       *N = (u * cos(gammaC)) - (v * sin(gammaC)) + FN;
+#if 0
+       printf("B   = %.9f\t\tF   = %.9f\n", B, F);
+       printf("A   = %.3f\t\tH   = %.9f\n", A, H);
+       printf("t0  = %.9f\t\tgam0= %.9f\n", t0, gamma0);
+       printf("D   = %.9f\t\tlam0= %.9f\n", D, lambda0);
+       printf("D2  = %.9f\n", D2);
+       printf("uC  = %.2f\t\t\tvC  = %.2f\n", uC, (double)0);
+       printf("\nt   = %.9f\t\tQ   = %.9f\n", t, Q);
+       printf("S   = %.9f\t\tT   = %.9f\n", S, T);
+       printf("V   = %.9f\t\tU   = %.9f\n", V, U);
+       printf("v   = %.3f\t\tu   = %.3f\n", v, u);
+#endif
+       if ((*E >= 0) && (&N >= 0)) return 1;
+       else return 0;
+}
+
+
+/* @func GPS_Math_OM_EN_To_LatLon *********************************
+**
+** Convert Oblique Mercator or Hotine Oblique Mercator projection
+** easting and northing to latitude and longitude
+**
+** status: not really tested, BUT unusable for 'Swiss Grid'
+** reference: <http://www.remotesensing.org/geotiff/proj_list/epsg_om.html>
+**
+** @param [r] E [double] easting
+** @param [r] N [double] northing
+** @param [w] phi [double *] latitude
+** @param [w] lambda [double *] latitude
+** @param [r] phiC [double] center of projection
+** @param [r] lamdaC [double] center of projection
+** @param [r] azmC [double] azimuth true (initial line)
+** @param [r] gammaC [double] angle from Rectified to Skew Grid
+** @param [r] kC [double] skaling factor
+** @param [r] FE [double] false easting / E0 for Hotine OM
+** @param [r] FN [double] false northing / N0 for Hotine OM
+** @param [r] a [double] semi-major axis (meter)
+** @param [r] invf [double] flattening (inv.)
+** @param [r] hotine [int] use Hotine Hotine Oblique Mercator projection
+** @param [r] degrees [int] 1 = parameters in degrees, otherwise radians
+**
+** @return [void]
+************************************************************************/
+
+void GPS_Math_OM_EN_To_LatLon(
+       const double E, const double N, double *phi, double *lambda,
+       double phiC, double lambdaC, double azmC, double gammaC, const double kC,
+       const double FE, const double FN, const double a, const double invf,
+       const char hotine, const char degrees)
+{
+       double e, e2, e4, e6, e8, f;
+       double A, B, t0, D, F, G, H;
+       double v, u, Q, S, T, V, U, t, chi;
+       double lambda0, gamma0, uC;
+       double cos4, D2;
+       
+       /* prepare parameter */
+       
+       f = 1 / invf;
+       e2 = 2 * f - f * f;
+       e4 = e2 * e2;
+       e6 = e4 * e2;
+       e8 = e4 * e4;
+       e = sqrt(e2);
+       
+       if (degrees) {
+               phiC = phiC * M_PI / 180.0;
+               lambdaC = lambdaC * M_PI / 180.0;
+               azmC = azmC * M_PI / 180.0;
+               gammaC = gammaC * M_PI / 180.0;
+       }
+       
+       cos4 = cos(phiC);
+       cos4 *= cos4;
+       cos4 *= cos4;
+       
+       B = sqrt((double)1 + (e2 * cos4) / (1 - e2));
+       A = a * B * kC * sqrt((double)1 - e2) / (1 - e2 * sin(phiC) * sin(phiC));
+       t0 = tan((M_PI/4) - (phiC/2)) / pow((1 - e * sin(phiC)) / ((double)1 + e * sin(phiC)), e/2);
+       D = B * sqrt(1 - e2) / (cos(phiC) * sqrt((double)1 - e2 * sin(phiC) * sin(phiC)));
+       D2 = (D < 1) ? 1 : (D * D);
+       F = D + sqrt(D2 - 1) * SIGN(phiC);
+
+       H = F * pow(t0, B);
+       G = (F - ((double)1 / F)) / 2;
+       gamma0 = asin(sin(azmC) / D);
+       lambda0 = lambdaC - asin(G * tan(gamma0)) / B;
+
+       if (azmC == (M_PI / 2)) {
+               uC = A * (lambdaC - lambda0);
+       }
+       else {
+               uC = (A / B) * atan(sqrt(D2 - 1) / cos(azmC)) * SIGN(phiC);
+       }
+
+       /* now calculate from LatLon to EN */
+       
+       if (hotine) {
+               v = (E - FE) * cos(gammaC) - (N - FN) * sin(gammaC);
+               u = (N - FN) * cos(gammaC) + (E - FE) * sin(gammaC);
+       }
+       else {
+               v = (E - FE) * cos(gammaC) - (N - FN) * sin(gammaC);
+               u = (N - FN) * cos(gammaC) + (E - FE) * sin(gammaC) + uC;
+       }
+
+       Q = exp(-1.0 * (B * v / A));
+       S = (Q - 1/Q) / 2;
+       T = (Q + 1/Q) / 2;
+       V = sin(B * u / A);
+       U = (V * cos(gamma0) + S * sin(gamma0)) / T;
+       t = pow(H / sqrt((1.0 + U) / (1.0 - U)), 1.0 / B);
+       chi = (M_PI / 2) - (atan(t) * 2);
+
+       *phi = chi + sin(chi*2) * (e2 / 2 + 5*e4 / 24 + e6 / 12 + e8 / 360) +
+              sin(chi*4) * (7 * e4 / 48 + 29 * e6 / 240 + 811*e8 / 11520) + 
+              sin(chi*6) * (7 * e6 /120 + 81 * e8 / 1120) +
+              sin(chi*8) * (4279 * e8 / 161280);
+              
+//     *lambda = lambda0 - atan2((S * cos(gammaC) - V * sin(gammaC)), cos(B * u / A)) / B;
+       *lambda = lambda0 - atan((S * cos(gammaC) - V * sin(gammaC)) / cos(B * u / A)) / B;
+       
+       /* finalize results */
+       if (degrees) {
+               *phi = *phi * 180.0 / M_PI;
+               *lambda = *lambda * 180.0 / M_PI;
+       }
+
+#if 0
+       printf("\nE   = %11.3f\t\tN   = %11.3f\n", E, N);
+       printf("\nB   = %.9f\t\tF   = %.9f\n", B, F);
+       printf("A   = %.3f\t\tH   = %.9f\n", A, H);
+       printf("t0  = %.9f\t\tgam0= %.9f\n", t0, gamma0);
+       printf("D   = %.9f\t\tlam0= %.9f\n", D, lambda0);
+       printf("D2  = %.9f\n", D2);
+       printf("uC  = %.2f\n", uC);
+       printf("cosG= %11.9f\t\tsinG = %11.9f\n", cos(gammaC), sin(gammaC));
+       printf("BuA = %11.9f\t\tcosBuA=%9.9f\n", B * u / A, cos(B * u / A));
+       printf("S * cos(gammaC) = %11.9f\n", S * cos(gammaC));
+       printf("V * sin(gammaC) = %11.9f\n", V * sin(gammaC));
+       printf("base= %11.9f\t\tatan = %11.9f\n", 
+               (S * cos(gammaC) - V * sin(gammaC)) / cos(B * u / A),
+               atan((S * cos(gammaC) - V * sin(gammaC)) / cos(B * u / A))
+       );
+
+       printf("v'  = %11.3f\t\tu'  = %.3f\n", v, u);
+       printf("Q'  = %.9f\n", Q);
+       printf("S'  = %11.9f\t\tT'  = %.9f\n", S, T);
+       printf("V'  = %11.9f\t\tU'  = %.9f\n", V, U);
+       printf("t'  = %11.9f\t\tchi'= %0.9f\n", t, chi);
+#endif
+}
+
 /* @func  GPS_Math_EN_To_LatLon **************************************
 **
 ** Convert Eastings and Northings to latitude and longitude
@@ -1867,16 +2227,16 @@ int32 GPS_Math_UTM_EN_To_Known_Datum(double *lat, double *lon, double E,
 int32 GPS_Lookup_Datum_Index(const char *n)
 {
        GPS_PDatum dp;
-       const char *name;
-       
-       if (case_ignore_strcmp(n, "WGS84") == 0) name = "WGS 84";
-       else if (case_ignore_strcmp(n, "WGS-84") == 0) name = "WGS 84";
-       else if (case_ignore_strcmp(n, "WGS72") == 0) name = "WGS 72";
-       else if (case_ignore_strcmp(n, "WGS-72") == 0) name = "WGS 72";
-       else name = n;
+       GPS_PDatum_Alias al;
+
+       for (al = GPS_DatumAlias; al->alias; al++) {
+               if (case_ignore_strcmp(al->alias, n) == 0) {
+                       return al->datum;
+               }
+       }
 
        for (dp = GPS_Datum; dp->name; dp++) {
-               if (0 == case_ignore_strcmp(dp->name, name)) {
+               if (0 == case_ignore_strcmp(dp->name, n)) {
                        return dp - GPS_Datum;
                }
        }
index b112e335741e1b1480cd311fc754d1f812e4a869..51b14dae61fd976357fc2a7de720147415c162c7 100644 (file)
@@ -121,6 +121,20 @@ int32 GPS_Math_Known_Datum_To_UTM_EN(double lat, double lon, double *E,
 int32 GPS_Math_UTM_EN_To_Known_Datum(double *lat, double *lon, double E,
                               double N, int32 zone, char zc, const int n);
 
+int32 GPS_Math_WGS84_To_CH1903_NGEN(double phi, double lambda, double *E, double *N);
+void GPS_Math_CH1903_NGEN_To_WGS84(double E, double N, double *lat, double *lon);
+
+int32 GPS_Math_LatLon_To_OM_EN(double phi, double lambda, double *E, double *N,
+                              double phiC, double lambdaC, double azmC, double gammaC,
+                              const double kC, const double FE, const double FN,
+                              const double a, const double invf,
+                              const char hotine, const char degrees);
+void GPS_Math_OM_EN_To_LatLon(const double E, const double N, double *phi, double *lambda,
+                             double phiC, double lambdaC, double azmC, double gammaC,
+                             const double kC, const double FE, const double FN,
+                             const double a, const double invf,
+                             const char hotine, const char degrees);
+
 int32 GPS_Lookup_Datum_Index(const char *n);
 char *GPS_Math_Get_Datum_Name(const int datum_index);
 
diff --git a/kml.c b/kml.c
index 90cc9b671cc1bea81395f7ceabe07ecb74e429ac..3f99db5c6e6f94efa4937a91d8f513930a64136c 100644 (file)
--- a/kml.c
+++ b/kml.c
@@ -21,6 +21,7 @@
  */
 #include "defs.h"
 #include "xmlgeneric.h"
+#include "grtcirc.h"
 
 #ifdef __WIN32__
 # include <windows.h>
@@ -35,6 +36,7 @@ static char *opt_line_color = NULL;
 static char *opt_floating = NULL;
 static char *opt_extrude = NULL;
 static char *opt_trackdata = NULL;
+static char *opt_trackdirection = NULL;
 static char *opt_units = NULL;
 static char *opt_labels = NULL;
 static char *opt_max_position_points = NULL;
@@ -44,6 +46,7 @@ static int export_points;
 static int floating;
 static int extrude;
 static int trackdata;
+static int trackdirection;
 static int max_position_points;
 
 static int indent_level;
@@ -53,7 +56,7 @@ static int wpt_tmp_queued;
 static const char *posnfilename;
 static char *posnfilenametmp;
 
-static FILE *ofd;
+static gbfile *ofd;
 
 typedef struct {
   double latitude;
@@ -61,6 +64,14 @@ typedef struct {
   double altitude;
 } point3d;
 
+typedef enum  {
+  kmlpt_unknown,
+  kmlpt_waypoint,
+  kmlpt_track,
+  kmlpt_route,
+  kmlpt_other
+} kml_point_type;
+
 static int      point3d_list_len;
 static point3d *point3d_list;
 static int realtime_positioning;
@@ -69,6 +80,23 @@ static int do_indentation = 1;
 #define TD(FMT,DATA) kml_write_xml(0, "<tr><td>" FMT " </td></tr>\n", DATA)
 #define TD2(FMT,DATA, DATA2) kml_write_xml(0, "<tr><td>" FMT " </td></tr>\n", DATA, DATA2)
 
+//  Icons provided and hosted by Google.  Used with permission.
+#define ICON_BASE "http://earth.google.com/images/kml-icons/"
+
+static const char kml22_hdr[] =  
+       "<kml xmlns=\"http://earth.google.com/kml/2.2\"\n"
+       "\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n";
+//     No "baked in" schemaLocation, per Google recommendation.
+//     "\txsi:schemaLocation=\"http://earth.google.com/kml/2.2 \n"
+//     "\thttp://code.google.com/apis/kml/schema/kml22beta.xsd\">\n";
+       
+static const char kml21_hdr[] =  
+       "<kml xmlns=\"http://earth.google.com/kml/2.1\"\n"
+       "\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n";
+//     No "baked in" schemaLocation, per Google recommendation.
+//     "\txsi:schemaLocation=\"http://earth.google.com/kml/2.1 \n"
+//     "\thttp://code.google.com/apis/kml/schema/kml21.xsd\">\n";
+
 static
 arglist_t kml_args[] = {
        {"deficon", &opt_deficon, "Default icon name", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
@@ -83,7 +111,7 @@ arglist_t kml_args[] = {
          "6", ARGTYPE_INT, ARG_NOMINMAX },
        {"line_color", &opt_line_color, 
          "Line color, specified in hex AABBGGRR",
-         "64eeee17", ARGTYPE_STRING, ARG_NOMINMAX },
+         "99ffac59", ARGTYPE_STRING, ARG_NOMINMAX },
        {"floating", &opt_floating, 
         "Altitudes are absolute and not clamped to ground", 
         "0", ARGTYPE_BOOL, ARG_NOMINMAX },
@@ -93,6 +121,9 @@ arglist_t kml_args[] = {
        {"trackdata", &opt_trackdata, 
         "Include extended data for trackpoints (default = 1)", 
         "1", ARGTYPE_BOOL, ARG_NOMINMAX },
+       {"trackdirection", &opt_trackdirection, 
+        "Indicate direction of travel in track icons (default = 0)", 
+        "0", ARGTYPE_BOOL, ARG_NOMINMAX },
        {"units", &opt_units, 
         "Units used when writing comments ('s'tatute or 'm'etric)", 
         "s", ARGTYPE_STRING, ARG_NOMINMAX },
@@ -110,11 +141,17 @@ struct {
        int freshness;
        char *icon;
 } kml_tracking_icons[] = {
- { 60, "http://maps.google.com/mapfiles/kml/pal4/icon15.png" }, // Red
- { 30, "http://maps.google.com/mapfiles/kml/pal4/icon31.png" }, // Yellow
- { 0, "http://maps.google.com/mapfiles/kml/pal4/icon62.png" }, // Green
+ { 60, ICON_BASE "youarehere-60.png" }, // Red
+ { 30, ICON_BASE "youarehere-30.png" }, // Yellow
+ { 0,  ICON_BASE "youarehere-0.png" }, // Green
 };
 
+#define ICON_NOSAT ICON_BASE "youarehere-warning.png";    
+#define ICON_WPT "http://maps.google.com/mapfiles/kml/pal4/icon61.png"
+#define ICON_TRK ICON_BASE "track-directional/track-none.png"
+#define ICON_RTE ICON_BASE "track-directional/track-none.png"    
+#define ICON_DIR ICON_BASE "track-directional/track-%d.png" // format string where next arg is rotational degrees.
+
 #define MYNAME "kml"
 
 #if ! HAVE_LIBEXPAT
@@ -130,8 +167,8 @@ kml_read(void)
 }
 #else
 
-static xg_callback     wpt_s, wpt_e;
-static xg_callback     wpt_name, wpt_desc, wpt_coord, wpt_icon, trk_coord;
+static xg_callback wpt_s, wpt_e;
+static xg_callback wpt_name, wpt_desc, wpt_coord, wpt_icon, trk_coord, wpt_time;
 
 static 
 xg_tag_mapping kml_map[] = {
@@ -139,9 +176,12 @@ xg_tag_mapping kml_map[] = {
        { wpt_e,        cb_end,         "/Placemark" },
        { wpt_name,     cb_cdata,       "/Placemark/name" },
        { wpt_desc,     cb_cdata,       "/Placemark/description" },
+       { wpt_time,     cb_cdata,       "/Placemark/TimeStamp/when" },
        { wpt_coord,    cb_cdata,       "/Placemark/Point/coordinates" },
        { wpt_icon,     cb_cdata,       "/Placemark/Style/Icon/href" },
        { trk_coord,    cb_cdata,       "/Placemark/MultiGeometry/LineString/coordinates" },
+       { trk_coord,    cb_cdata,       "/Placemark/GeometryCollection/LineString/coordinates" },
+       { trk_coord,    cb_cdata,       "/Placemark/Polygon/outerBoundaryIs/LinearRing/coordinates" },
        { trk_coord,    cb_cdata,       "/Placemark/LineString/coordinates" },
        { NULL,         0,              NULL }
 };
@@ -187,6 +227,11 @@ void wpt_desc(const char *args, const char **unused)
        }
 }
 
+void wpt_time(const char *args, const char **unused)
+{
+       wpt_tmp->creation_time = xml_parse_time(args, &wpt_tmp->microseconds);
+}
+
 void wpt_coord(const char *args, const char **attrv)
 {
        sscanf(args, "%lf,%lf,%lf", &wpt_tmp->longitude, &wpt_tmp->latitude, &wpt_tmp->altitude);
@@ -208,9 +253,12 @@ void trk_coord(const char *args, const char **attrv)
        waypoint *trkpt;
 
        route_head *trk_head = route_head_alloc();
+       if (wpt_tmp->shortname) {
+               trk_head->rte_name  = xstrdup(wpt_tmp->shortname);
+       }
        track_add_head(trk_head);
        
-       while (3 == sscanf(args,"%lf,%lf,%lf %n", &lon, &lat, &alt, &consumed)){
+       while (3 == sscanf(args, "%lf,%lf,%lf %n", &lon, &lat, &alt, &consumed)){
                trkpt = waypt_new();    
                trkpt->latitude = lat;
                trkpt->longitude = lon;
@@ -261,7 +309,7 @@ kml_wr_init(const char *fname)
        /*
         * Reduce race conditions with network read link.
         */     
-       ofd = xfopen(fname, "w", MYNAME);
+       ofd = gbfopen(fname, "w", MYNAME);
 }
 
 /* 
@@ -287,7 +335,7 @@ kml_wr_position_init(const char *fname)
 static void
 kml_wr_deinit(void)
 {
-       fclose(ofd);
+       gbfclose(ofd);
 
        if (posnfilenametmp) {
 #if __WIN32__
@@ -326,11 +374,11 @@ kml_write_xml(int indent, const char *fmt, ...)
 
        if (fmt[1] != '!' && do_indentation) {
                for (i = 0; i < indent_level; i++) {
-                       fputs("  ", ofd);
+                       gbfputs("  ", ofd);
                }
        }
 
-       vfprintf(ofd, fmt, args);
+       gbvfprintf(ofd, fmt, args);
 
        if (indent > 0) indent_level++;
 
@@ -348,24 +396,28 @@ kml_write_xmle(const char *tag, const char *v)
        if (v && *v) {
                char *tmp_ent = xml_entitize(v);
                for (i = 0; i < indent_level; i++) {
-                       fputs("  ", ofd);
+                       gbfputs("  ", ofd);
                }
-               fprintf(ofd, "<%s>%s</%s>\n",tag, tmp_ent, tag);
+               gbfprintf(ofd, "<%s>%s</%s>\n",tag, tmp_ent, tag);
                xfree(tmp_ent);
        }
 }
 
 #define hovertag(h) h ? 'h' : 'n'
 static void kml_write_bitmap_style_(const char *style, const char * bitmap, 
-                                      int highlighted)
+                                   int highlighted, int force_heading)
 {
-       kml_write_xml(0,"<!-- %s %s style -->\n", 
+       kml_write_xml(0, "<!-- %s %s style -->\n", 
                highlighted ? "Highlighted" : "Normal", style);
        kml_write_xml(1, "<Style id=\"%s_%c\">\n", style, hovertag(highlighted));
        kml_write_xml(1, "<IconStyle>\n");
        if (highlighted) {
                kml_write_xml(0, "<scale>1.2</scale>\n");
        }
+       /* Our icons are pre-rotated, so nail them to the maps. */
+       if (force_heading) {
+               kml_write_xml(0, "<heading>0</heading>\n");
+       }
        kml_write_xml(1, "<Icon>\n");
        kml_write_xml(0, "<href>%s</href>\n", bitmap);
        kml_write_xml(-1, "</Icon>\n");
@@ -377,10 +429,21 @@ static void kml_write_bitmap_style_(const char *style, const char * bitmap,
  * and non-highlighted version of the style to allow the icons
  * to magnify slightly on a rollover.
  */
-static void kml_write_bitmap_style(const char *style, const char *bitmap)
+static void kml_write_bitmap_style(kml_point_type pt_type, const char *bitmap,
+                                 const char *customstyle)
 {
-       kml_write_bitmap_style_(style, bitmap, 0);
-       kml_write_bitmap_style_(style, bitmap, 1);
+       int force_heading = 0;
+       const char *style;
+       switch (pt_type) {
+               case kmlpt_track: style = "track"; break;
+               case kmlpt_route: style = "route"; break;
+               case kmlpt_waypoint: style = "waypoint"; break;
+               case kmlpt_other: style = customstyle; force_heading = 1; break;
+               default: fatal("kml_output_point: unknown point type"); break;
+       }
+
+       kml_write_bitmap_style_(style, bitmap, 0, force_heading);
+       kml_write_bitmap_style_(style, bitmap, 1, force_heading);
 
        kml_write_xml(1, "<StyleMap id=\"%s\">\n", style);
        kml_write_xml(1, "<Pair>\n");
@@ -437,10 +500,10 @@ void kml_output_trkdescription(const route_head *header, computed_trkdata *td)
        }
        TD2("<b>Distance</b> %.1f %s", distance, distance_units);
        if (min_alt != unknown_alt) {
-               TD2("<b>Min Alt</b> %.1f %s", min_alt, min_alt_units);
+               TD2("<b>Min Alt</b> %.3f %s", min_alt, min_alt_units);
        }
        if (max_alt != unknown_alt) {
-               TD2("<b>Max Alt</b> %.1f %s", max_alt, max_alt_units);
+               TD2("<b>Max Alt</b> %.3f %s", max_alt, max_alt_units);
        }
        if (td->min_spd) {
                char *spd_units;
@@ -452,6 +515,14 @@ void kml_output_trkdescription(const route_head *header, computed_trkdata *td)
                double spd = fmt_speed(td->max_spd, &spd_units);
                TD2("<b>Max Speed</b> %.1f %s", spd, spd_units);
        }
+       if (td->max_spd && td->start && td->end) {
+               char *spd_units;
+               time_t elapsed = td->end - td->start;
+               double spd = fmt_speed(td->distance_meters / elapsed, &spd_units);
+               if (spd > 1.0)  {
+                       TD2("<b>Avg Speed</b> %.1f %s", spd, spd_units);
+               }
+       }
        if (td->avg_hrt) {
                TD("<b>Avg Heart Rate</b> %.1f bpm", td->avg_hrt);
        }
@@ -471,9 +542,9 @@ void kml_output_trkdescription(const route_head *header, computed_trkdata *td)
                char time_string[64];
 
                xml_fill_in_time(time_string, td->start, 0, XML_LONG_TIME);
-               TD("<b>Start Time:</b> %s ", time_string);
+               TD("<b>Start Time</b> %s ", time_string);
                xml_fill_in_time(time_string, td->end, 0, XML_LONG_TIME);
-               TD("<b>End Time:</b> %s ", time_string);
+               TD("<b>End Time</b> %s ", time_string);
        }
 
        kml_write_xml(-1, "</table>]]>\n");
@@ -537,12 +608,12 @@ static void kml_output_description(const waypoint *pt)
 
        alt = fmt_distance(pt->altitude, &alt_units);
 
-       kml_write_xml(1,"<description><![CDATA[\n");
-       kml_write_xml(1,"<table>\n");
+       kml_write_xml(1, "<description><![CDATA[\n");
+       kml_write_xml(1, "<table>\n");
 
        TD("Longitude: %f", pt->longitude);
        TD("Latitude: %f", pt->latitude);
-       if (pt->altitude != unknown_alt) TD2("Altitude: %.1f %s", alt, alt_units);
+       if (pt->altitude != unknown_alt) TD2("Altitude: %.3f %s", alt, alt_units);
        if (pt->heartrate) TD("Heart rate: %d", pt->heartrate);
        if (pt->cadence) TD("Cadence: %d", pt->cadence);
        if WAYPT_HAS(pt, temperature) TD("Temperature: %.1f", pt->temperature);
@@ -569,12 +640,25 @@ static void kml_output_description(const waypoint *pt)
        kml_write_xml(-1, "]]></description>\n");
 }
 
-static void kml_output_point(const waypoint *waypointp, const char *style)
+static void kml_output_point(const waypoint *waypointp, kml_point_type pt_type)
 {
+  char *style;
   // Save off this point for later use
   point3d *pt = &point3d_list[point3d_list_len];
   point3d_list_len++;
 
+  switch (pt_type) {
+    case kmlpt_track: style = "#track"; break;
+    case kmlpt_route: style = "#route"; break;
+    default: fatal("kml_output_point: unknown point type"); break;
+  }
+
+  switch (pt_type) {
+    case kmlpt_track: style = "#track"; break;
+    case kmlpt_route: style = "#route"; break;
+    default: fatal("kml_output_point: unknown point type"); break;
+  }
+
   pt->longitude = waypointp->longitude;
   pt->latitude = waypointp->latitude;
   pt->altitude = waypointp->altitude == unknown_alt ? 0.0 : waypointp->altitude;
@@ -588,13 +672,25 @@ static void kml_output_point(const waypoint *waypointp, const char *style)
        kml_output_description(waypointp);
        kml_output_lookat(waypointp);
        kml_output_timestamp(waypointp);
-       kml_write_xml(0, "<styleUrl>%s</styleUrl>\n", style);
+
+       if (trackdirection && (pt_type == kmlpt_track)) {
+               char buf[100];
+               if (waypointp->speed < 1) 
+                       snprintf(buf, sizeof(buf), "%s-none", style);
+               else
+                       snprintf(buf, sizeof(buf), "%s-%d", style, 
+                               (int) (waypointp->course / 22.5 + .5) % 16);
+               kml_write_xml(0, "<styleUrl>%s</styleUrl>\n", buf);
+       } else {
+               kml_write_xml(0, "<styleUrl>%s</styleUrl>\n", style);
+       }
+
        kml_write_xml(1, "<Point>\n");
         if (floating) {
-          kml_write_xml(0, "<altitudeMode>absolute</altitudeMode>\n");
+               kml_write_xml(0, "<altitudeMode>absolute</altitudeMode>\n");
         }
        if (extrude) {
-         kml_write_xml(0, "<extrude>1</extrude>\n");
+               kml_write_xml(0, "<extrude>1</extrude>\n");
        }
        kml_write_xml(0, "<coordinates>%f,%f,%f</coordinates>\n",
                pt->longitude, pt->latitude, pt->altitude);
@@ -611,14 +707,13 @@ static void kml_output_tailer(const route_head *header)
   int i;
 
   if (export_points && point3d_list_len > 0) {
-    kml_write_xml(-1,"</Folder>\n");
+    kml_write_xml(-1, "</Folder>\n");
   }
   
   // Add a linestring for this track?
   if (export_lines && point3d_list_len > 0) {
     kml_write_xml(1, "<Placemark>\n");
     kml_write_xml(0, "<name>Path</name>\n");
-//    fprintf(ofd, "\t  <MultiGeometry>\n");
     kml_write_xml(0, "<styleUrl>#lineStyle</styleUrl>\n");
     kml_write_xml(1, "<LineString>\n");
     if (floating) {
@@ -635,9 +730,8 @@ static void kml_output_tailer(const route_head *header)
               point3d_list[i].latitude,
               point3d_list[i].altitude);
     
-    kml_write_xml(-1,"</coordinates>\n");
+    kml_write_xml(-1, "</coordinates>\n");
     kml_write_xml(-1, "</LineString>\n");
-//    fprintf(ofd, "\t  </MultiGeometry>\n");
     kml_write_xml(-1, "</Placemark>\n");
   }
   
@@ -649,6 +743,29 @@ static void kml_output_tailer(const route_head *header)
   }
 }
 
+/*
+ * Completely different writer for geocaches.
+ */    
+static 
+void kml_gc_make_ballonstyle(void) 
+{
+       // BalloonStyle for Geocaches.
+       kml_write_xml(1, "<Style id=\"geocache\"><BalloonStyle><text><![CDATA[\n");
+       kml_write_xml(0, "<a href=\"http://www.geocaching.com\"><img src=\"http://www.geocaching.com/images/nav/logo_sub.gif\"> </a>\n");
+
+       kml_write_xml(0, "<p><a href=\"http://www.geocaching.com/seek/cache_details.aspx?wp=$[gc_num]\"><b>$[gc_num]</b></a> <b>$[gc_name]</b> \n");
+       kml_write_xml(0, "a $[gc_type], by <b>$[gc_placer]</b> [<a href=\"http://www.geocaching.com/profile?id=$[gc_placer_id]\">profile</a>]<br/>\n");
+       kml_write_xml(0, "(ratings out of 5 stars. 1 is easiest, 5 is hardest)<br/>\n");
+       kml_write_xml(0, "Difficulty: <img src=\"http://www.geocaching.com/images/stars/$[gc_diff_stars].gif\" alt=\"$[gc_diff]\" width=\"61\" height=\"13\">\n");
+       kml_write_xml(0, "&nbsp;Terrain: <img src=\"http://www.geocaching.com/images/stars/$[gc_terr_stars].gif\" alt=\"$[gc_terr]\" width=\"61\" height=\"13\"><br />\n");
+       kml_write_xml(0, "Size: <img src=\"http://www.geocaching.com/images/icons/container/$[gc_cont_icon].gif\" width=\"45\" height=\"12\">&nbsp;($[gc_cont_icon])<br />\n");
+
+       kml_write_xml(0, "$[gc_issues]\n");
+       kml_write_xml(0, "$[gc_short_desc]\n");
+       kml_write_xml(0, "$[gc_long_desc]\n");
+       kml_write_xml(-1, "]]></text></BalloonStyle></Style>\n");
+}
+
 static 
 char *
 kml_lookup_gc_icon(const waypoint *waypointp)
@@ -679,6 +796,116 @@ kml_lookup_gc_icon(const waypoint *waypointp)
        return rb;
 }
 
+static 
+char *
+kml_lookup_gc_container(const waypoint *waypointp)
+{
+       char *cont;
+
+       switch (waypointp->gc_data.container) {
+               case gc_micro: cont="micro"; break;
+               case gc_regular: cont="regular"; break;
+               case gc_large: cont="large"; break;
+               case gc_small: cont="small"; break;
+               case gc_virtual: cont="virtual"; break;
+               case gc_other: cont="other"; break;
+               default: cont="not_chosen"; break;
+       }
+
+       return cont;
+}
+
+// Not thread safe.  Return strings are small and it's silly to xasprintf/free
+// them so we use a static buffer.
+
+char * kml_gc_mkstar(int rating)
+{
+       static char tmp[40];
+       if (0 == rating % 10) {
+               snprintf(tmp, sizeof(tmp), "stars%d", rating / 10);
+       } else {
+               snprintf(tmp, sizeof(tmp), "stars%d_%d", rating / 10, rating % 10);
+       }
+
+       return tmp;
+}
+
+static void kml_geocache_pr(const waypoint *waypointp)
+{
+       char *p, *is;
+       double lat = waypointp->latitude;
+       double lng = waypointp->longitude;
+// optionally "fuzz" lat/lng here.
+
+       kml_write_xml(1, "<Placemark>\n");
+
+       kml_write_xml(1, "<name>\n");
+       kml_write_xml(0, "<![CDATA[%s]]>\n", waypointp->url_link_text);
+       kml_write_xml(-1, "</name>\n");
+
+       // Timestamp
+       kml_output_timestamp(waypointp);
+
+       kml_write_xml(0, "<styleUrl>#geocache</styleUrl>\n");
+       is = kml_lookup_gc_icon(waypointp);
+       kml_write_xml(1, "<Style>\n");
+       kml_write_xml(1, "<IconStyle>\n");
+       kml_write_xml(1, "<Icon>\n");
+       kml_write_xml(0, "<href>%s</href>\n", is);
+       kml_write_xml(-1, "</Icon>\n");
+       kml_write_xml(-1, "</IconStyle>\n");
+       kml_write_xml(-1, "</Style>\n");
+
+       kml_write_xml(1, "<ExtendedData>\n");
+       kml_write_xml(0, "<Data name=\"gc_num\"><value>%s</value></Data>\n", waypointp->shortname);
+
+       if(waypointp->url_link_text) {
+               p = xml_entitize(waypointp->url_link_text);
+               kml_write_xml(0, "<Data name=\"gc_name\"><value>%s</value></Data>\n", p);
+               xfree(p);
+       }
+
+       if (waypointp->gc_data.placer) {
+               p = xml_entitize(waypointp->gc_data.placer);
+               kml_write_xml(0, "<Data name=\"gc_placer\"><value>%s</value></Data>\n", p);
+               xfree(p);
+       }
+
+       kml_write_xml(0, "<Data name=\"gc_placer_id\"><value>%d</value></Data>\n", waypointp->gc_data.placer_id);
+
+       kml_write_xml(0, "<Data name=\"gc_diff_stars\"><value>%s</value></Data>\n", kml_gc_mkstar(waypointp->gc_data.diff));
+       kml_write_xml(0, "<Data name=\"gc_terr_stars\"><value>%s</value></Data>\n", kml_gc_mkstar(waypointp->gc_data.terr));
+
+       kml_write_xml(0, "<Data name=\"gc_cont_icon\"><value>%s</value></Data>\n", kml_lookup_gc_container(waypointp));
+
+        // Highlight any issues with the cache, such as temp unavail 
+        // or archived.
+       kml_write_xml(0, "<Data name=\"gc_issues\"><value>");
+       if (waypointp->gc_data.is_archived == status_true) {
+               kml_write_xml(0, "&lt;font color=\"red\"&gt;This cache has been archived.&lt;/font&gt;<br/>\n");
+       } else if (waypointp->gc_data.is_available == status_false) {
+               kml_write_xml(0, "&lt;font color=\"red\"&gt;This cache is temporarily unavailable.&lt;/font&gt;<br/>\n");
+       }
+       kml_write_xml(0, "</value></Data>\n");
+
+       kml_write_xml(0, "<Data name=\"gc_type\"><value>%s</value></Data>\n", gs_get_cachetype(waypointp->gc_data.type));
+       kml_write_xml(0, "<Data name=\"gc_short_desc\"><value><![CDATA[%s]]></value></Data>\n", waypointp->gc_data.desc_short.utfstring ? waypointp->gc_data.desc_short.utfstring : "");
+       kml_write_xml(0, "<Data name=\"gc_long_desc\"><value><![CDATA[%s]]></value></Data>\n", waypointp->gc_data.desc_long.utfstring ? waypointp->gc_data.desc_long.utfstring : "");
+       
+       kml_write_xml(-1, "</ExtendedData>\n");
+
+       // Location
+       kml_write_xml(1, "<Point>\n");
+       kml_write_xml(0, "<coordinates>%f,%f,%f</coordinates>\n",
+               lng, lat,
+               waypointp->altitude == unknown_alt ? 0.0 : waypointp->altitude);
+
+       kml_write_xml(-1, "</Point>\n");
+       kml_write_xml(-1, "</Placemark>\n");
+
+       xfree(is);
+}
+
 /*
  * WAYPOINTS
  */
@@ -687,6 +914,21 @@ static void kml_waypt_pr(const waypoint *waypointp)
 {
        const char *icon;
 
+#if 0 // Experimental
+       if(realtime_positioning) {
+               kml_write_xml(1, "<LookAt>\n");
+               kml_write_xml(0, "<longitude>%f</longitude>\n", waypointp->longitude);
+               kml_write_xml(0, "<latitude>%f</latitude>\n", waypointp->latitude);
+               kml_write_xml(0, "<altitude>1000</altitude>\n");
+               kml_write_xml(-1, "</LookAt>\n");
+       }
+#endif
+
+       if (waypointp->gc_data.diff && waypointp->gc_data.terr) {
+               kml_geocache_pr(waypointp);
+               return;
+       }
+
        kml_write_xml(1, "<Placemark>\n");
 
        kml_write_xmle("name", waypointp->shortname);
@@ -694,40 +936,16 @@ static void kml_waypt_pr(const waypoint *waypointp)
        // Description
        if (waypointp->url && waypointp->url[0]) {
                char * odesc = xml_entitize(waypointp->url);
-               kml_write_xml(0,"<Snippet/>\n");
-               kml_write_xml(0,"<description>\n");
+               kml_write_xml(0, "<Snippet/>\n");
+               kml_write_xml(0, "<description>\n");
                if (waypointp->url_link_text && waypointp->url_link_text[0])  {
                        char *olink = xml_entitize(waypointp->url_link_text);
-                       kml_write_xml(0,"<![CDATA[<a href=\"%s\">%s</a>]]>", odesc, olink);
+                       kml_write_xml(0, "<![CDATA[<a href=\"%s\">%s</a>]]>", odesc, olink);
                        xfree(olink);
+               } else {
+                       gbfputs(odesc, ofd);
                }
-               else
-                       fputs(odesc, ofd);
-
-               /* It's tempting to conditionalize this on smart_names, but
-                * KML is so robust that it makes sense to just always do
-                * this for geocaches.  (Plus the convenience of being able
-                * to do a drag-n-drop into Earth without extra option is a 
-                * win.)
-                */
-               if (waypointp->gc_data.diff && waypointp->gc_data.terr) {
-                       if (waypointp->gc_data.placer) {
-                               char *p = xml_entitize(waypointp->gc_data.placer);
-                               fprintf(ofd, "<![CDATA[<i> by %s</i>]]>", p);
-                               xfree(p);
-                       }
-                       fprintf(ofd, " %s (%3.1f/%3.1f)", 
-                               gs_get_container(waypointp->gc_data.container),
-                               waypointp->gc_data.diff / 10.0,  
-                               waypointp->gc_data.terr / 10.0);
-                       if (waypointp->gc_data.desc_short.utfstring) {
-                               // Dont entitize it - either XML or HTML.
-                               // Wrap it in a cdata and let Earth work it out.
-
-                               fprintf(ofd, "<![CDATA[<p>%s</p>]]>\n", waypointp->gc_data.desc_short.utfstring);
 
-                       }
-               }
                kml_write_xml(0, "</description>\n");
                xfree(odesc);
        }
@@ -745,17 +963,6 @@ static void kml_waypt_pr(const waypoint *waypointp)
                kml_write_xml(-1, "</Icon>\n");
                kml_write_xml(-1, "</IconStyle>\n");
                kml_write_xml(-1, "</Style>\n");
-
-       } else if (waypointp->gc_data.diff && waypointp->gc_data.terr) {
-               char *is = kml_lookup_gc_icon(waypointp);
-               kml_write_xml(1, "<Style>\n");
-               kml_write_xml(1, "<IconStyle>\n");
-               kml_write_xml(1, "<Icon>\n");
-               kml_write_xml(0, "<href>%s</href>\n", is);
-               kml_write_xml(-1, "</Icon>\n");
-               kml_write_xml(-1, "</IconStyle>\n");
-               kml_write_xml(-1, "</Style>\n");
-               xfree(is);
        } else {
                kml_write_xml(0, "<styleUrl>#waypoint</styleUrl>\n");
        }
@@ -764,11 +971,11 @@ static void kml_waypt_pr(const waypoint *waypointp)
        kml_write_xml(1, "<Point>\n");
 
        if (extrude) {
-         kml_write_xml(0, "<extrude>1</extrude>\n");
+               kml_write_xml(0, "<extrude>1</extrude>\n");
        }
 
         if (floating) {
-          kml_write_xml(0, "<altitudeMode>absolute</altitudeMode>\n");
+               kml_write_xml(0, "<altitudeMode>absolute</altitudeMode>\n");
         }
 
        kml_write_xml(0, "<coordinates>%f,%f,%f</coordinates>\n",
@@ -776,8 +983,6 @@ static void kml_waypt_pr(const waypoint *waypointp)
                waypointp->altitude == unknown_alt ? 0.0 : waypointp->altitude);
        kml_write_xml(-1, "</Point>\n");
 
-
-
        kml_write_xml(-1, "</Placemark>\n");
 }
 
@@ -795,7 +1000,7 @@ static void kml_track_hdr(const route_head *header)
 
 static void kml_track_disp(const waypoint *waypointp)
 {
-       kml_output_point(waypointp, "#track");
+       kml_output_point(waypointp, kmlpt_track);
 }
 
 static void kml_track_tlr(const route_head *header) 
@@ -814,7 +1019,7 @@ static void kml_route_hdr(const route_head *header)
 
 static void kml_route_disp(const waypoint *waypointp)
 {
-        kml_output_point(waypointp, "#route");
+        kml_output_point(waypointp, kmlpt_route);
 }
 
 static void kml_route_tlr(const route_head *header) 
@@ -833,14 +1038,24 @@ void kml_write(void)
        floating = (!! strcmp("0", opt_floating));
        extrude = (!! strcmp("0", opt_extrude));
        trackdata = (!! strcmp("0", opt_trackdata));
+       trackdirection = (!! strcmp("0", opt_trackdirection));
 
-       kml_write_xml(0,"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
-       kml_write_xml(1,"<kml xmlns=\"http://earth.google.com/kml/2.1\"\n"
-               "\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-               "\txsi:schemaLocation=\"http://earth.google.com/kml/2.1 \n"
-               "\thttp://code.google.com/apis/kml/schema/kml21.xsd\">\n"
-       );
-       kml_write_xml(1,"<Document>\n");
+       kml_write_xml(0, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+
+       /*
+        * This is a bit cowardly.   Our geocache writer takes advantage
+        * of KML 2.2 features present only in Earth 4.2 and newer.  The
+        * output is actually compatible with Earth versions back to 4.0
+        * for the non-geocaching case, so we'll be conservative and not 
+        * output the new namespace if we don't need it. 
+        */
+       if (geocaches_present) {
+               kml_write_xml(1, kml22_hdr);
+       } else  {
+               kml_write_xml(1, kml21_hdr);
+       }
+
+       kml_write_xml(1, "<Document>\n");
 
        now = current_time();
        strftime(import_time, sizeof(import_time), "%c", localtime(&now));
@@ -854,17 +1069,42 @@ void kml_write(void)
        }
 
        // Style settings for bitmaps
-       kml_write_bitmap_style("route", "http://maps.google.com/mapfiles/kml/pal4/icon61.png");
-       kml_write_bitmap_style("track", "http://maps.google.com/mapfiles/kml/pal4/icon60.png");
-       kml_write_bitmap_style("waypoint", "http://maps.google.com/mapfiles/kml/pal4/icon61.png");
+       if (route_waypt_count()) {
+               kml_write_bitmap_style(kmlpt_route, ICON_RTE, NULL);
+       }
+
+       if (track_waypt_count()) {
+               if (trackdirection) {
+                 int i;
+                 kml_write_bitmap_style(kmlpt_other, ICON_TRK, "track-none");
+                 for (i = 0; i < 16; i++) {
+                   char buf1[100];
+                   char buf2[100];
+
+                   sprintf(buf1, "track-%d", i);
+                   sprintf(buf2, ICON_DIR, i);
+                   kml_write_bitmap_style(kmlpt_other, buf2, buf1);
+                 }
+               } else {
+                 kml_write_bitmap_style(kmlpt_track, ICON_TRK, NULL);
+               }
+       }
+
+       kml_write_bitmap_style(kmlpt_waypoint, ICON_WPT, NULL);
         
-        // Style settings for line strings
-        kml_write_xml(1, "<Style id=\"lineStyle\">\n");
-        kml_write_xml(1, "<LineStyle>\n");
-        kml_write_xml(0, "<color>%s</color>\n", opt_line_color);
-        kml_write_xml(0, "<width>%s</width>\n", opt_line_width);
-        kml_write_xml(-1, "</LineStyle>\n");
-        kml_write_xml(-1, "</Style>\n");
+       if (track_waypt_count() || route_waypt_count()) {
+               // Style settings for line strings
+               kml_write_xml(1, "<Style id=\"lineStyle\">\n");
+               kml_write_xml(1, "<LineStyle>\n");
+               kml_write_xml(0, "<color>%s</color>\n", opt_line_color);
+               kml_write_xml(0, "<width>%s</width>\n", opt_line_width);
+               kml_write_xml(-1, "</LineStyle>\n");
+               kml_write_xml(-1, "</Style>\n");
+       }
+
+       if (geocaches_present) {
+               kml_gc_make_ballonstyle();
+       }
 
        if (!realtime_positioning) {
                kml_write_xml(1, "<Folder>\n");
@@ -878,22 +1118,30 @@ void kml_write(void)
        }
 
        // Output trackpoints
-       if (!realtime_positioning && track_waypt_count()) {
-               kml_write_xml(1,  "<Folder>\n");
-               kml_write_xml(0,  "<name>Tracks</name>\n");
-       }
-       track_disp_all(kml_track_hdr, kml_track_tlr, kml_track_disp);
-       if (!realtime_positioning && track_waypt_count()) {
-               kml_write_xml(-1,  "</Folder>\n");
+       if (track_waypt_count()) {
+               if (!realtime_positioning) {
+                       kml_write_xml(1,  "<Folder>\n");
+                       kml_write_xml(0,  "<name>Tracks</name>\n");
+               }
+
+               track_disp_all(kml_track_hdr, kml_track_tlr, kml_track_disp);
+
+               if (!realtime_positioning) {
+                       kml_write_xml(-1,  "</Folder>\n");
+               }
        }
 
        // Output routes
-       if (!realtime_positioning && route_waypt_count()) {
-               kml_write_xml(1,  "<Folder>\n");
-               kml_write_xml(0,  "<name>Routes</name>\n");
-               route_disp_all(kml_route_hdr, kml_route_tlr, kml_route_disp);
-               kml_write_xml(-1,  "</Folder>\n");
-       }
+       if (route_waypt_count()) {
+               if (!realtime_positioning) {
+                       kml_write_xml(1,  "<Folder>\n");
+                       kml_write_xml(0,  "<name>Routes</name>\n");
+
+                       route_disp_all(kml_route_hdr, 
+                               kml_route_tlr, kml_route_disp);
+                       kml_write_xml(-1,  "</Folder>\n");
+               }
+        }
 
        kml_write_xml(-1, "</Document>\n");
        kml_write_xml(-1, "</kml>\n");
@@ -911,7 +1159,7 @@ kml_get_posn_icon(int freshness)
                if (freshness >= kml_tracking_icons[i].freshness)
                        return kml_tracking_icons[i].icon;
        }
-       return "http://maps.google.com/mapfiles/kml/pal3/icon59.png";
+       return ICON_NOSAT;
 }
 
 
@@ -955,7 +1203,25 @@ kml_wr_position(waypoint *wpt)
 
        wpt->icon_descr = kml_get_posn_icon(wpt->creation_time - last_valid_fix);
 
-       track_add_wpt(posn_trk_head, waypt_dupe(wpt));
+       
+       /* In order to avoid clutter while we're sitting still, don't add
+          track points if we've not moved a minimum distance from the
+          beginnning of our accumulated track. */
+       {
+       waypoint *newest_posn= (waypoint *) QUEUE_LAST(&posn_trk_head->waypoint_list);
+       
+       if(radtometers(gcdist(RAD(wpt->latitude), RAD(wpt->longitude), 
+               RAD(newest_posn->latitude), RAD(newest_posn->longitude))) > 50) {
+               track_add_wpt(posn_trk_head, waypt_dupe(wpt));
+       } else {
+               /* If we haven't move more than our threshold, pretend 
+                * we didn't move at  all to prevent Earth from jittering 
+                * the zoom levels on us.
+                */
+               wpt->latitude = newest_posn->latitude;
+               wpt->longitude = newest_posn->longitude;
+       }
+       }
 
        waypt_add(wpt);
        kml_write();
diff --git a/lmx.c b/lmx.c
new file mode 100644 (file)
index 0000000..5082a0c
--- /dev/null
+++ b/lmx.c
@@ -0,0 +1,246 @@
+/*
+    Access Nokia Landmark Exchange files.
+
+    Copyright (C) 2007  Robert Lipe, robertlipe@gpsbabel.org
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+ */
+
+
+/*
+ * Nokia's Landmark Exchange (LMX) format is a straight-forward XML
+ * format.  Though they do support a compact binary representation,
+ * we don't implement that at this time in GPSBabel.
+ */
+
+#include "defs.h"
+#include "xmlgeneric.h"
+
+static gbfile *ofd;
+static waypoint *wpt_tmp;
+char *link, *linkt;
+
+#define MYNAME "lmx"
+
+static
+arglist_t lmx_args[] = {
+       ARG_TERMINATOR
+};
+
+/*
+ * Writer
+ */
+
+
+static void
+lmx_wr_init(const char *fname)
+{
+        ofd = gbfopen(fname, "w", MYNAME);
+}
+
+static void
+lmx_wr_deinit(void)
+{
+        gbfclose(ofd);
+}
+
+static void
+lmx_write_xml(int indent_level, const char *tag, const char *data)
+{
+       int i;
+       char *tmp_ent = xml_entitize(data);
+
+       for (i = 0; i < indent_level; i++) {
+               gbfputs("  ", ofd);
+       }
+
+       gbfprintf(ofd, "<%s>%s</%s>\n", tag, tmp_ent, tag);
+
+       xfree(tmp_ent);
+}
+
+static void
+lmx_print(const waypoint *wpt)
+{      
+       gbfprintf(ofd, "    <lm:landmark>\n");
+       if (wpt->shortname) {
+               lmx_write_xml(4, "lm:name", wpt->shortname);
+       }
+       if (wpt->description) {
+               lmx_write_xml(4, "lm:description", wpt->description);
+       }
+       gbfprintf(ofd, "        <lm:coordinates>\n");
+       gbfprintf(ofd, "          <lm:latitude>%f</lm:latitude>\n", wpt->latitude);
+       gbfprintf(ofd, "          <lm:longitude>%f</lm:longitude>\n",wpt->longitude);
+       if (wpt->altitude && (wpt->altitude != unknown_alt)) {
+               gbfprintf(ofd, "          <lm:altitude>%f</lm:altitude>\n",wpt->altitude);
+       }
+       gbfprintf(ofd, "        </lm:coordinates>\n");
+
+       if (wpt->url && wpt->url[0]) {
+               gbfprintf(ofd, "        <lm:mediaLink>\n");
+               if (wpt->url_link_text)
+                       lmx_write_xml(5,"lm:name", wpt->url_link_text);
+               gbfprintf(ofd, "          <lm:url>%s</lm:url>\n", wpt->url);
+               gbfprintf(ofd, "        </lm:mediaLink>\n");
+       }
+
+       gbfprintf(ofd, "    </lm:landmark>\n");
+}
+
+
+static void
+lmx_write(void)
+{
+       gbfprintf(ofd, "<?xml version=\"1.0\" ?>\n");
+       gbfprintf(ofd, "<lm:lmx xmlns:lm=\"http://www.nokia.com/schemas/location/landmarks/1/0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.nokia.com/schemas/location/landmarks/1/0/lmx.xsd\">");
+
+       gbfprintf(ofd, "  <lm:landmarkCollection>\n");
+       waypt_disp_all(lmx_print);
+       gbfprintf(ofd, "  </lm:landmarkCollection>\n");
+       gbfprintf(ofd, "</lm:lmx>\n");
+}
+
+/*
+ * Reader
+ */
+
+static xg_callback     lmx_lm_start, lmx_lm_end;
+static xg_callback     lmx_lm_name,lmx_lm_desc;
+static xg_callback     lmx_lm_lat, lmx_lm_lon, lmx_lm_alt;
+static xg_callback     lmx_lm_mlink_s, lmx_lm_mlink_e;
+static xg_callback     lmx_lm_link, lmx_lm_linkt;
+
+static xg_tag_mapping gl_map[] = {
+#define LM "/lm:lmx/lm:landmarkCollection/lm:landmark"
+ { lmx_lm_start,       cb_start,       LM },
+ { lmx_lm_end,         cb_end,         LM },
+ { lmx_lm_name,                cb_cdata,       LM "/lm:name" },
+ { lmx_lm_desc,        cb_cdata,       LM "/lm:description" },
+ { lmx_lm_lat,         cb_cdata,       LM "/lm:coordinates/lm:latitude" },
+ { lmx_lm_lon,                 cb_cdata,       LM "/lm:coordinates/lm:longitude" },
+ { lmx_lm_alt,         cb_cdata,       LM "/lm:coordinates/lm:altitude" },
+ { lmx_lm_mlink_s,     cb_start,       LM "/lm:mediaLink" },
+ { lmx_lm_link,        cb_cdata,       LM "/lm:mediaLink/lm:url" },
+ { lmx_lm_linkt,       cb_cdata,       LM "/lm:mediaLink/lm:name" },
+ { lmx_lm_mlink_e,     cb_end,         LM "/lm:mediaLink" },
+ { NULL,       0,         NULL}
+};
+
+static void
+lmx_rd_init(const char *fname)
+{
+       xml_init(fname, gl_map, NULL);
+}
+
+static void
+lmx_read(void)
+{
+       xml_read();
+}
+
+static void
+lmx_rd_deinit(void)
+{
+       xml_deinit();
+}
+
+
+
+static void
+lmx_lm_start(const char *args, const char **unused)
+{
+       wpt_tmp = waypt_new();
+}
+
+static void
+lmx_lm_end(const char *args, const char **unused)
+{
+       waypt_add(wpt_tmp);
+}
+
+static void
+lmx_lm_lat(const char *args, const char **unused)
+{
+       wpt_tmp->latitude = atof(args);
+}
+
+static void
+lmx_lm_lon(const char *args, const char **unused)
+{
+       wpt_tmp->longitude = atof(args);
+}
+
+static void
+lmx_lm_alt(const char *args, const char **unused)
+{
+       wpt_tmp->altitude = atof(args);
+}
+
+static void
+lmx_lm_name(const char *args, const char **unused)
+{
+       wpt_tmp->shortname = xstrdup(args);
+}
+
+static void    
+lmx_lm_desc(const char *args, const char **unused)
+{
+       wpt_tmp->description = xstrdup(args);
+}
+
+static void
+lmx_lm_mlink_s(const char *args, const char **unused)
+{
+       link = linkt = NULL;
+}
+
+static void
+lmx_lm_link(const char *args, const char **unused)
+{
+       link = xstrdup(args);
+}
+
+static void
+lmx_lm_linkt(const char *args, const char **unused)
+{
+       linkt = xstrdup(args);
+}
+
+static void
+lmx_lm_mlink_e(const char *args, const char **unused)
+{
+       waypt_add_url(wpt_tmp, link, linkt);
+}
+
+
+ff_vecs_t lmx_vecs = {
+        ff_type_file,
+       { 
+         ff_cap_read | ff_cap_write,   /* waypoints */
+         ff_cap_none,                  /* tracks */
+         ff_cap_none                   /* routes */
+       },
+        lmx_rd_init,
+        lmx_wr_init,
+        lmx_rd_deinit,
+        lmx_wr_deinit,
+        lmx_read,
+        lmx_write,
+        NULL,
+        lmx_args,
+       CET_CHARSET_ASCII, 0    /* CET-REVIEW */
+};
index 0664cdd56de22046a56bc61526194eb2152ecca8..93edd8ce583ed7479105f298bfd7ec9e367f4562 100644 (file)
@@ -2,7 +2,7 @@
        Access to Lowrance USR files.
        Contributed to gpsbabel by Jason Rust (jrust at rustyparts.com)
 
-       Copyright (C) 2005, 2006 Robert Lipe, robertlipe@usa.net
+       Copyright (C) 2005, 2006, 2007, 2008 Robert Lipe, robertlipe@usa.net
 
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        6/21/05 - Ling Nero (rnlnero@yahoo.com)
        - Added Routes, Icons, & Tracks support
        - Fixed waypoint date/time stamp conversion
+       02/09/08 - oliskoli
+       - gbfile API
+       - check for buffer overflows when reading names or comments
+       02/25/2008 - Alan Porter (alan@kr4jb.net)
+       - Added new icons for Lowrance iFinder Expedition C
+       - Categorized geocaching waypoints using different icons
 */
 
 
@@ -31,8 +37,8 @@
 #include <math.h> /* for lat/lon conversion */
 
 typedef struct lowranceusr_icon_mapping {
-       const long int  value;
-       const char              *icon;
+       const int       value;
+       const char      *icon;
 } lowranceusr_icon_mapping_t;
 
 #define DEF_ICON 10001
@@ -82,15 +88,6 @@ const lowranceusr_icon_mapping_t lowranceusr_icon_value_table[] = {
        { 10040, "swimmer" },
        { 10041, "pier"},
 
-       { 10038, "Micro-Cache" },       /* icon for "flag buoy" */
-       { 10030, "Virtual cache" },     /* icon for "skull and crossbones" */
-       { 10032, "Multi-Cache" },       /* icon for "two fish" */
-       { 10003, "Unknown Cache" },     /* icon for "x 1" */
-       { 10018, "Locationless (Reverse) Cache" }, /* Icon for "american flag" */
-       { 10007, "Post Office" },       /* Icon for "house" */
-       { 10019, "Event Cache" },       /* Icon for "person" */
-       { 10020, "Webcam Cache" },      /* Icon for "restrooms" */
-
 /* The following list is from TopoFusion */
 
        { 10000, "Waypoint" },          /* diamond 1 */
@@ -102,8 +99,8 @@ const lowranceusr_icon_mapping_t lowranceusr_icon_value_table[] = {
        { DEF_ICON, "Short Tower" },
        { 10021, "Forest" },            /* tree */
        { DEF_ICON, "Mine" },
-       { 10038, "Geocache" },          /* flag buoy */
-       { 10016, "Geocache Found" },    /* exclamation */
+//     { 10038, "Geocache" },          /* flag buoy */
+//     { 10016, "Geocache Found" },    /* exclamation */
        { DEF_ICON, "Skiing Area" },
        { 10029, "Crossing" },          /* bridge */
        { 10007, "House" },                     /* house */
@@ -132,34 +129,71 @@ const lowranceusr_icon_mapping_t lowranceusr_icon_value_table[] = {
        { DEF_ICON, "Tunnel" },
 
        /* This list comes from 'wifinder' from ifinder H20 Color */
-       
-        { 10062, "Interesting Land Feature" },
-        { 10063, "Global Location" },
-        { 10064, "Note" },
-        { 10065, "Ghost" },
-        { 10066, "Letter" },
-        { 10067, "Multi-Treasure" },
-        { 10068, "Mystery Or Puzzle" },
-        { 10069, "Treasure" },
-        { 10070, "Webmail" },
-        { 10071, "Sun" },
-        { 10072, "Musical Note" },
-        { 10073, "Camera/Movie Theater" },
-        { 10074, "Star" },
-        { 10075, "Coffee Mug" },
-        { 10076, "Books" },
-        { 10077, "Historical Marker" },
-        { 10078, "Tools/Repair" },
-        { 10079, "Favorite" },
-        { 10080, "Arena" },
-        { 10081, "Golf Course" },
-        { 10082, "Money/Atm" },
+
+       { 10062, "Interesting Land Feature" },
+       { 10063, "Global Location" },
+       { 10064, "Note" },
+       { 10065, "Ghost" },
+       { 10066, "Letter" },
+       { 10067, "Multi-Treasure" },
+       { 10068, "Mystery Or Puzzle" },
+       { 10069, "Treasure" },
+       { 10070, "Webmail" },
+       { 10071, "Sun" },
+       { 10072, "Musical Note" },
+       { 10073, "Camera/Movie Theater" },
+       { 10074, "Star" },
+       { 10075, "Coffee Mug" },
+       { 10076, "Books" },
+       { 10077, "Historical Marker" },
+       { 10078, "Tools/Repair" },
+       { 10079, "Favorite" },
+       { 10080, "Arena" },
+       { 10081, "Golf Course" },
+       { 10082, "Money/Atm" },
+
+       /* This list comes from Alan Porter <alan@kr4jb.net>, using an iFinder Expedition C */
+
+       { 10042, "icon42" },  // black box with red X
+       { 10043, "icon43" },  // small red dot
+       { 10044, "icon44" },  // 4-wheeler
+       { 10045, "icon45" },  // hiding hunter
+       { 10046, "icon46" },  // tree (yellow base)
+       { 10047, "icon47" },  // windmill
+       { 10048, "icon48" },  // camera
+       { 10049, "icon49" },  // tree (something in front of base)
+       { 10050, "icon50" },  // tree (something hanging from left side)
+       { 10051, "icon51" },  // 4 dots in rhombus shape
+       { 10052, "icon52" },  // bare winter tree
+       { 10053, "icon53" },  // hiding deer head peeking over bushes
+       { 10054, "icon54" },  // piston? over a pile of salt?
+       { 10055, "icon55" },  // corn
+       { 10056, "icon56" },  // turkey
+       { 10057, "icon57" },  // duck
+       { 10058, "icon58" },  // hen
+       { 10059, "icon59" },  // rabbit
+       { 10060, "icon60" },  // paw print
+       { 10061, "icon61" },  // 2 red flames?
+
+       /* These are the icons that gpsbabel will use */
+
+       { 10038, "Geocache" },                      // flag buoy
+       { 10016, "Geocache Found" },                // exclamation
+       { 10043, "Micro-Cache" },                   // small red dot
+       { 10065, "Virtual cache" },                 // ghost
+       { 10051, "Multi-Cache" },                   // 4 dots in rhombus shape
+       { 10068, "Unknown Cache" },                 // ? mark
+       { 10045, "Locationless (Reverse) Cache" },  // hiding hunter
+       { 10066, "Post Office" },                   // letter
+       { 10019, "Event Cache" },                   // person
+       { 10070, "Webcam Cache" },                  // webcam
+       { 10042, "Disabled Cache" },                // black box with red X
 
        {        -1, NULL }
 };
 
-static FILE *file_in;
-static FILE *file_out;
+static gbfile *file_in;
+static gbfile *file_out;
 static short_handle mkshort_handle;
 
 static unsigned short waypt_out_count;
@@ -173,6 +207,7 @@ static char *ignoreicons;
 static char *writeasicons;
 static char *merge;
 static char *seg_break;
+static int reading_version;
 
 #define MYNAME "Lowrance USR"
 
@@ -186,20 +221,20 @@ static char *seg_break;
 /* Jan 1, 2000 00:00:00 */
 const time_t base_time_secs = 946706400;
 
-static
-size_t
-my_fwrite4(int *ptr, FILE *stream)
+static int
+lowranceusr_readstr(char *buf, const int maxlen, gbfile *file)
 {
-        int i = le_read32(ptr);
-        return fwrite(&i, 4, 1, stream);
-}
+       int org, len;
+       
+       org = len = gbfgetint32(file);
+       if (len < 0) fatal(MYNAME ": Invalid item length (%d)!\n", len);
+       else if (len) {
+               if (len > maxlen) len = maxlen;
+               (void) gbfread(buf, 1, len, file);
+               if (org > maxlen) (void) gbfseek(file, org - maxlen, SEEK_CUR);
+       }
 
-static
-size_t
-my_fwrite2(short *ptr, FILE *stream)
-{
-       short i = le_read16(ptr);
-       return fwrite(&i, 2, 1, stream);
+       return len;
 }
 
 const char *
@@ -216,7 +251,7 @@ lowranceusr_find_desc_from_icon_number(const int icon)
        return "";
 }
 
-long int
+int
 lowranceusr_find_icon_number_from_desc(const char *desc)
 {
        const lowranceusr_icon_mapping_t *i;
@@ -244,20 +279,6 @@ lowranceusr_find_icon_number_from_desc(const char *desc)
 
        return DEF_ICON;
 }
-static int
-lowranceusr_fread(void *buff, size_t size, size_t members, FILE * fp) 
-{
-       size_t br;
-
-       br = fread(buff, size, members, fp);
-
-       if (br != members) {
-               fatal(MYNAME ": requested to read %lu bytes, read %lu bytes.\n", 
-                           (unsigned long) members, (unsigned long) br);
-       }
-
-       return (br);
-}
 
 static
 arglist_t lowranceusr_args[] = {
@@ -275,19 +296,19 @@ arglist_t lowranceusr_args[] = {
 static void
 rd_init(const char *fname)
 {
-       file_in = xfopen(fname, "rb", MYNAME);
+       file_in = gbfopen_le(fname, "rb", MYNAME);
 }
 
 static void
 rd_deinit(void)
 {
-       fclose(file_in);
+       gbfclose(file_in);
 }
 
 static void
 wr_init(const char *fname)
 {
-       file_out = xfopen(fname, "wb", MYNAME);
+       file_out = gbfopen_le(fname, "wb", MYNAME);
        mkshort_handle = mkshort_new_handle();
        waypt_out_count = 0;
 }
@@ -295,7 +316,7 @@ wr_init(const char *fname)
 static void
 wr_deinit(void)
 {
-       fclose(file_out);
+       gbfclose(file_out);
        mkshort_del_handle(&mkshort_handle);
 }
 
@@ -327,54 +348,46 @@ static void
 lowranceusr_parse_waypt(waypoint *wpt_tmp)
 {
        char buff[MAXUSRSTRINGSIZE + 1];
-       long int TextLen;
+       int text_len;
        time_t waypt_time;
        short waypt_type;
 
-       lowranceusr_fread(&buff[0], 4, 1, file_in);
-       wpt_tmp->latitude = lat_mm_to_deg(le_read32(&buff[0]));
-       lowranceusr_fread(&buff[0], 4, 1, file_in);
-       wpt_tmp->longitude = lon_mm_to_deg(le_read32(&buff[0]));
-       lowranceusr_fread(&buff[0], 4, 1, file_in);
-       wpt_tmp->altitude = FEET_TO_METERS(le_read32(&buff[0]));
+       wpt_tmp->latitude = lat_mm_to_deg(gbfgetint32(file_in));
+       wpt_tmp->longitude = lon_mm_to_deg(gbfgetint32(file_in));
+       wpt_tmp->altitude = FEET_TO_METERS(gbfgetint32(file_in));
        if (wpt_tmp->altitude <= UNKNOWN_USR_ALTITUDE) {
                wpt_tmp->altitude = unknown_alt;
        }
-       lowranceusr_fread(&buff[0], 4, 1, file_in);
-       TextLen = buff[0];
-       if (TextLen)
-               lowranceusr_fread(&buff[0], TextLen, 1, file_in);
-       buff[TextLen] = '\0';
-       wpt_tmp->shortname = xstrdup(buff);
-
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE parse_waypt: Waypt name = %s Lat = %f Lon = %f alt = %f\n",wpt_tmp->shortname, wpt_tmp->latitude,
+       text_len = lowranceusr_readstr(&buff[0], MAXUSRSTRINGSIZE, file_in);
+       if (text_len) {
+               buff[text_len] = '\0';
+               wpt_tmp->shortname = xstrdup(buff);
+       }
+
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " parse_waypt: Waypt name = %s Lat = %f Lon = %f alt = %f\n",wpt_tmp->shortname, wpt_tmp->latitude,
                        wpt_tmp->longitude, wpt_tmp->altitude);
 
-       lowranceusr_fread(&buff[0], 4, 1, file_in);
-       TextLen = buff[0];
-       if (TextLen) {
-               lowranceusr_fread(&buff[0], TextLen, 1, file_in);
-               buff[TextLen] = '\0';
+       text_len = lowranceusr_readstr(&buff[0], MAXUSRSTRINGSIZE, file_in);
+       if (text_len) {
+               buff[text_len] = '\0';
                wpt_tmp->description = xstrdup(buff);
        }
-       lowranceusr_fread(&buff[0], 4, 1, file_in);
        /* Time is number of seconds since Jan. 1, 2000 */
-       waypt_time = le_read32(&buff[0]);
+       waypt_time = gbfgetint32(file_in);
        if (waypt_time)
                wpt_tmp->creation_time = base_time_secs + waypt_time;
 
-    if (global_opts.debug_level >= 2)
+       if (global_opts.debug_level >= 2)
        {
-               printf("LOWRANCE parse_waypt: creation time %d\n", 
+               printf(MYNAME " parse_waypt: creation time %d\n", 
                        (int)wpt_tmp->creation_time);
-               printf("LOWRANCE parse_waypt: base_time %d\n", (int)base_time_secs);
-               printf("LOWRANCE parse_waypt: waypt time %d\n", (int)waypt_time);
+               printf(MYNAME " parse_waypt: base_time %d\n", (int)base_time_secs);
+               printf(MYNAME " parse_waypt: waypt time %d\n", (int)waypt_time);
        }
 
        /* Symbol ID */
-       lowranceusr_fread(&buff[0], 4, 1, file_in);
-       wpt_tmp->icon_descr = lowranceusr_find_desc_from_icon_number(le_read32(&buff[0]));
+       wpt_tmp->icon_descr = lowranceusr_find_desc_from_icon_number(gbfgetint32(file_in));
        if (!wpt_tmp->icon_descr[0]) {
                char nbuf[10];
                snprintf(nbuf, sizeof(nbuf), "%d", le_read32(buff));
@@ -383,11 +396,15 @@ lowranceusr_parse_waypt(waypoint *wpt_tmp)
        }
 
        /* Waypoint Type (USER, TEMPORARY, POINT_OF_INTEREST) */
-       lowranceusr_fread(&buff[0], 2, 1, file_in);
-       waypt_type = le_read16(&buff[0]);
-    if (global_opts.debug_level >= 1)
-               printf("LOWRANCEUSR parse_waypt: waypt_type = %d\n",waypt_type);
+       waypt_type = gbfgetint16(file_in);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " parse_waypt: waypt_type = %d\n",waypt_type);
 
+    // Version 3 has an extra word in here that we don't know about.
+    if (reading_version >= 3) {
+      int junkword = gbfgetint32(file_in);
+      (void)junkword;
+    }
 }
 
 
@@ -398,14 +415,13 @@ lowranceusr_parse_routes(void)
        char buff[MAXUSRSTRINGSIZE + 1];
        short int num_routes, num_legs;
        int i,j;
-       long int text_len;
+       int text_len;
        waypoint *wpt_tmp;
 
-       lowranceusr_fread(&buff[0], 2, 1, file_in);
-       num_routes = le_read16(&buff[0]);
+       num_routes = gbfgetint16(file_in);
 
-    if (global_opts.debug_level >= 1)
-               printf("LOWRANCAE parse_routes: Num Routes = %d\n", num_routes);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " parse_routes: Num Routes = %d\n", num_routes);
 
        for (i=0; i < num_routes; i++)
        {
@@ -414,22 +430,19 @@ lowranceusr_parse_routes(void)
                rte_head->rte_num = i+1;
 
                /* route name */
-               lowranceusr_fread(&buff[0], 4, 1, file_in);
-               text_len = buff[0];
+               text_len = lowranceusr_readstr(&buff[0], MAXUSRSTRINGSIZE, file_in);
                if (text_len)
                {
-                       lowranceusr_fread(&buff[0], text_len, 1, file_in);
                        buff[text_len] = '\0';
+                       rte_head->rte_name = xstrdup(buff);
                }
-               rte_head->rte_name = xstrdup(buff);
-               rte_head->rte_desc = '\0';
+               rte_head->rte_desc = '\0';      /* ???????? */
 
                /* num Legs */
-               lowranceusr_fread(&buff[0], 2, 1, file_in);
-               num_legs = le_read16(&buff[0]);
+               num_legs = gbfgetint16(file_in);
 
                /* route reversed */
-               lowranceusr_fread(&buff[0], 1, 1, file_in);
+               (void) gbfread(&buff[0], 1, 1, file_in);
 
                /* waypoints */
                for (j=0; j < num_legs; j++)
@@ -452,20 +465,19 @@ lowranceusr_parse_icons(void)
        short int num_icons;
        int i;
 
-       lowranceusr_fread(&buff[0], 2, 1, file_in);
-       num_icons = le_read16(&buff[0]);
+       num_icons = gbfgetint16(file_in);
 
-    if (global_opts.debug_level >= 1)
-               printf("LOWRANCE parse_icons: num Icons = %d\n", num_icons);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " parse_icons: num Icons = %d\n", num_icons);
 
        for (i=0; i < num_icons; i++)
        {
                if (ignoreicons)
                {
                        /* position coord lat & long */
-                       lowranceusr_fread(&buff[0], 4, 2, file_in);
+                       (void) gbfread(&buff[0], 4, 2, file_in);
                        /* symbol */
-                       lowranceusr_fread(&buff[0], 4, 1, file_in);
+                       (void) gbfread(&buff[0], 4, 1, file_in);
                }
                else
                {
@@ -473,16 +485,13 @@ lowranceusr_parse_icons(void)
                        wpt_tmp = waypt_new();
 
                        /* position coord lat & long */
-                       lowranceusr_fread(&buff[0], 4, 1, file_in);
-                       wpt_tmp->latitude = lat_mm_to_deg(le_read32(&buff[0]));
-                       lowranceusr_fread(&buff[0], 4, 1, file_in);
-                       wpt_tmp->longitude = lon_mm_to_deg(le_read32(&buff[0]));
+                       wpt_tmp->latitude = lat_mm_to_deg(gbfgetint32(file_in));
+                       wpt_tmp->longitude = lon_mm_to_deg(gbfgetint32(file_in));
                        wpt_tmp->altitude = 0;
-                       sprintf(buff,"Icon %d", i+1);
+                       snprintf(buff, sizeof(buff), "Icon %d", i+1);
                        wpt_tmp->shortname = xstrdup(buff);
                        /* symbol */
-                       lowranceusr_fread(&buff[0], 4, 1, file_in);
-                       wpt_tmp->icon_descr = lowranceusr_find_desc_from_icon_number(le_read32(&buff[0]));
+                       wpt_tmp->icon_descr = lowranceusr_find_desc_from_icon_number(gbfgetint32(file_in));
                        waypt_add(wpt_tmp);
                }
        }
@@ -494,17 +503,16 @@ lowranceusr_parse_trails(void)
 {
        char buff[MAXUSRSTRINGSIZE + 1];
        short int num_trails, num_trail_points, num_section_points;
-       int i,j, trk_num;
-       long int text_len;
+       int i,j, trk_num, itmp;
+       int text_len;
        waypoint *wpt_tmp;
        route_head *trk_tmp;
 
        /* num trails */
-       lowranceusr_fread(&buff[0], 2, 1, file_in);
-       num_trails = le_read16(&buff[0]);
+       num_trails = gbfgetint16(file_in);
 
-    if (global_opts.debug_level >= 1)
-               printf("LOWRANCE parse_trails: num trails = %d\n", num_trails);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " parse_trails: num trails = %d\n", num_trails);
 
        for (i=trk_num=0; i < num_trails; i++)
        {
@@ -513,36 +521,33 @@ lowranceusr_parse_trails(void)
                track_add_head(trk_head);
 
                /* trail name */
-               lowranceusr_fread(&buff[0], 4, 1, file_in);
-               text_len = buff[0];
+               text_len = lowranceusr_readstr(&buff[0], MAXUSRSTRINGSIZE, file_in);
 
-if (global_opts.debug_level >= 1)
-       printf("LOWRANCE parse_trails: name text len = %ld\n", text_len);
-
-               if (text_len)
-                       lowranceusr_fread(&buff[0], text_len, 1, file_in);
+               if (global_opts.debug_level >= 1)
+                       printf(MYNAME " parse_trails: name text len = %d\n", text_len);
 
-               buff[text_len] = '\0';
-               trk_head->rte_name = xstrdup(buff);
+               if (text_len) {
+                       buff[text_len] = '\0';
+                       trk_head->rte_name = xstrdup(buff);
+               }
                trk_head->rte_desc = '\0';
 
-if (global_opts.debug_level >= 1)
-       printf("LOWRANCE parse_trails: trail name = %s\n", trk_head->rte_name);
+               if (global_opts.debug_level >= 1)
+                       printf(MYNAME " parse_trails: trail name = %s\n", trk_head->rte_name);
 
                /* visible */
-               lowranceusr_fread(&buff[0], 1, 1, file_in);
+               (void) gbfread(&buff[0], 1, 1, file_in);
                /* num trail points */
-               lowranceusr_fread(&buff[0], 2, 1, file_in);
-               num_trail_points = le_read16(&buff[0]);
+               num_trail_points = gbfgetint16(file_in);
 
-if (global_opts.debug_level >= 1)
-       printf("LOWRANCE parse_trails: num trail points = %d\n", num_trail_points);
+               if (global_opts.debug_level >= 1)
+                       printf(MYNAME " parse_trails: num trail points = %d\n", num_trail_points);
 
                /* max trail size */
-               lowranceusr_fread(&buff[0], 2, 1, file_in);
+               itmp = gbfgetint16(file_in);
 
-if (global_opts.debug_level >= 1)
-       printf("LOWRANCE parse_trails: max trail size = %d\n", le_read16(&buff[0]));
+               if (global_opts.debug_level >= 1)
+                       printf(MYNAME " parse_trails: max trail size = %d\n", itmp);
 
                if (num_trail_points)
                {
@@ -550,34 +555,31 @@ if (global_opts.debug_level >= 1)
                        while (num_trail_points)
                        {
                        /* num section points */
-                       lowranceusr_fread(&buff[0], 2, 1, file_in);
-                       num_section_points = le_read16(&buff[0]);
+                       num_section_points = gbfgetint16(file_in);
 
-if (global_opts.debug_level >= 1)
-       printf("LOWRANCE parse_trails: num section points = %d\n", num_section_points);
+                       if (global_opts.debug_level >= 1)
+                               printf(MYNAME " parse_trails: num section points = %d\n", num_section_points);
 
                                for (j=0; j < num_section_points; j++, num_trail_points--)
                                {
-                               wpt_tmp = waypt_new();
-                               lowranceusr_fread(&buff[0], 4, 1, file_in);
-                               wpt_tmp->latitude = lat_mm_to_deg(le_read32(&buff[0]));
-                               lowranceusr_fread(&buff[0], 4, 1, file_in);
-                               wpt_tmp->longitude = lon_mm_to_deg(le_read32(&buff[0]));
-                               /* continuous */
-                               lowranceusr_fread(&buff[0], 1, 1, file_in);
-                               if (!buff[0] && seg_break && j)
-                               {
-                                       trk_tmp = route_head_alloc();
-                                       trk_tmp->rte_num = ++trk_num;
-                                       trk_tmp->rte_name = xstrdup(trk_head->rte_name);
-                                       trk_tmp->rte_desc = '\0';
-                                       track_add_head(trk_tmp);
-                                       trk_head = trk_tmp;
-                               }
-                               track_add_wpt(trk_head, wpt_tmp);
+                                       wpt_tmp = waypt_new();
+                                       wpt_tmp->latitude = lat_mm_to_deg(gbfgetint32(file_in));
+                                       wpt_tmp->longitude = lon_mm_to_deg(gbfgetint32(file_in));
+                                       /* continuous */
+                                       (void) gbfread(&buff[0], 1, 1, file_in);
+                                       if (!buff[0] && seg_break && j)
+                                       {
+                                               trk_tmp = route_head_alloc();
+                                               trk_tmp->rte_num = ++trk_num;
+                                               trk_tmp->rte_name = xstrdup(trk_head->rte_name);
+                                               trk_tmp->rte_desc = '\0';
+                                               track_add_head(trk_tmp);
+                                               trk_head = trk_tmp;
+                                       }
+                                       track_add_wpt(trk_head, wpt_tmp);
                        
-if (global_opts.debug_level >= 1)
-       printf("LOWRANCE parse_trails: Trail pt lat %f lon %f\n", wpt_tmp->latitude, wpt_tmp->longitude);
+                                       if (global_opts.debug_level >= 1)
+                                               printf(MYNAME " parse_trails: Trail pt lat %f lon %f\n", wpt_tmp->latitude, wpt_tmp->longitude);
                                }
                        }
                }
@@ -589,27 +591,24 @@ if (global_opts.debug_level >= 1)
 static void
 data_read(void)
 {
-       char buff[MAXUSRSTRINGSIZE + 1];
        short int NumWaypoints, MajorVersion, MinorVersion, object_num;
        int i;
 
-       lowranceusr_fread(&buff[0], 2, 1, file_in);
-       MajorVersion = le_read16(&buff[0]);
-       lowranceusr_fread(&buff[0], 2, 1, file_in);
-       MinorVersion = le_read16(&buff[0]);
+       MajorVersion = gbfgetint16(file_in);
+       reading_version = MajorVersion;
+       MinorVersion = gbfgetint16(file_in);
        
        if (global_opts.debug_level >= 1)
-               printf("LOWRANCE data_read: Major Version %d Minor Version %d\n", MajorVersion, MinorVersion);
+               printf(MYNAME " data_read: Major Version %d Minor Version %d\n", MajorVersion, MinorVersion);
 
        if (MajorVersion < 2) {
                fatal(MYNAME ": input file is from an old version of the USR file and is not supported\n");
        }
 
-       lowranceusr_fread(&buff[0], 2, 1, file_in);
-       NumWaypoints = le_read16(&buff[0]);
+       NumWaypoints = gbfgetint16(file_in);
 
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE data_read: Num waypoints %d\n", NumWaypoints);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " data_read: Num waypoints %d\n", NumWaypoints);
 
        for (i = 0; i < NumWaypoints; i++) {
                waypoint *wpt_tmp;
@@ -617,10 +616,9 @@ data_read(void)
                wpt_tmp = waypt_new();
 
                /* Object num */
-               lowranceusr_fread(&buff[0], 2, 1, file_in);
-               object_num = le_read16(&buff[0]);
+               object_num = gbfgetint16(file_in);
                if (global_opts.debug_level >= 1)
-                       printf("LOWRANCE data_read: object_num = %d\n", object_num);
+                       printf(MYNAME " data_read: object_num = %d\n", object_num);
 
                /* waypoint */
                lowranceusr_parse_waypt(wpt_tmp);
@@ -636,7 +634,7 @@ data_read(void)
 static void
 lowranceusr_waypt_disp(const waypoint *wpt)
 {
-       int TextLen, Lat, Lon, Time, SymbolId;
+       int text_len, Lat, Lon, Time, SymbolId;
        short int WayptType;
        char *name;
        char *comment;
@@ -647,13 +645,15 @@ lowranceusr_waypt_disp(const waypoint *wpt)
        }
 
        Lat = lat_deg_to_mm(wpt->latitude);
-       my_fwrite4(&Lat, file_out);
        Lon = lon_deg_to_mm(wpt->longitude);
-       my_fwrite4(&Lon, file_out);
-       my_fwrite4(&alt, file_out);
+       gbfputint32(Lat, file_out);
+       gbfputint32(Lon, file_out);
+       gbfputint32(alt, file_out);
 
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE waypt_disp: Lat = %d\nLon = %d\nAlt = %d\n",Lat, Lon, alt);
+       if (global_opts.debug_level >= 1) {
+               /* print lat/lon/alt on one easily greppable line */
+               printf(MYNAME " waypt_disp: Lat = %d   Lon = %d   Alt = %d\n",Lat, Lon, alt);
+       }
 
        /* Try and make sure we have a name */
        if ((! wpt->shortname) || global_opts.synthesize_shortnames) {
@@ -670,27 +670,29 @@ lowranceusr_waypt_disp(const waypoint *wpt)
                name = xstrdup(wpt->shortname);
        }
 
-       TextLen = strlen(name);
-       my_fwrite4(&TextLen, file_out);
-       fwrite(name, 1, TextLen, file_out);
+       text_len = strlen(name);
+       if (text_len > MAXUSRSTRINGSIZE) text_len = MAXUSRSTRINGSIZE;
+       gbfputint32(text_len, file_out);
+       gbfwrite(name, 1, text_len, file_out);
 
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE waypt_disp: Waypt name = %s\n",name);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " waypt_disp: Waypt name = %s\n",name);
 
        xfree(name);
 
        /**
-        * Comments aren't used by the iFinder yet so they just take up space...
+        * Comments are now used by the iFinder (Expedition C supports them)
         */
-       if (0 && wpt->description && strcmp(wpt->description, wpt->shortname) != 0) {
+       if (wpt->description && strcmp(wpt->description, wpt->shortname) != 0) {
                comment = xstrdup(wpt->description);
-               TextLen = strlen(comment);
-               my_fwrite4(&TextLen, file_out);
-               fwrite(comment, 1, TextLen, file_out);
+               text_len = strlen(comment);
+               if (text_len > MAXUSRSTRINGSIZE) text_len = MAXUSRSTRINGSIZE;
+               gbfputint32(text_len, file_out);
+               gbfwrite(comment, 1, text_len, file_out);
                xfree(comment);
        } else {
-               TextLen = 0;
-               my_fwrite4(&TextLen, file_out);
+               text_len = 0;
+               gbfputint32(text_len, file_out);
        }
 
        if (wpt->creation_time > base_time_secs) {
@@ -699,28 +701,32 @@ lowranceusr_waypt_disp(const waypoint *wpt)
                Time = 0;
        }
 
-    if (global_opts.debug_level >= 2)
+       if (global_opts.debug_level >= 2)
        {
                time_t wpt_time = Time;
-               printf("LOWRANCE waypt_disp: base_time : %d\n", (int)base_time_secs);
-               printf("LOWRANCE waypt_disp: creation time : %d\n", (int)wpt->creation_time);
-               printf("LOWRANCE waypt_disp: waypt time : %d\n", (int)wpt_time);
-               printf("LOWRANCE waypt_disp: waypt time (local): %s\n", ctime(&wpt_time));
+               printf(MYNAME " waypt_disp: base_time : %d\n", (int)base_time_secs);
+               printf(MYNAME " waypt_disp: creation time : %d\n", (int)wpt->creation_time);
+               printf(MYNAME " waypt_disp: waypt time : %d\n", (int)wpt_time);
+               printf(MYNAME " waypt_disp: waypt time (local): %s\n", ctime(&wpt_time));
        }
 
-       my_fwrite4(&Time, file_out);
+       gbfputint32(Time, file_out);
 
        if (get_cache_icon(wpt) && wpt->icon_descr && (strcmp(wpt->icon_descr, "Geocache Found") != 0)) {
                SymbolId = lowranceusr_find_icon_number_from_desc(get_cache_icon(wpt));
        } else {
                SymbolId = lowranceusr_find_icon_number_from_desc(wpt->icon_descr);
        }
+       /* If the waypoint is archived or disabled, use a "disabled" icon instead. */
+       if ( (wpt->gc_data.is_archived==status_true) || (wpt->gc_data.is_available==status_false) ) {
+               SymbolId = lowranceusr_find_icon_number_from_desc("Disabled Cache");
+       }
 
-       my_fwrite4(&SymbolId, file_out);
+       gbfputint32(SymbolId, file_out);
 
        /* USER waypoint type */
        WayptType = 0;
-       my_fwrite2(&WayptType, file_out);
+       gbfputint16(WayptType, file_out);
 }
 
 static void
@@ -728,10 +734,10 @@ lowranceusr_waypt_pr(const waypoint *wpt)
 {
 
        /* our personal waypoint counter */
-       my_fwrite2((short *) &waypt_out_count, file_out);
+       gbfputint16(waypt_out_count, file_out);
 
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE waypt_pr: waypoint #%d ",waypt_out_count);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " waypt_pr: waypoint #%d ",waypt_out_count);
 
        waypt_out_count++;
 
@@ -755,9 +761,9 @@ lowranceusr_write_icon(const waypoint *wpt)
                lowranceusr_find_icon_number_from_desc(wpt->icon_descr) :
                10003;
 
-       my_fwrite4(&latmm, file_out);
-       my_fwrite4(&lonmm, file_out);
-       my_fwrite4(&icon, file_out);
+       gbfputint32(latmm, file_out);
+       gbfputint32(lonmm, file_out);
+       gbfputint32(icon, file_out);
 }
 
 /*
@@ -791,19 +797,20 @@ lowranceusr_track_hdr(const route_head *trk)
        } else
        {
                tmp_name[0]='\0';
-               sprintf(tmp_name, "Babel %d", trail_count);
+               snprintf(tmp_name, sizeof(tmp_name), "Babel %d", trail_count);
                name = xstrdup(tmp_name);
        }
 
        text_len = strlen(name);
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE track_hdr: trail name text len = %d\n", text_len);
-       my_fwrite4(&text_len, file_out);
+       if (text_len > MAXUSRSTRINGSIZE) text_len = MAXUSRSTRINGSIZE;
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " track_hdr: trail name text len = %d\n", text_len);
+       gbfputint32(text_len, file_out);
 
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE track_hdr: trail name = %s\n", name);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " track_hdr: trail name = %s\n", name);
 
-       fwrite(name, 1, text_len, file_out);
+       gbfwrite(name, 1, text_len, file_out);
 
        num_trail_points = (short) trk->rte_waypt_ct;
        max_trail_size = MAX_TRAIL_POINTS;
@@ -811,14 +818,14 @@ lowranceusr_track_hdr(const route_head *trk)
                num_trail_points = max_trail_size;
        num_section_points = num_trail_points;
 
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE track_hdr: num_trail_points = %d\nmax_trail_size = %d\nnum_section_points = %d\n",
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " track_hdr: num_trail_points = %d\nmax_trail_size = %d\nnum_section_points = %d\n",
                        num_trail_points, max_trail_size, num_section_points);
 
-       fwrite(&visible, 1, 1, file_out);
-       my_fwrite2(&num_trail_points, file_out);
-       my_fwrite2(&max_trail_size, file_out);
-       my_fwrite2(&num_section_points, file_out);
+       gbfwrite(&visible, 1, 1, file_out);
+       gbfputint16(num_trail_points, file_out);
+       gbfputint16(max_trail_size, file_out);
+       gbfputint16(num_section_points, file_out);
        xfree(name);
        trail_point_count=1;
 }
@@ -839,21 +846,22 @@ lowranceusr_route_hdr(const route_head *rte)
        } else
        {
                tmp_name[0]='\0';
-               sprintf(tmp_name, "Babel R%d", ++lowrance_route_count);
+               snprintf(tmp_name, sizeof(tmp_name), "Babel R%d", ++lowrance_route_count);
                name = xstrdup(tmp_name);
        }
        text_len = strlen(name);
-       my_fwrite4(&text_len, file_out);
-       fwrite(name, 1, text_len, file_out);
+       if (text_len > MAXUSRSTRINGSIZE) text_len = MAXUSRSTRINGSIZE;
+       gbfputint32(text_len, file_out);
+       gbfwrite(name, 1, text_len, file_out);
        xfree(name);
 
        /* num legs */
        num_legs = (short) rte->rte_waypt_ct;
-       my_fwrite2(&num_legs, file_out);
-       fwrite(&route_reversed, 1, 1, file_out);
+       gbfputint16(num_legs, file_out);
+       gbfwrite(&route_reversed, 1, 1, file_out);
 
-    if (global_opts.debug_level >= 1)
-               printf("LOWRANCE route_hdr: route name \"%s\" num_legs = %d\n",
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " route_hdr: route name \"%s\" num_legs = %d\n",
                        rte->rte_name, num_legs);
 
 }
@@ -868,12 +876,12 @@ lowranceusr_track_disp(const waypoint *wpt)
                lat = lat_deg_to_mm(wpt->latitude);
                lon = lon_deg_to_mm(wpt->longitude);
 
-    if (global_opts.debug_level >= 1)
-               printf("LOWRANCE track_disp: Trail point #%d lat = %d long = %d\n",trail_point_count, lat, lon);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " track_disp: Trail point #%d lat = %d long = %d\n",trail_point_count, lat, lon);
 
-               my_fwrite4(&lat, file_out);
-               my_fwrite4(&lon, file_out);
-               fwrite(&continuous, 1, 1, file_out);
+               gbfputint32(lat, file_out);
+               gbfputint32(lon, file_out);
+               gbfwrite(&continuous, 1, 1, file_out);
                if (!continuous)
                        continuous = 1;
        }
@@ -894,16 +902,17 @@ lowranceusr_merge_track_hdr(const route_head *trk)
                } else
                {
                        tmp_name[0]='\0';
-                       sprintf(tmp_name, "Babel %d", trail_count);
+                       snprintf(tmp_name, sizeof(tmp_name), "Babel %d", trail_count);
                        name = xstrdup(tmp_name);
                }
                text_len = strlen(name);
-               my_fwrite4(&text_len, file_out);
+               if (text_len > MAXUSRSTRINGSIZE) text_len = MAXUSRSTRINGSIZE;
+               gbfputint32(text_len, file_out);
 
                if (global_opts.debug_level >= 1)
-                       printf("LOWRANCE track_hdr: trail name = %s\n", name);
+                       printf(MYNAME " track_hdr: trail name = %s\n", name);
 
-               fwrite(name, 1, text_len, file_out);
+               gbfwrite(name, 1, text_len, file_out);
        }
 
        trail_point_count += (short) trk->rte_waypt_ct;
@@ -923,14 +932,14 @@ lowranceusr_merge_track_tlr(const route_head *trk)
                        num_trail_points = max_trail_size;
                num_section_points = num_trail_points;
 
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE merge_track_tlr: num_trail_points = %d\nmax_trail_size = %d\nnum_section_points = %d\n",
-                       num_trail_points, max_trail_size, num_section_points);
+               if (global_opts.debug_level >= 1)
+                       printf(MYNAME " merge_track_tlr: num_trail_points = %d\nmax_trail_size = %d\nnum_section_points = %d\n",
+                               num_trail_points, max_trail_size, num_section_points);
 
-               fwrite(&visible, 1, 1, file_out);
-               my_fwrite2(&num_trail_points, file_out);
-               my_fwrite2(&max_trail_size, file_out);
-               my_fwrite2(&num_section_points, file_out);
+               gbfwrite(&visible, 1, 1, file_out);
+               gbfputint16(num_trail_points, file_out);
+               gbfputint16(max_trail_size, file_out);
+               gbfputint16(num_section_points, file_out);
        }
 }
 static void
@@ -950,26 +959,26 @@ data_write(void)
 
        NumWaypoints = waypt_count();
 
-       my_fwrite2(&MajorVersion, file_out);
-       my_fwrite2(&MinorVersion, file_out);
+       gbfputint16(MajorVersion, file_out);
+       gbfputint16(MinorVersion, file_out);
 
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE data_write: Num waypoints = %d\n", NumWaypoints);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " data_write: Num waypoints = %d\n", NumWaypoints);
 
-    if (writeasicons) {
-           short zero = 0;
-           my_fwrite2(&zero, file_out);
-    } else {
-           my_fwrite2(&NumWaypoints, file_out);
-           waypt_disp_all(lowranceusr_waypt_pr);
-    }
+       if (writeasicons) {
+               short zero = 0;
+               gbfputint16(zero, file_out);
+       } else {
+               gbfputint16(NumWaypoints, file_out);
+               waypt_disp_all(lowranceusr_waypt_pr);
+       }
 
-    /* Route support added 6/21/05 */
-    NumRoutes = route_count();
-    my_fwrite2(&NumRoutes, file_out);
+       /* Route support added 6/21/05 */
+       NumRoutes = route_count();
+       gbfputint16(NumRoutes, file_out);
 
-    if (global_opts.debug_level >= 1)
-       printf("LOWRANCE data_write: Num routes = %d\n", NumRoutes);
+       if (global_opts.debug_level >= 1)
+               printf(MYNAME " data_write: Num routes = %d\n", NumRoutes);
 
        if (NumRoutes)
        {
@@ -978,11 +987,11 @@ data_write(void)
        }
 
        if (NumWaypoints && writeasicons) {
-               my_fwrite2(&NumWaypoints, file_out);
+               gbfputint16(NumWaypoints, file_out);
                waypt_disp_all(lowranceusr_write_icon);
        } else {
                NumIcons = 0;
-               my_fwrite2(&NumIcons, file_out);
+               gbfputint16(NumIcons, file_out);
        }
        
        /* Track support added 6/21/05 */
@@ -991,7 +1000,7 @@ data_write(void)
        if (NumTrails && merge)
        {
                NumTrails = 1;
-               my_fwrite2(&NumTrails, file_out);
+               gbfputint16(NumTrails, file_out);
                trail_point_count = 0;
                trail_count = 0;
                /* count the number of total track points */
@@ -1004,10 +1013,10 @@ data_write(void)
        else
        {
        
-               my_fwrite2(&NumTrails, file_out);
+               gbfputint16(NumTrails, file_out);
 
                if (global_opts.debug_level >= 1)
-               printf("LOWRANCE data_write: Num tracks = %d\n", NumTrails);
+                       printf(MYNAME " data_write: Num tracks = %d\n", NumTrails);
 
                if (NumTrails)
                {
diff --git a/mac/dmg-contents/COPYING b/mac/dmg-contents/COPYING
new file mode 100644 (file)
index 0000000..514d6c7
--- /dev/null
@@ -0,0 +1,339 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          59 Temple Place - Suite 330, Boston, MA 02111 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+       Appendix: How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/mac/dmg-contents/Credits.rtf b/mac/dmg-contents/Credits.rtf
new file mode 100644 (file)
index 0000000..526285d
--- /dev/null
@@ -0,0 +1,53 @@
+{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\vieww9000\viewh8400\viewkind0
+\deftab720
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural
+
+\f0\b\fs24 \cf0 GPSBabel
+\f1\b0  is an open-source project created and administrated by 
+\f0\b Robert Lipe
+\f1\b0 .
+\f0\b \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural
+
+\f1\b0 \cf0 The original
+\f0\b  MacGPSBabel, 
+\f1\b0 designed by
+\f0\b  
+\f1\b0 Jeremy Atherton was used for inspiration for GPSBabel+ 
+\f0\b . GPSBabel+ 
+\f1\b0  is a GUI front-end for GPSBabel designed by 
+\f0\b Karl Smith
+\f1\b0 .
+\f0\b \
+
+\f1\b0 \
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\
+\
+This program is distributed in the hope that it will be useful, but 
+\f0\b WITHOUT ANY WARRANTY
+\f1\b0 ; without even the implied warranty of 
+\f0\b MERCHANTABILITY
+\f1\b0  or 
+\f0\b FITNESS FOR A PARTICULAR PURPOSE
+\f1\b0 .  See the GNU General Public License for more details.
+\f0\b \
+
+\f1\b0 \
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA\
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural
+
+\f0\b \cf0 GPSBabel/MacGPSBabel/GPSBabel+ \'a9 2002 - 2007
+\f1\b0  
+\f0\b Robert Lipe\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural
+
+\f1\b0 \cf0 \
+For questions or comments regarding GPSBabel+ please visit http://www.gpsbabel.org and use the gpsbabel-misc email list. Alternatively you can contact Karl Smith through the address posted at the sourceforge site.\
+\
+\pard\pardeftab720\ql\qnatural
+\cf0 Thanks to the many people who have tested GPSBabel+ and given suggestions for improvement. If you would like to contribute your programming skills to either GPSBabel or GPSBabel+ please do. Join the gpsbabel-code email list and get involved.\
+}
\ No newline at end of file
diff --git a/mac/dmg-contents/GPSBabel+.app b/mac/dmg-contents/GPSBabel+.app
new file mode 100755 (executable)
index 0000000..d161f33
Binary files /dev/null and b/mac/dmg-contents/GPSBabel+.app differ
diff --git a/mac/dmg-contents/README.rtf b/mac/dmg-contents/README.rtf
new file mode 100644 (file)
index 0000000..bbee510
--- /dev/null
@@ -0,0 +1,15 @@
+{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410
+{\fonttbl\f0\fswiss\fcharset77 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\margl1440\margr1440\vieww9000\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
+
+\f0\fs24 \cf0 Learn more about GPSBabel at http://www.gpsbabel.org.\
+\
+Please do not link directly to the download site at sourceforge.  A large number of Mac users find these direct links from places like Versiontracker and bypass the doc we have, then complain that we have no doc.\
+\
+If you find GPSBabel useful, please help support the development by visiting the site and clicking the 'donate' links.  A PayPal account is not necessary and we've recently added Google Checkout.\
+\
+Thank you.\
+Robert Lipe,\
+Chief Babel-head.}
\ No newline at end of file
diff --git a/mac/include/expat.h b/mac/include/expat.h
new file mode 100644 (file)
index 0000000..aeae5d3
--- /dev/null
@@ -0,0 +1,927 @@
+/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
+   See the file COPYING for copying permission.
+*/
+/* $XFree86: xc/extras/expat/lib/expat.h,v 1.2 2003/10/22 16:59:31 tsi Exp $ */
+
+#ifndef XmlParse_INCLUDED
+#define XmlParse_INCLUDED 1
+
+#ifdef __VMS
+/*      0        1         2         3      0        1         2         3
+        1234567890123456789012345678901     1234567890123456789012345678901 */
+#define XML_SetProcessingInstructionHandler XML_SetProcessingInstrHandler
+#define XML_SetUnparsedEntityDeclHandler    XML_SetUnparsedEntDeclHandler
+#define XML_SetStartNamespaceDeclHandler    XML_SetStartNamespcDeclHandler
+#define XML_SetExternalEntityRefHandlerArg  XML_SetExternalEntRefHandlerArg
+#endif
+
+#include <stdlib.h>
+
+#ifndef XMLPARSEAPI
+#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
+#ifdef XML_STATIC
+#define XMLPARSEAPI(type) type __cdecl
+#else
+#define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl
+#endif
+#else
+#define XMLPARSEAPI(type) type
+#endif
+#endif  /* not defined XMLPARSEAPI */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef XML_UNICODE_WCHAR_T
+#define XML_UNICODE
+#endif
+
+struct XML_ParserStruct;
+typedef struct XML_ParserStruct *XML_Parser;
+
+#ifdef XML_UNICODE     /* Information is UTF-16 encoded. */
+#ifdef XML_UNICODE_WCHAR_T
+typedef wchar_t XML_Char;
+typedef wchar_t XML_LChar;
+#else
+typedef unsigned short XML_Char;
+typedef char XML_LChar;
+#endif /* XML_UNICODE_WCHAR_T */
+#else                  /* Information is UTF-8 encoded. */
+typedef char XML_Char;
+typedef char XML_LChar;
+#endif /* XML_UNICODE */
+
+/* Should this be defined using stdbool.h when C99 is available? */
+typedef unsigned char XML_Bool;
+#define XML_TRUE   ((XML_Bool) 1)
+#define XML_FALSE  ((XML_Bool) 0)
+
+enum XML_Error {
+  XML_ERROR_NONE,
+  XML_ERROR_NO_MEMORY,
+  XML_ERROR_SYNTAX,
+  XML_ERROR_NO_ELEMENTS,
+  XML_ERROR_INVALID_TOKEN,
+  XML_ERROR_UNCLOSED_TOKEN,
+  XML_ERROR_PARTIAL_CHAR,
+  XML_ERROR_TAG_MISMATCH,
+  XML_ERROR_DUPLICATE_ATTRIBUTE,
+  XML_ERROR_JUNK_AFTER_DOC_ELEMENT,
+  XML_ERROR_PARAM_ENTITY_REF,
+  XML_ERROR_UNDEFINED_ENTITY,
+  XML_ERROR_RECURSIVE_ENTITY_REF,
+  XML_ERROR_ASYNC_ENTITY,
+  XML_ERROR_BAD_CHAR_REF,
+  XML_ERROR_BINARY_ENTITY_REF,
+  XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,
+  XML_ERROR_MISPLACED_XML_PI,
+  XML_ERROR_UNKNOWN_ENCODING,
+  XML_ERROR_INCORRECT_ENCODING,
+  XML_ERROR_UNCLOSED_CDATA_SECTION,
+  XML_ERROR_EXTERNAL_ENTITY_HANDLING,
+  XML_ERROR_NOT_STANDALONE,
+  XML_ERROR_UNEXPECTED_STATE,
+  XML_ERROR_ENTITY_DECLARED_IN_PE,
+  XML_ERROR_FEATURE_REQUIRES_XML_DTD,
+  XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING
+};
+
+enum XML_Content_Type {
+  XML_CTYPE_EMPTY = 1,
+  XML_CTYPE_ANY,
+  XML_CTYPE_MIXED,
+  XML_CTYPE_NAME,
+  XML_CTYPE_CHOICE,
+  XML_CTYPE_SEQ
+};
+
+enum XML_Content_Quant {
+  XML_CQUANT_NONE,
+  XML_CQUANT_OPT,
+  XML_CQUANT_REP,
+  XML_CQUANT_PLUS
+};
+
+/* The XML_Status enum gives the possible return values for the
+   XML_Parse and XML_ParseBuffer functions.  Though the return values
+   for these functions has always been described as a Boolean value,
+   the implementation, at least for the 1.95.x series, has always
+   returned exactly one of these values.  The preprocessor #defines
+   are included so this stanza can be added to code that still needs
+   to support older versions of Expat 1.95.x:
+
+   #ifndef XML_STATUS_OK
+   #define XML_STATUS_OK    1
+   #define XML_STATUS_ERROR 0
+   #endif
+
+   Otherwise, the #define hackery is quite ugly and would have been dropped.
+*/
+enum XML_Status {
+  XML_STATUS_ERROR = 0,
+#define XML_STATUS_ERROR XML_STATUS_ERROR
+  XML_STATUS_OK = 1
+#define XML_STATUS_OK XML_STATUS_OK
+};
+
+/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be
+   XML_CQUANT_NONE, and the other fields will be zero or NULL.
+   If type == XML_CTYPE_MIXED, then quant will be NONE or REP and
+   numchildren will contain number of elements that may be mixed in
+   and children point to an array of XML_Content cells that will be
+   all of XML_CTYPE_NAME type with no quantification.
+
+   If type == XML_CTYPE_NAME, then the name points to the name, and
+   the numchildren field will be zero and children will be NULL. The
+   quant fields indicates any quantifiers placed on the name.
+
+   CHOICE and SEQ will have name NULL, the number of children in
+   numchildren and children will point, recursively, to an array
+   of XML_Content cells.
+
+   The EMPTY, ANY, and MIXED types will only occur at top level.
+*/
+
+typedef struct XML_cp XML_Content;
+
+struct XML_cp {
+  enum XML_Content_Type         type;
+  enum XML_Content_Quant        quant;
+  XML_Char *                    name;
+  unsigned int                  numchildren;
+  XML_Content *                 children;
+};
+
+
+/* This is called for an element declaration. See above for
+   description of the model argument. It's the caller's responsibility
+   to free model when finished with it.
+*/
+typedef void (*XML_ElementDeclHandler) (void *userData,
+                                        const XML_Char *name,
+                                        XML_Content *model);
+
+XMLPARSEAPI(void)
+XML_SetElementDeclHandler(XML_Parser parser,
+                          XML_ElementDeclHandler eldecl);
+
+/* The Attlist declaration handler is called for *each* attribute. So
+   a single Attlist declaration with multiple attributes declared will
+   generate multiple calls to this handler. The "default" parameter
+   may be NULL in the case of the "#IMPLIED" or "#REQUIRED"
+   keyword. The "isrequired" parameter will be true and the default
+   value will be NULL in the case of "#REQUIRED". If "isrequired" is
+   true and default is non-NULL, then this is a "#FIXED" default.
+*/
+typedef void (*XML_AttlistDeclHandler) (void           *userData,
+                                        const XML_Char *elname,
+                                        const XML_Char *attname,
+                                        const XML_Char *att_type,
+                                        const XML_Char *dflt,
+                                        int             isrequired);
+
+XMLPARSEAPI(void)
+XML_SetAttlistDeclHandler(XML_Parser parser,
+                          XML_AttlistDeclHandler attdecl);
+
+/* The XML declaration handler is called for *both* XML declarations
+   and text declarations. The way to distinguish is that the version
+   parameter will be NULL for text declarations. The encoding
+   parameter may be NULL for XML declarations. The standalone
+   parameter will be -1, 0, or 1 indicating respectively that there
+   was no standalone parameter in the declaration, that it was given
+   as no, or that it was given as yes.
+*/
+typedef void (*XML_XmlDeclHandler) (void                *userData,
+                                    const XML_Char      *version,
+                                    const XML_Char      *encoding,
+                                    int                  standalone);
+
+XMLPARSEAPI(void)
+XML_SetXmlDeclHandler(XML_Parser parser,
+                      XML_XmlDeclHandler xmldecl);
+
+
+typedef struct {
+  void *(*malloc_fcn)(size_t size);
+  void *(*realloc_fcn)(void *ptr, size_t size);
+  void (*free_fcn)(void *ptr);
+} XML_Memory_Handling_Suite;
+
+/* Constructs a new parser; encoding is the encoding specified by the
+   external protocol or NULL if there is none specified.
+*/
+XMLPARSEAPI(XML_Parser)
+XML_ParserCreate(const XML_Char *encoding);
+
+/* Constructs a new parser and namespace processor.  Element type
+   names and attribute names that belong to a namespace will be
+   expanded; unprefixed attribute names are never expanded; unprefixed
+   element type names are expanded only if there is a default
+   namespace. The expanded name is the concatenation of the namespace
+   URI, the namespace separator character, and the local part of the
+   name.  If the namespace separator is '\0' then the namespace URI
+   and the local part will be concatenated without any separator.
+   When a namespace is not declared, the name and prefix will be
+   passed through without expansion.
+*/
+XMLPARSEAPI(XML_Parser)
+XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
+
+
+/* Constructs a new parser using the memory management suite referred to
+   by memsuite. If memsuite is NULL, then use the standard library memory
+   suite. If namespaceSeparator is non-NULL it creates a parser with
+   namespace processing as described above. The character pointed at
+   will serve as the namespace separator.
+
+   All further memory operations used for the created parser will come from
+   the given suite.
+*/
+XMLPARSEAPI(XML_Parser)
+XML_ParserCreate_MM(const XML_Char *encoding,
+                    const XML_Memory_Handling_Suite *memsuite,
+                    const XML_Char *namespaceSeparator);
+
+/* Prepare a parser object to be re-used.  This is particularly
+   valuable when memory allocation overhead is disproportionatly high,
+   such as when a large number of small documnents need to be parsed.
+   All handlers are cleared from the parser, except for the
+   unknownEncodingHandler. The parser's external state is re-initialized
+   except for the values of ns and ns_triplets.
+
+   Added in Expat 1.95.3.
+*/
+XMLPARSEAPI(XML_Bool)
+XML_ParserReset(XML_Parser parser, const XML_Char *encoding);
+
+/* atts is array of name/value pairs, terminated by 0;
+   names and values are 0 terminated.
+*/
+typedef void (*XML_StartElementHandler)(void *userData,
+                                        const XML_Char *name,
+                                        const XML_Char **atts);
+
+typedef void (*XML_EndElementHandler)(void *userData,
+                                      const XML_Char *name);
+
+
+/* s is not 0 terminated. */
+typedef void (*XML_CharacterDataHandler)(void *userData,
+                                         const XML_Char *s,
+                                         int len);
+
+/* target and data are 0 terminated */
+typedef void (*XML_ProcessingInstructionHandler)(void *userData,
+                                                 const XML_Char *target,
+                                                 const XML_Char *data);
+
+/* data is 0 terminated */
+typedef void (*XML_CommentHandler)(void *userData, const XML_Char *data);
+
+typedef void (*XML_StartCdataSectionHandler)(void *userData);
+typedef void (*XML_EndCdataSectionHandler)(void *userData);
+
+/* This is called for any characters in the XML document for which
+   there is no applicable handler.  This includes both characters that
+   are part of markup which is of a kind that is not reported
+   (comments, markup declarations), or characters that are part of a
+   construct which could be reported but for which no handler has been
+   supplied. The characters are passed exactly as they were in the XML
+   document except that they will be encoded in UTF-8 or UTF-16.
+   Line boundaries are not normalized. Note that a byte order mark
+   character is not passed to the default handler. There are no
+   guarantees about how characters are divided between calls to the
+   default handler: for example, a comment might be split between
+   multiple calls.
+*/
+typedef void (*XML_DefaultHandler)(void *userData,
+                                   const XML_Char *s,
+                                   int len);
+
+/* This is called for the start of the DOCTYPE declaration, before
+   any DTD or internal subset is parsed.
+*/
+typedef void (*XML_StartDoctypeDeclHandler)(void *userData,
+                                            const XML_Char *doctypeName,
+                                            const XML_Char *sysid,
+                                            const XML_Char *pubid,
+                                            int has_internal_subset);
+
+/* This is called for the start of the DOCTYPE declaration when the
+   closing > is encountered, but after processing any external
+   subset.
+*/
+typedef void (*XML_EndDoctypeDeclHandler)(void *userData);
+
+/* This is called for entity declarations. The is_parameter_entity
+   argument will be non-zero if the entity is a parameter entity, zero
+   otherwise.
+
+   For internal entities (<!ENTITY foo "bar">), value will
+   be non-NULL and systemId, publicID, and notationName will be NULL.
+   The value string is NOT nul-terminated; the length is provided in
+   the value_length argument. Since it is legal to have zero-length
+   values, do not use this argument to test for internal entities.
+
+   For external entities, value will be NULL and systemId will be
+   non-NULL. The publicId argument will be NULL unless a public
+   identifier was provided. The notationName argument will have a
+   non-NULL value only for unparsed entity declarations.
+
+   Note that is_parameter_entity can't be changed to XML_Bool, since
+   that would break binary compatibility.
+*/
+typedef void (*XML_EntityDeclHandler) (void *userData,
+                                       const XML_Char *entityName,
+                                       int is_parameter_entity,
+                                       const XML_Char *value,
+                                       int value_length,
+                                       const XML_Char *base,
+                                       const XML_Char *systemId,
+                                       const XML_Char *publicId,
+                                       const XML_Char *notationName);
+
+XMLPARSEAPI(void)
+XML_SetEntityDeclHandler(XML_Parser parser,
+                         XML_EntityDeclHandler handler);
+
+/* OBSOLETE -- OBSOLETE -- OBSOLETE
+   This handler has been superceded by the EntityDeclHandler above.
+   It is provided here for backward compatibility.
+
+   This is called for a declaration of an unparsed (NDATA) entity.
+   The base argument is whatever was set by XML_SetBase. The
+   entityName, systemId and notationName arguments will never be
+   NULL. The other arguments may be.
+*/
+typedef void (*XML_UnparsedEntityDeclHandler)(void *userData,
+                                              const XML_Char *entityName,
+                                              const XML_Char *base,
+                                              const XML_Char *systemId,
+                                              const XML_Char *publicId,
+                                              const XML_Char *notationName);
+
+/* This is called for a declaration of notation.  The base argument is
+   whatever was set by XML_SetBase. The notationName will never be
+   NULL.  The other arguments can be.
+*/
+typedef void (*XML_NotationDeclHandler)(void *userData,
+                                        const XML_Char *notationName,
+                                        const XML_Char *base,
+                                        const XML_Char *systemId,
+                                        const XML_Char *publicId);
+
+/* When namespace processing is enabled, these are called once for
+   each namespace declaration. The call to the start and end element
+   handlers occur between the calls to the start and end namespace
+   declaration handlers. For an xmlns attribute, prefix will be
+   NULL.  For an xmlns="" attribute, uri will be NULL.
+*/
+typedef void (*XML_StartNamespaceDeclHandler)(void *userData,
+                                              const XML_Char *prefix,
+                                              const XML_Char *uri);
+
+typedef void (*XML_EndNamespaceDeclHandler)(void *userData,
+                                            const XML_Char *prefix);
+
+/* This is called if the document is not standalone, that is, it has an
+   external subset or a reference to a parameter entity, but does not
+   have standalone="yes". If this handler returns XML_STATUS_ERROR,
+   then processing will not continue, and the parser will return a
+   XML_ERROR_NOT_STANDALONE error.
+   If parameter entity parsing is enabled, then in addition to the
+   conditions above this handler will only be called if the referenced
+   entity was actually read.
+*/
+typedef int (*XML_NotStandaloneHandler)(void *userData);
+
+/* This is called for a reference to an external parsed general
+   entity.  The referenced entity is not automatically parsed.  The
+   application can parse it immediately or later using
+   XML_ExternalEntityParserCreate.
+
+   The parser argument is the parser parsing the entity containing the
+   reference; it can be passed as the parser argument to
+   XML_ExternalEntityParserCreate.  The systemId argument is the
+   system identifier as specified in the entity declaration; it will
+   not be NULL.
+
+   The base argument is the system identifier that should be used as
+   the base for resolving systemId if systemId was relative; this is
+   set by XML_SetBase; it may be NULL.
+
+   The publicId argument is the public identifier as specified in the
+   entity declaration, or NULL if none was specified; the whitespace
+   in the public identifier will have been normalized as required by
+   the XML spec.
+
+   The context argument specifies the parsing context in the format
+   expected by the context argument to XML_ExternalEntityParserCreate;
+   context is valid only until the handler returns, so if the
+   referenced entity is to be parsed later, it must be copied.
+   context is NULL only when the entity is a parameter entity.
+
+   The handler should return XML_STATUS_ERROR if processing should not
+   continue because of a fatal error in the handling of the external
+   entity.  In this case the calling parser will return an
+   XML_ERROR_EXTERNAL_ENTITY_HANDLING error.
+
+   Note that unlike other handlers the first argument is the parser,
+   not userData.
+*/
+typedef int (*XML_ExternalEntityRefHandler)(XML_Parser parser,
+                                            const XML_Char *context,
+                                            const XML_Char *base,
+                                            const XML_Char *systemId,
+                                            const XML_Char *publicId);
+
+/* This is called in two situations:
+   1) An entity reference is encountered for which no declaration
+      has been read *and* this is not an error.
+   2) An internal entity reference is read, but not expanded, because
+      XML_SetDefaultHandler has been called.
+   Note: skipped parameter entities in declarations and skipped general
+         entities in attribute values cannot be reported, because
+         the event would be out of sync with the reporting of the
+         declarations or attribute values
+*/
+typedef void (*XML_SkippedEntityHandler)(void *userData,
+                                         const XML_Char *entityName,
+                                         int is_parameter_entity);
+
+/* This structure is filled in by the XML_UnknownEncodingHandler to
+   provide information to the parser about encodings that are unknown
+   to the parser.
+
+   The map[b] member gives information about byte sequences whose
+   first byte is b.
+
+   If map[b] is c where c is >= 0, then b by itself encodes the
+   Unicode scalar value c.
+
+   If map[b] is -1, then the byte sequence is malformed.
+
+   If map[b] is -n, where n >= 2, then b is the first byte of an
+   n-byte sequence that encodes a single Unicode scalar value.
+
+   The data member will be passed as the first argument to the convert
+   function.
+
+   The convert function is used to convert multibyte sequences; s will
+   point to a n-byte sequence where map[(unsigned char)*s] == -n.  The
+   convert function must return the Unicode scalar value represented
+   by this byte sequence or -1 if the byte sequence is malformed.
+
+   The convert function may be NULL if the encoding is a single-byte
+   encoding, that is if map[b] >= -1 for all bytes b.
+
+   When the parser is finished with the encoding, then if release is
+   not NULL, it will call release passing it the data member; once
+   release has been called, the convert function will not be called
+   again.
+
+   Expat places certain restrictions on the encodings that are supported
+   using this mechanism.
+
+   1. Every ASCII character that can appear in a well-formed XML document,
+      other than the characters
+
+      $@\^`{}~
+
+      must be represented by a single byte, and that byte must be the
+      same byte that represents that character in ASCII.
+
+   2. No character may require more than 4 bytes to encode.
+
+   3. All characters encoded must have Unicode scalar values <=
+      0xFFFF, (i.e., characters that would be encoded by surrogates in
+      UTF-16 are  not allowed).  Note that this restriction doesn't
+      apply to the built-in support for UTF-8 and UTF-16.
+
+   4. No Unicode character may be encoded by more than one distinct
+      sequence of bytes.
+*/
+typedef struct {
+  int map[256];
+  void *data;
+  int (*convert)(void *data, const char *s);
+  void (*release)(void *data);
+} XML_Encoding;
+
+/* This is called for an encoding that is unknown to the parser.
+
+   The encodingHandlerData argument is that which was passed as the
+   second argument to XML_SetUnknownEncodingHandler.
+
+   The name argument gives the name of the encoding as specified in
+   the encoding declaration.
+
+   If the callback can provide information about the encoding, it must
+   fill in the XML_Encoding structure, and return XML_STATUS_OK.
+   Otherwise it must return XML_STATUS_ERROR.
+
+   If info does not describe a suitable encoding, then the parser will
+   return an XML_UNKNOWN_ENCODING error.
+*/
+typedef int (*XML_UnknownEncodingHandler)(void *encodingHandlerData,
+                                          const XML_Char *name,
+                                          XML_Encoding *info);
+
+XMLPARSEAPI(void)
+XML_SetElementHandler(XML_Parser parser,
+                      XML_StartElementHandler start,
+                      XML_EndElementHandler end);
+
+XMLPARSEAPI(void)
+XML_SetStartElementHandler(XML_Parser, XML_StartElementHandler);
+
+XMLPARSEAPI(void)
+XML_SetEndElementHandler(XML_Parser, XML_EndElementHandler);
+
+XMLPARSEAPI(void)
+XML_SetCharacterDataHandler(XML_Parser parser,
+                            XML_CharacterDataHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetProcessingInstructionHandler(XML_Parser parser,
+                                    XML_ProcessingInstructionHandler handler);
+XMLPARSEAPI(void)
+XML_SetCommentHandler(XML_Parser parser,
+                      XML_CommentHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetCdataSectionHandler(XML_Parser parser,
+                           XML_StartCdataSectionHandler start,
+                           XML_EndCdataSectionHandler end);
+
+XMLPARSEAPI(void)
+XML_SetStartCdataSectionHandler(XML_Parser parser,
+                                XML_StartCdataSectionHandler start);
+
+XMLPARSEAPI(void)
+XML_SetEndCdataSectionHandler(XML_Parser parser,
+                              XML_EndCdataSectionHandler end);
+
+/* This sets the default handler and also inhibits expansion of
+   internal entities. These entity references will be passed to the
+   default handler, or to the skipped entity handler, if one is set.
+*/
+XMLPARSEAPI(void)
+XML_SetDefaultHandler(XML_Parser parser,
+                      XML_DefaultHandler handler);
+
+/* This sets the default handler but does not inhibit expansion of
+   internal entities.  The entity reference will not be passed to the
+   default handler.
+*/
+XMLPARSEAPI(void)
+XML_SetDefaultHandlerExpand(XML_Parser parser,
+                            XML_DefaultHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetDoctypeDeclHandler(XML_Parser parser,
+                          XML_StartDoctypeDeclHandler start,
+                          XML_EndDoctypeDeclHandler end);
+
+XMLPARSEAPI(void)
+XML_SetStartDoctypeDeclHandler(XML_Parser parser,
+                               XML_StartDoctypeDeclHandler start);
+
+XMLPARSEAPI(void)
+XML_SetEndDoctypeDeclHandler(XML_Parser parser,
+                             XML_EndDoctypeDeclHandler end);
+
+XMLPARSEAPI(void)
+XML_SetUnparsedEntityDeclHandler(XML_Parser parser,
+                                 XML_UnparsedEntityDeclHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetNotationDeclHandler(XML_Parser parser,
+                           XML_NotationDeclHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetNamespaceDeclHandler(XML_Parser parser,
+                            XML_StartNamespaceDeclHandler start,
+                            XML_EndNamespaceDeclHandler end);
+
+XMLPARSEAPI(void)
+XML_SetStartNamespaceDeclHandler(XML_Parser parser,
+                                 XML_StartNamespaceDeclHandler start);
+
+XMLPARSEAPI(void)
+XML_SetEndNamespaceDeclHandler(XML_Parser parser,
+                               XML_EndNamespaceDeclHandler end);
+
+XMLPARSEAPI(void)
+XML_SetNotStandaloneHandler(XML_Parser parser,
+                            XML_NotStandaloneHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetExternalEntityRefHandler(XML_Parser parser,
+                                XML_ExternalEntityRefHandler handler);
+
+/* If a non-NULL value for arg is specified here, then it will be
+   passed as the first argument to the external entity ref handler
+   instead of the parser object.
+*/
+XMLPARSEAPI(void)
+XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg);
+
+XMLPARSEAPI(void)
+XML_SetSkippedEntityHandler(XML_Parser parser,
+                            XML_SkippedEntityHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetUnknownEncodingHandler(XML_Parser parser,
+                              XML_UnknownEncodingHandler handler,
+                              void *encodingHandlerData);
+
+/* This can be called within a handler for a start element, end
+   element, processing instruction or character data.  It causes the
+   corresponding markup to be passed to the default handler.
+*/
+XMLPARSEAPI(void)
+XML_DefaultCurrent(XML_Parser parser);
+
+/* If do_nst is non-zero, and namespace processing is in effect, and
+   a name has a prefix (i.e. an explicit namespace qualifier) then
+   that name is returned as a triplet in a single string separated by
+   the separator character specified when the parser was created: URI
+   + sep + local_name + sep + prefix.
+
+   If do_nst is zero, then namespace information is returned in the
+   default manner (URI + sep + local_name) whether or not the name
+   has a prefix.
+
+   Note: Calling XML_SetReturnNSTriplet after XML_Parse or
+     XML_ParseBuffer has no effect.
+*/
+
+XMLPARSEAPI(void)
+XML_SetReturnNSTriplet(XML_Parser parser, int do_nst);
+
+/* This value is passed as the userData argument to callbacks. */
+XMLPARSEAPI(void)
+XML_SetUserData(XML_Parser parser, void *userData);
+
+/* Returns the last value set by XML_SetUserData or NULL. */
+#define XML_GetUserData(parser) (*(void **)(parser))
+
+/* This is equivalent to supplying an encoding argument to
+   XML_ParserCreate. On success XML_SetEncoding returns non-zero,
+   zero otherwise.
+   Note: Calling XML_SetEncoding after XML_Parse or XML_ParseBuffer
+     has no effect and returns XML_STATUS_ERROR.
+*/
+XMLPARSEAPI(enum XML_Status)
+XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
+
+/* If this function is called, then the parser will be passed as the
+   first argument to callbacks instead of userData.  The userData will
+   still be accessible using XML_GetUserData.
+*/
+XMLPARSEAPI(void)
+XML_UseParserAsHandlerArg(XML_Parser parser);
+
+/* If useDTD == XML_TRUE is passed to this function, then the parser
+   will assume that there is an external subset, even if none is
+   specified in the document. In such a case the parser will call the
+   externalEntityRefHandler with a value of NULL for the systemId
+   argument (the publicId and context arguments will be NULL as well).
+   Note: If this function is called, then this must be done before
+     the first call to XML_Parse or XML_ParseBuffer, since it will
+     have no effect after that.  Returns
+     XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING.
+   Note: If the document does not have a DOCTYPE declaration at all,
+     then startDoctypeDeclHandler and endDoctypeDeclHandler will not
+     be called, despite an external subset being parsed.
+   Note: If XML_DTD is not defined when Expat is compiled, returns
+     XML_ERROR_FEATURE_REQUIRES_XML_DTD.
+*/
+XMLPARSEAPI(enum XML_Error)
+XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);
+
+
+/* Sets the base to be used for resolving relative URIs in system
+   identifiers in declarations.  Resolving relative identifiers is
+   left to the application: this value will be passed through as the
+   base argument to the XML_ExternalEntityRefHandler,
+   XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base
+   argument will be copied.  Returns XML_STATUS_ERROR if out of memory,
+   XML_STATUS_OK otherwise.
+*/
+XMLPARSEAPI(enum XML_Status)
+XML_SetBase(XML_Parser parser, const XML_Char *base);
+
+XMLPARSEAPI(const XML_Char *)
+XML_GetBase(XML_Parser parser);
+
+/* Returns the number of the attribute/value pairs passed in last call
+   to the XML_StartElementHandler that were specified in the start-tag
+   rather than defaulted. Each attribute/value pair counts as 2; thus
+   this correspondds to an index into the atts array passed to the
+   XML_StartElementHandler.
+*/
+XMLPARSEAPI(int)
+XML_GetSpecifiedAttributeCount(XML_Parser parser);
+
+/* Returns the index of the ID attribute passed in the last call to
+   XML_StartElementHandler, or -1 if there is no ID attribute.  Each
+   attribute/value pair counts as 2; thus this correspondds to an
+   index into the atts array passed to the XML_StartElementHandler.
+*/
+XMLPARSEAPI(int)
+XML_GetIdAttributeIndex(XML_Parser parser);
+
+/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
+   detected.  The last call to XML_Parse must have isFinal true; len
+   may be zero for this call (or any other).
+*/
+XMLPARSEAPI(enum XML_Status)
+XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
+
+XMLPARSEAPI(void *)
+XML_GetBuffer(XML_Parser parser, int len);
+
+XMLPARSEAPI(enum XML_Status)
+XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
+
+/* Creates an XML_Parser object that can parse an external general
+   entity; context is a '\0'-terminated string specifying the parse
+   context; encoding is a '\0'-terminated string giving the name of
+   the externally specified encoding, or NULL if there is no
+   externally specified encoding.  The context string consists of a
+   sequence of tokens separated by formfeeds (\f); a token consisting
+   of a name specifies that the general entity of the name is open; a
+   token of the form prefix=uri specifies the namespace for a
+   particular prefix; a token of the form =uri specifies the default
+   namespace.  This can be called at any point after the first call to
+   an ExternalEntityRefHandler so longer as the parser has not yet
+   been freed.  The new parser is completely independent and may
+   safely be used in a separate thread.  The handlers and userData are
+   initialized from the parser argument.  Returns NULL if out of memory.
+   Otherwise returns a new XML_Parser object.
+*/
+XMLPARSEAPI(XML_Parser)
+XML_ExternalEntityParserCreate(XML_Parser parser,
+                               const XML_Char *context,
+                               const XML_Char *encoding);
+
+enum XML_ParamEntityParsing {
+  XML_PARAM_ENTITY_PARSING_NEVER,
+  XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE,
+  XML_PARAM_ENTITY_PARSING_ALWAYS
+};
+
+/* Controls parsing of parameter entities (including the external DTD
+   subset). If parsing of parameter entities is enabled, then
+   references to external parameter entities (including the external
+   DTD subset) will be passed to the handler set with
+   XML_SetExternalEntityRefHandler.  The context passed will be 0.
+
+   Unlike external general entities, external parameter entities can
+   only be parsed synchronously.  If the external parameter entity is
+   to be parsed, it must be parsed during the call to the external
+   entity ref handler: the complete sequence of
+   XML_ExternalEntityParserCreate, XML_Parse/XML_ParseBuffer and
+   XML_ParserFree calls must be made during this call.  After
+   XML_ExternalEntityParserCreate has been called to create the parser
+   for the external parameter entity (context must be 0 for this
+   call), it is illegal to make any calls on the old parser until
+   XML_ParserFree has been called on the newly created parser.
+   If the library has been compiled without support for parameter
+   entity parsing (ie without XML_DTD being defined), then
+   XML_SetParamEntityParsing will return 0 if parsing of parameter
+   entities is requested; otherwise it will return non-zero.
+   Note: If XML_SetParamEntityParsing is called after XML_Parse or
+      XML_ParseBuffer, then it has no effect and will always return 0.
+*/
+XMLPARSEAPI(int)
+XML_SetParamEntityParsing(XML_Parser parser,
+                          enum XML_ParamEntityParsing parsing);
+
+/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
+   XML_GetErrorCode returns information about the error.
+*/
+XMLPARSEAPI(enum XML_Error)
+XML_GetErrorCode(XML_Parser parser);
+
+/* These functions return information about the current parse
+   location.  They may be called from any callback called to report
+   some parse event; in this case the location is the location of
+   the first of the sequence of characters that generated the event.
+
+   They may also be called after returning from a call to XML_Parse
+   or XML_ParseBuffer.  If the return value is XML_STATUS_ERROR then
+   the location is the location of the character at which the error
+   was detected; otherwise the location is the location of the last
+   parse event, as described above.
+*/
+XMLPARSEAPI(int) XML_GetCurrentLineNumber(XML_Parser parser);
+XMLPARSEAPI(int) XML_GetCurrentColumnNumber(XML_Parser parser);
+XMLPARSEAPI(long) XML_GetCurrentByteIndex(XML_Parser parser);
+
+/* Return the number of bytes in the current event.
+   Returns 0 if the event is in an internal entity.
+*/
+XMLPARSEAPI(int)
+XML_GetCurrentByteCount(XML_Parser parser);
+
+/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets
+   the integer pointed to by offset to the offset within this buffer
+   of the current parse position, and sets the integer pointed to by size
+   to the size of this buffer (the number of input bytes). Otherwise
+   returns a NULL pointer. Also returns a NULL pointer if a parse isn't
+   active.
+
+   NOTE: The character pointer returned should not be used outside
+   the handler that makes the call.
+*/
+XMLPARSEAPI(const char *)
+XML_GetInputContext(XML_Parser parser,
+                    int *offset,
+                    int *size);
+
+/* For backwards compatibility with previous versions. */
+#define XML_GetErrorLineNumber   XML_GetCurrentLineNumber
+#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber
+#define XML_GetErrorByteIndex    XML_GetCurrentByteIndex
+
+/* Frees the content model passed to the element declaration handler */
+XMLPARSEAPI(void)
+XML_FreeContentModel(XML_Parser parser, XML_Content *model);
+
+/* Exposing the memory handling functions used in Expat */
+XMLPARSEAPI(void *)
+XML_MemMalloc(XML_Parser parser, size_t size);
+
+XMLPARSEAPI(void *)
+XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
+
+XMLPARSEAPI(void)
+XML_MemFree(XML_Parser parser, void *ptr);
+
+/* Frees memory used by the parser. */
+XMLPARSEAPI(void)
+XML_ParserFree(XML_Parser parser);
+
+/* Returns a string describing the error. */
+XMLPARSEAPI(const XML_LChar *)
+XML_ErrorString(enum XML_Error code);
+
+/* Return a string containing the version number of this expat */
+XMLPARSEAPI(const XML_LChar *)
+XML_ExpatVersion(void);
+
+typedef struct {
+  int major;
+  int minor;
+  int micro;
+} XML_Expat_Version;
+
+/* Return an XML_Expat_Version structure containing numeric version
+   number information for this version of expat.
+*/
+XMLPARSEAPI(XML_Expat_Version)
+XML_ExpatVersionInfo(void);
+
+/* Added in Expat 1.95.5. */
+enum XML_FeatureEnum {
+  XML_FEATURE_END = 0,
+  XML_FEATURE_UNICODE,
+  XML_FEATURE_UNICODE_WCHAR_T,
+  XML_FEATURE_DTD,
+  XML_FEATURE_CONTEXT_BYTES,
+  XML_FEATURE_MIN_SIZE,
+  XML_FEATURE_SIZEOF_XML_CHAR,
+  XML_FEATURE_SIZEOF_XML_LCHAR
+  /* Additional features must be added to the end of this enum. */
+};
+
+typedef struct {
+  enum XML_FeatureEnum  feature;
+  const XML_LChar       *name;
+  long int              value;
+} XML_Feature;
+
+XMLPARSEAPI(const XML_Feature *)
+XML_GetFeatureList(void);
+
+
+/* Expat follows the GNU/Linux convention of odd number minor version for
+   beta/development releases and even number minor version for stable
+   releases. Micro is bumped with each release, and set to 0 with each
+   change to major or minor version.
+*/
+#define XML_MAJOR_VERSION 1
+#define XML_MINOR_VERSION 95
+#define XML_MICRO_VERSION 6
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not XmlParse_INCLUDED */
diff --git a/mac/lib/libexpat.a b/mac/lib/libexpat.a
new file mode 100644 (file)
index 0000000..bca49f6
Binary files /dev/null and b/mac/lib/libexpat.a differ
index 017ed87ed47cbf4db1439d20f13c31dcad9094de..0d822aee1a83f9e7d5d5a88fd5874e50715a3202 100644 (file)
                6AC682E309C45A8F0081607C /* AppleScriptKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA206CF1015C4E2903C91932 /* AppleScriptKit.framework */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXBuildStyle section */
-               4A9504CCFFE6A4B311CA0CBA /* Development */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = NO;
-                               GCC_DYNAMIC_NO_PIC = NO;
-                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
-                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-                               GCC_OPTIMIZATION_LEVEL = 0;
-                               OPTIMIZATION_CFLAGS = "-O0";
-                               ZERO_LINK = YES;
-                       };
-                       name = Development;
-               };
-               4A9504CDFFE6A4B311CA0CBA /* Deployment */ = {
-                       isa = PBXBuildStyle;
-                       buildSettings = {
-                               COPY_PHASE_STRIP = YES;
-                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
-                               OTHER_OSAFLAGS = "-x";
-                               ZERO_LINK = NO;
-                       };
-                       name = Deployment;
-               };
-/* End PBXBuildStyle section */
-
 /* Begin PBXFileReference section */
                089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
                1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
                        );
                        buildRules = (
                        );
-                       buildSettings = {
-                               FRAMEWORK_SEARCH_PATHS = "";
-                               HEADER_SEARCH_PATHS = "";
-                               INSTALL_PATH = "$(HOME)/Applications";
-                               LIBRARY_SEARCH_PATHS = /Users/jeremya/Dev/MacGPSBabel;
-                               OTHER_CFLAGS = "";
-                               OTHER_LDFLAGS = "";
-                               PRODUCT_NAME = MacGPSBabel;
-                               SECTORDER_FLAGS = "";
-                               WARNING_CFLAGS = (
-                                       "-Wmost",
-                                       "-Wno-four-char-constants",
-                                       "-Wno-unknown-pragmas",
-                               );
-                               WRAPPER_EXTENSION = app;
-                       };
                        dependencies = (
                        );
                        name = MacGPSBabel;
                29B97313FDCFA39411CA2CEA /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 6AC6829D09C44F090081607C /* Build configuration list for PBXProject "MacGPSBabel" */;
-                       buildSettings = {
-                       };
-                       buildStyles = (
-                               4A9504CCFFE6A4B311CA0CBA /* Development */,
-                               4A9504CDFFE6A4B311CA0CBA /* Deployment */,
-                       );
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        mainGroup = 29B97314FDCFA39411CA2CEA /* Application */;
                        projectDirPath = "";
+                       projectRoot = "";
                        targets = (
                                6AC682D509C45A8F0081607C /* MacGPSBabel */,
                        );
index a86cc6ba12e15fb206efd9f191380fae17da97e6..57e4fb5df843f77eef5b4096c7f981507e9171b5 100644 (file)
--- a/maggeo.c
+++ b/maggeo.c
 /* Turn this on (remove) after 5.2 becomes widespread. */
 #define FIRMWARE_DOES_88591 0          
 
-static FILE *maggeofile_in;
-static FILE *maggeofile_out;
+static gbfile *maggeofile_in;
+static gbfile *maggeofile_out;
 static short_handle desc_handle = NULL;
 
 static void
 maggeo_writemsg(const char * const buf)
 {
        unsigned int osum = mag_checksum(buf);
-       fprintf(maggeofile_out, "$%s*%02X\r\n",buf, osum);
+       gbfprintf(maggeofile_out, "$%s*%02X\r\n",buf, osum);
 }
 
 static void
 maggeo_rd_init(const char *fname)
 {
-       maggeofile_in = xfopen(fname, "rb", MYNAME);
+       maggeofile_in = gbfopen(fname, "rb", MYNAME);
 }
 
 static void
 maggeo_rd_deinit(void)
 {
-        fclose(maggeofile_in);
+        gbfclose(maggeofile_in);
 }
 
 static void
@@ -58,7 +58,7 @@ maggeo_wr_init(const char *fname)
        if (waypt_count() > 200) {
                fatal(MYNAME ": eXplorist does not support more than 200 waypoints in one .gs file.\nDecrease the number of waypoints sent.\n");
        }
-       maggeofile_out = xfopen(fname, "wb", MYNAME);
+       maggeofile_out = gbfopen(fname, "wb", MYNAME);
        desc_handle = mkshort_new_handle();
        setshort_length(desc_handle, 20);
        setshort_badchars(desc_handle, "\"$,");
@@ -69,7 +69,7 @@ maggeo_wr_deinit(void)
 {
        maggeo_writemsg("PMGNCMD,END");
        mkshort_del_handle(&desc_handle);
-       fclose(maggeofile_out);
+       gbfclose(maggeofile_out);
 }
 
 static void
index 2ada5e14a65a6a9fc226cd117cfd9accbf1c4316..ae4187b0dfc33d56597aa2b7276eaea807c8ffa0 100644 (file)
@@ -1,7 +1,7 @@
 /*
     Communicate Thales/Magellan serial protocol.
 
-    Copyright (C) 2002, 2003, 2004, 2005, 2006 Robert Lipe, robertlipe@usa.net
+    Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Robert Lipe, robertlipe@usa.net
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -30,6 +30,7 @@ static int bitrate = 4800;
 static int wptcmtcnt;
 static int wptcmtcnt_max;
 static int explorist;
+static int broken_sportrak;
 #define MYNAME "MAGPROTO"
 #define MAXCMTCT 200
 
@@ -88,7 +89,7 @@ typedef struct mag_rte_head {
 
 static queue rte_wpt_tmp; /* temporary PGMNWPL msgs for routes */
 
-static FILE *magfile_h;
+static gbfile *magfile_h;
 static mag_rxstate magrxstate;
 static int mag_error;
 static unsigned int last_rx_csum;
@@ -369,6 +370,11 @@ mag_verparse(char *ibuf)
                        break;
                }
        }
+
+       if (prodid == 37) {
+               broken_sportrak = 1;
+       }
+
        switch (pp->model) {
                case mm_gps315320:
                case mm_map410:
@@ -527,7 +533,7 @@ retry:
                ignore_unable = 0;
                return;
        }
-       if (IS_TKN("$PMGNCMD,END") || (is_file && (feof(magfile_h)))) {
+       if (IS_TKN("$PMGNCMD,END") || (is_file && (gbfeof(magfile_h)))) {
                found_done = 1;
                return;
        } 
@@ -556,7 +562,7 @@ terminit(const char *portname, int create_ok)
                return 1;
        } else {
                /* Does this check for an error? */
-               magfile_h = xfopen(portname, create_ok ? "w+b" : "rb", MYNAME);
+               magfile_h = gbfopen(portname, create_ok ? "w+b" : "rb", MYNAME);
                is_file = 1;
                icon_mapping = map330_icon_table;
                mag_cleanse = m330_cleanse;
@@ -568,7 +574,7 @@ terminit(const char *portname, int create_ok)
 static char *termread(char *ibuf, int size) 
 {
        if (is_file) {
-               return fgets(ibuf, size, magfile_h);
+               return gbfgets(ibuf, size, magfile_h);
        } else {
                int rc;
                rc = gbser_read_line(serial_handle, ibuf, size, 2000, 0x0a, 0x0d);
@@ -627,7 +633,7 @@ termwrite(char *obuf, int size)
 {
        if (is_file) {
                size_t nw;
-               if (nw = fwrite(obuf, 1, size, magfile_h), nw < (size_t) size) {
+               if (nw = gbfwrite(obuf, 1, size, magfile_h), nw < (size_t) size) {
                        fatal(MYNAME ": Write error");
                }
        } else {
@@ -641,7 +647,7 @@ termwrite(char *obuf, int size)
 static void termdeinit() 
 {
        if (is_file) {
-               fclose(magfile_h);
+               gbfclose(magfile_h);
                magfile_h = NULL;
        } else {
                gbser_deinit(serial_handle);
@@ -799,6 +805,10 @@ mag_wr_init_common(const char *portname)
                bitrate=atoi(bs);
        }
 
+       if (waypt_count() > 500) {
+               fatal(MYNAME ": Meridian/Explorist does not support more than 500 waypoints in one file. Only\n200 waypoints may have comments.\nDecrease the number of waypoints sent.\n");
+       }
+
        if (cmts) {
                wptcmtcnt_max = atoi(cmts);
        } else {
@@ -1027,6 +1037,20 @@ mag_rteparse(char *rtemsg)
                rte_elem->wpt_icon = xstrdup(abuf);
 
                ENQUEUE_TAIL(&mag_rte_head->Q, &rte_elem->Q);
+
+               /* Sportrak (the non-mapping unit) creates malformed
+                * RTE sentence with no icon info after the routepoint
+                * name.  So if we saw an "icon" treat that as new 
+                * routepoint.
+                */
+               if (broken_sportrak && abuf[0]) {
+                       rte_elem = xcalloc(sizeof (*rte_elem),1);
+                       QUEUE_INIT(&rte_elem->Q);
+                       rte_elem->wpt_name = xstrdup(abuf);
+
+                       ENQUEUE_TAIL(&mag_rte_head->Q, &rte_elem->Q);
+               }
+
                next_stop[0] = 0;
                currtemsg += n;
        }
@@ -1415,6 +1439,9 @@ mag_route_trl(const route_head * rte)
                        pbuff = buff2;
 
                owpt = waypointp->shortname;
+               if (strlen(owpt) > sizeof(buff1) - 3) {
+                       owpt[sizeof(buff1) - 3] = 0;
+               }
                owpt = mag_cleanse(owpt);
 
                sprintf(pbuff, "%s,%s", owpt, icon_token);
diff --git a/main.c b/main.c
index fc31c69d644237f446dff82c8007046af380560d..6e338ce07f41ef43e0d68bccacce64c1b73368a4 100644 (file)
--- a/main.c
+++ b/main.c
@@ -123,8 +123,8 @@ usage(const char *pname, int shorter )
                        gpsbabel_version );
        printf(
 "Usage:\n"
-"    %s [options] -i INTYPE -f INFILE -o OUTTYPE -F OUTFILE\n"
-"    %s [options] -i INTYPE -o OUTTYPE INFILE [OUTFILE]\n"
+"    %s [options] -i INTYPE -f INFILE [filter] -o OUTTYPE -F OUTFILE\n"
+"    %s [options] -i INTYPE -o OUTTYPE INFILE [filter] OUTFILE\n"
 "\n"
 "    Converts GPS route and waypoint data from one format type to another.\n"
 "    The input type and filename are specified with the -i INTYPE\n"
@@ -150,7 +150,7 @@ usage(const char *pname, int shorter )
 "    -b               Process command file (batch mode)\n"
 "    -c               Character set for next operation\n"
 "    -N               No smart icons on output\n"
-"    -x filtername    Invoke filter (place between inputs and output) \n"
+"    -x filtername    Invoke filter (placed between inputs and output) \n"
 "    -D level         Set debug level [%d]\n"
 "    -l               Print GPSBabel builtin character sets and exit\n"
 "    -h, -?           Print detailed help and exit\n"
@@ -671,6 +671,7 @@ main(int argc, char *argv[])
                if (ovecs->position_ops.wr_deinit) {
                        ovecs->position_ops.wr_deinit();
                }
+               exit(0);
        }
 
 
index b7910bf561117387b4b8d57a4bb0eae37679546a..ab91003a6bdf783d17a5d46fabd662b88cfe3663 100644 (file)
--- a/mapsend.c
+++ b/mapsend.c
@@ -505,8 +505,8 @@ static void
 mapsend_wpt_write(void)
 {
        mapsend_hdr hdr = {13, {"4D533330 MS"}, {"30"}, ms_type_wpt, {0, 0, 0}};
-       int wpt_count = waypt_count();
        int n = 0;
+       int wpt_count = waypt_count();
        
        if (global_opts.objective == trkdata) {
                mapsend_track_write();
index c5d4e37135b3323dd17a69dc8864fd0f15fb951e..182456a924ae3d8113f7b623af1a41a8d8f7556e 100644 (file)
@@ -29,9 +29,9 @@
 #include "jeeps/gpsmath.h"
 #include <ctype.h>
 
-static FILE    *mps_file_in;
-static FILE    *mps_file_out;
-static FILE    *mps_file_temp;
+static gbfile  *mps_file_in;
+static gbfile  *mps_file_out;
+static gbfile  *mps_file_temp;
 static short_handle mkshort_handle;
 
 static int             mps_ver_in = 0;
@@ -66,6 +66,7 @@ static short_handle read_route_wpt_mkshort_handle;
 #define MPSNOTESBUFFERLEN      4096
 #define MPSDESCBUFFERLEN       4096
 
+
 char *snlen = NULL;
 char *snwhiteopt = NULL;
 char *mpsverout = NULL;
@@ -93,26 +94,6 @@ arglist_t mps_args[] = {
        ARG_TERMINATOR
 };
 
-/*
- * A wrapper to ensure the doubles we fwrite are in correct endianness.
- */
-
-static void
-le_fwrite_double(double d, FILE *stream)
-{
-       unsigned char cbuf[8];
-       le_write_double(cbuf,d);
-       fwrite(cbuf, 8, 1, stream);
-}
-
-static double
-le_fread_double( FILE *stream)
-{
-       unsigned char cbuf[8];
-       fread(cbuf, 8, 1, stream);
-       return le_read_double(cbuf);
-}
-
 static void 
 mps_noop(const route_head *wp)
 {
@@ -214,7 +195,7 @@ mps_converted_icon_number(const int icon_num, const int mpsver, garmin_formats_e
 static void
 mps_rd_init(const char *fname)
 {
-       mps_file_in = xfopen(fname, "rb", MYNAME);
+       mps_file_in = gbfopen_le(fname, "rb", MYNAME);
 
        read_route_wpt_mkshort_handle = mkshort_new_handle();
        /* initialise the "private" queue of waypoints read for routes */
@@ -224,7 +205,7 @@ mps_rd_init(const char *fname)
 static void
 mps_rd_deinit(void)
 {
-       fclose(mps_file_in);
+       gbfclose(mps_file_in);
        if ( read_route_wpt_mkshort_handle ) {
                mkshort_del_handle( &read_route_wpt_mkshort_handle );
        }
@@ -241,12 +222,12 @@ mps_wr_init(const char *fname)
        }
 
        if (mpsmergeout) {
-               mps_file_out = xfopen(fname, "rb", MYNAME);
+               mps_file_out = gbfopen_le(fname, "rb", MYNAME);
                if (mps_file_out == NULL) {
                        mpsmergeout = 0;
                }
                else {
-                       fclose(mps_file_out);
+                       gbfclose(mps_file_out);
                        srand((unsigned) current_time());
 
                        for (;;) {
@@ -254,16 +235,16 @@ mps_wr_init(const char *fname)
                                /* then test if it already exists, if so try again with another rand num */
                                /* yeah, yeah, so there's probably a library function for this           */
                                xasprintf(&tempname, "%s.%08x", fname, rand());
-                               mps_file_temp = fopen(tempname, "rb");
+                               mps_file_temp = gbfopen_le(tempname, "rb", MYNAME);
                                if (mps_file_temp == NULL) break;
-                               fclose(mps_file_temp);
+                               gbfclose(mps_file_temp);
                        }
                        rename(fname, tempname);
-                       mps_file_temp = xfopen(tempname, "rb", MYNAME);
+                       mps_file_temp = gbfopen_le(tempname, "rb", MYNAME);
                }
        }
 
-       mps_file_out = xfopen(fname, "wb", MYNAME);
+       mps_file_out = gbfopen_le(fname, "wb", MYNAME);
 
        written_wpt_mkshort_handle = mkshort_new_handle();
        /* initialise the "private" queue of waypoints written */
@@ -274,10 +255,10 @@ mps_wr_init(const char *fname)
 static void
 mps_wr_deinit(void)
 {
-       fclose(mps_file_out);
+       gbfclose(mps_file_out);
 
        if (mpsmergeout) {
-               fclose(mps_file_temp);
+               gbfclose(mps_file_temp);
                remove(tempname);
                xfree(tempname);
        }
@@ -296,10 +277,10 @@ mps_wr_deinit(void)
  * and write into buf.
  */
 static void
-mps_readstr(FILE *mps_file, char *buf, size_t sz)
+mps_readstr(gbfile *mps_file, char *buf, size_t sz)
 {
        int c;
-       while (sz-- && (c = fgetc (mps_file)) != EOF) {
+       while (sz-- && (c = gbfgetc (mps_file)) != EOF) {
                *buf++ = c;
                if (c == 0)  {
                        return;
@@ -312,7 +293,7 @@ mps_readstr(FILE *mps_file, char *buf, size_t sz)
  * MRCB
  */
 static void
-mps_fileHeader_r(FILE *mps_file, int *mps_ver)
+mps_fileHeader_r(gbfile *mps_file, int *mps_ver)
 {
        char hdr[100];
        int reclen;
@@ -322,10 +303,9 @@ mps_fileHeader_r(FILE *mps_file, int *mps_ver)
                fatal(MYNAME ": This doesn't look like a mapsource file.\n");
        }
        /* Read record length of "format details" section */
-       fread(&reclen, 4, 1, mps_file);
-       reclen = le_read32(&reclen);
+       reclen = gbfgetint32(mps_file);
        /* Read the "format details" in plus the trailing null */
-       fread( hdr, 3, 1, mps_file);
+       gbfread( hdr, 3, 1, mps_file);
        if (hdr[0] != 'D')  {
                /* No flag for the "data" section */
                fatal(MYNAME ": This doesn't look like a mapsource file.\n");
@@ -343,12 +323,11 @@ mps_fileHeader_r(FILE *mps_file, int *mps_ver)
                fatal(MYNAME ": Unsuppported version of mapsource file.\n");
        }
        /* Skip reliably over the "format details" section */
-       fseek( mps_file, reclen+1-3, SEEK_CUR); 
+       gbfseek( mps_file, reclen+1-3, SEEK_CUR); 
        /* Read record length of "program signature" section */
-       fread(&reclen, 4, 1, mps_file);
-       reclen = le_read32(&reclen);
+       reclen = gbfgetint32(mps_file);
        /* Skip reliably over the "program signature" section */
-       if (reclen >= 0) fseek(mps_file, reclen+1, SEEK_CUR); 
+       if (reclen >= 0) gbfseek(mps_file, reclen+1, SEEK_CUR); 
 }
 
 /*
@@ -356,17 +335,17 @@ mps_fileHeader_r(FILE *mps_file, int *mps_ver)
  * MRCB
  */
 static void
-mps_fileHeader_w(FILE *mps_file, int mps_ver)
+mps_fileHeader_w(gbfile *mps_file, int mps_ver)
 {
        char hdr[100];
        int reclen;
 
        strcpy (hdr, "MsRc");
-       fwrite(hdr, 4, 1, mps_file);
+       gbfwrite(hdr, 4, 1, mps_file);
 
        /* Between versions 3 & 5 this value is 'd', but might change in the future */
        strcpy(hdr, "d");
-       fwrite(hdr, 2, 1, mps_file);    /* include trailing NULL char */
+       gbfwrite(hdr, 2, 1, mps_file);  /* include trailing NULL char */
 
        /* Start of a "Data" section */
        hdr[0] = 'D';
@@ -377,9 +356,8 @@ mps_fileHeader_w(FILE *mps_file, int mps_ver)
        hdr[2] = 0;
 
        reclen = 2;                                                     /* this is 3 byte record */
-       le_write32(&reclen, reclen);
-       fwrite(&reclen, 4, 1, mps_file);
-       fwrite(hdr, 3, 1, mps_file);            /* reclen + 1 */
+       gbfputint32(reclen, mps_file);
+       gbfwrite(hdr, 3, 1, mps_file);          /* reclen + 1 */
 
        hdr[0] = 'A';
        /* if (mps_ver == 3) */
@@ -402,9 +380,8 @@ mps_fileHeader_w(FILE *mps_file, int mps_ver)
        }
 
        reclen = 27;                                            /* pre measured! */
-       le_write32(&reclen, reclen);
-       fwrite(&reclen, 4, 1, mps_file);
-       fwrite(hdr, 28, 1, mps_file);           /* reclen + 1  - can't use this as reclen may be wrongendian now */
+       gbfputint32(reclen, mps_file);
+       gbfwrite(hdr, 28, 1, mps_file);         /* reclen + 1  - can't use this as reclen may be wrongendian now */
 }
 
 /*
@@ -412,30 +389,29 @@ mps_fileHeader_w(FILE *mps_file, int mps_ver)
  * MRCB
  */
 static void
-mps_mapsegment_r(FILE *mps_file, int mps_ver)
+mps_mapsegment_r(gbfile *mps_file, int mps_ver)
 {
        int reclen;
 
 #if 0
        /* At the moment we're not doing anything with map segments, but here's the template code as if we were */
        char hdr[100];
-       fread(&CDid, 4, 1, mps_file);
+       gbfread(&CDid, 4, 1, mps_file);
        reclen = le_read32(&CDid);
 
-       fread(&CDSegmentid, 4, 1, mps_file);
+       gbfread(&CDSegmentid, 4, 1, mps_file);
        reclen = le_read32(&CDSegmentid);
 
        mps_readstr(mps_file, CDName, sizeof(CDName));
        mps_readstr(mps_file, CDSegmentName, sizeof(CDSegmentName));
        mps_readstr(mps_file, CDAreaName, sizeof(CDAreaName));
 
-       fread(hdr, 4, 1, mps_file); /* trailing long value */
+       gbfread(hdr, 4, 1, mps_file); /* trailing long value */
 #endif 
        
-       fseek(mps_file, -5, SEEK_CUR);
-       fread(&reclen, 4, 1, mps_file);
-       reclen = le_read32(&reclen);
-       if (reclen >= 0) fseek( mps_file, reclen+1, SEEK_CUR); 
+       gbfseek(mps_file, -5, SEEK_CUR);
+       reclen = gbfgetint32(mps_file);
+       if (reclen >= 0) gbfseek( mps_file, reclen+1, SEEK_CUR); 
        return;
 }
 
@@ -446,7 +422,7 @@ mps_mapsegment_r(FILE *mps_file, int mps_ver)
  * MRCB
  */
 static void
-mps_mapsetname_r(FILE *mps_file, int mps_ver)
+mps_mapsetname_r(gbfile *mps_file, int mps_ver)
 {
        int reclen;
 
@@ -456,12 +432,11 @@ mps_mapsetname_r(FILE *mps_file, int mps_ver)
        char mapsetnamename[very large number?];
        strcpy(mapsetnamename,hdr);
        char mapsetnameAutonameFlag;
-       fread(&mapsetnameAutonameFlag, 1, 1, mps_file); */
+       gbfread(&mapsetnameAutonameFlag, 1, 1, mps_file); */
 
-       fseek(mps_file, -5, SEEK_CUR);
-       fread(&reclen, 4, 1, mps_file);
-       reclen = le_read32(&reclen);
-       fseek( mps_file, reclen+1, SEEK_CUR); 
+       gbfseek(mps_file, -5, SEEK_CUR);
+       reclen = gbfgetint32(mps_file);
+       gbfseek( mps_file, reclen+1, SEEK_CUR); 
        return;
 }
 
@@ -472,7 +447,7 @@ mps_mapsetname_r(FILE *mps_file, int mps_ver)
  * MRCB
  */
 static void
-mps_mapsetname_w(FILE *mps_file, int mps_ver)
+mps_mapsetname_w(gbfile *mps_file, int mps_ver)
 {
        char hdr[100];
        int reclen;
@@ -481,9 +456,8 @@ mps_mapsetname_w(FILE *mps_file, int mps_ver)
        hdr[1] = 0;             /* zero length null terminated string                   */
        hdr[2] = 1;             /* mapsetname autoname flag set to DO autoname  */
        reclen = 2;             /* three bytes of the V record                                  */
-       le_write32(&reclen, reclen);
-       fwrite(&reclen, 4, 1, mps_file);
-       fwrite(hdr, 3, 1, mps_file);            /* reclen + 1 */
+       gbfputint32(reclen, mps_file);
+       gbfwrite(hdr, 3, 1, mps_file);          /* reclen + 1 */
 }
 
 
@@ -492,12 +466,12 @@ mps_mapsetname_w(FILE *mps_file, int mps_ver)
  * MRCB
  */
 static void
-mps_waypoint_r(FILE *mps_file, int mps_ver, waypoint **wpt, unsigned int *mpsclass)
+mps_waypoint_r(gbfile *mps_file, int mps_ver, waypoint **wpt, unsigned int *mpsclass)
 {
        char tbuf[100];
        char wptname[MPSNAMEBUFFERLEN];
-       char wptdesc[MPSDESCBUFFERLEN];
-       char wptnotes[MPSNOTESBUFFERLEN];
+       char *wptdesc = NULL;
+       char *wptnotes = NULL;
        int lat;
        int lon;
        int     icon;
@@ -513,72 +487,65 @@ mps_waypoint_r(FILE *mps_file, int mps_ver, waypoint **wpt, unsigned int *mpscla
 
        mps_readstr(mps_file, wptname, sizeof(wptname));
 
-       fread(mpsclass, 4, 1, mps_file);                        /* class */
-       (*mpsclass) = le_read32(mpsclass);
+       (*mpsclass) = gbfgetint32(mps_file);                    /* class */
        mps_readstr(mps_file, tbuf, sizeof(tbuf));      /* country */
 
-       fread(tbuf,17, 1, mps_file);                            /* subclass data (17) */
+       gbfread(tbuf,17, 1, mps_file);                          /* subclass data (17) */
 
        if ((mps_ver == 4) || (mps_ver == 5)) {
-               fread(tbuf, 5, 1, mps_file);                    /* additional subclass data (1) & terminator? (4) */
+               gbfread(tbuf, 5, 1, mps_file);                  /* additional subclass data (1) & terminator? (4) */
        }
 
-       fread(&lat, 4, 1, mps_file); 
-       fread(&lon, 4, 1, mps_file); 
-       lat = le_read32(&lat);
-       lon = le_read32(&lon);
+       lat = gbfgetint32(mps_file); 
+       lon = gbfgetint32(mps_file); 
        
-       fread(tbuf, 1, 1, mps_file);                            /* altitude validity */
-       if (tbuf[0] == 1) {
-               mps_altitude = le_fread_double(mps_file);
+       if (gbfgetc(mps_file) == 1) {                           /* altitude validity */
+               mps_altitude = gbfgetdbl(mps_file);
        }
        else {
                mps_altitude = unknown_alt;
-               fseek( mps_file, 8, SEEK_CUR );
+               gbfseek( mps_file, 8, SEEK_CUR );
        }
 
-       mps_readstr(mps_file, wptdesc, sizeof(wptdesc));
+       wptdesc = gbfgetcstr(mps_file);
 
-       fread(tbuf, 1, 1, mps_file);                            /* proximity validity */
-       if (tbuf[0] == 1) {
-               mps_proximity = le_fread_double(mps_file);
+       if (gbfgetc(mps_file) == 1) {                           /* proximity validity */
+               mps_proximity = gbfgetdbl(mps_file);
        }
        else {
                mps_proximity = unknown_alt;
-               fseek( mps_file, 8, SEEK_CUR );
+               gbfseek( mps_file, 8, SEEK_CUR );
        }
 
-       fread(tbuf, 4, 1, mps_file);                                    /* display flag */
-       fread(tbuf, 4, 1, mps_file);                                    /* colour */
-       fread(&icon, 4, 1, mps_file);                                   /* display symbol */
-       icon = le_read32(&icon);
+       (void) gbfgetint32(mps_file);                                   /* display flag */
+       (void) gbfgetint32(mps_file);                                   /* colour */
+       icon = gbfgetint32(mps_file);                                   /* display symbol */
 
        mps_readstr(mps_file, tbuf, sizeof(tbuf));              /* city */
        mps_readstr(mps_file, tbuf, sizeof(tbuf));              /* state */
        mps_readstr(mps_file, tbuf, sizeof(tbuf));              /*facility */
 
-       fread(tbuf, 1, 1, mps_file);                                    /* unknown */
+       gbfread(tbuf, 1, 1, mps_file);                                  /* unknown */
 
-       fread(tbuf, 1, 1, mps_file);                                    /* depth validity */
-       if (tbuf[0] == 1) {
-               mps_depth = le_fread_double( mps_file );
+       if (gbfgetc(mps_file) == 1) {                                   /* depth validity */
+               mps_depth = gbfgetdbl( mps_file );
        }
        else {
                mps_depth = unknown_alt;
-               fseek( mps_file, 8, SEEK_CUR );
+               (void) gbfseek( mps_file, 8, SEEK_CUR );
        }
 
        if ((mps_ver == 4) || (mps_ver == 5)) {
-               fread(tbuf, 6, 1, mps_file);                            /* unknown */
-               mps_readstr(mps_file, wptnotes, sizeof(wptnotes));
+               gbfread(tbuf, 6, 1, mps_file);                          /* unknown */
+               wptnotes = gbfgetcstr(mps_file);
        }
        else {
-               fread(tbuf, 2, 1, mps_file);                            /* unknown */
+               gbfread(tbuf, 2, 1, mps_file);                          /* unknown */
        }
 
        thisWaypoint->shortname = xstrdup(wptname);
-       thisWaypoint->description = xstrdup(wptdesc);
-       thisWaypoint->notes = xstrdup(wptnotes);
+       thisWaypoint->description = wptdesc;
+       thisWaypoint->notes = wptnotes;
        thisWaypoint->latitude = GPS_Math_Semi_To_Deg(lat);
        thisWaypoint->longitude = GPS_Math_Semi_To_Deg(lon);
        thisWaypoint->altitude = mps_altitude;
@@ -601,9 +568,8 @@ mps_waypoint_r(FILE *mps_file, int mps_ver, waypoint **wpt, unsigned int *mpscla
  * MRCB
  */
 static void
-mps_waypoint_w(FILE *mps_file, int mps_ver, const waypoint *wpt, const int isRouteWpt)
+mps_waypoint_w(gbfile *mps_file, int mps_ver, const waypoint *wpt, const int isRouteWpt)
 {
-       unsigned char hdr[100];
        int reclen;
        int lat, lon;
        int icon;
@@ -663,85 +629,74 @@ mps_waypoint_w(FILE *mps_file, int mps_ver, const waypoint *wpt, const int isRou
                                                                        /* -1 as reclen is interpreted from zero meaning a reclength of one */
        }
 
-       le_write32(&reclen, reclen);
-       fwrite(&reclen, 4, 1, mps_file);
-       fwrite("W", 1, 1, mps_file);
-       fputs(ident, mps_file);
-       fwrite(zbuf, 1, 1, mps_file);           /* NULL termination to ident */
+       gbfputint32(reclen, mps_file);
+       gbfwrite("W", 1, 1, mps_file);
+       gbfputs(ident, mps_file);
+       gbfwrite(zbuf, 1, 1, mps_file);         /* NULL termination to ident */
 
        if (isRouteWpt) zbuf[0] = (char)MPSHIDDENROUTEWPTCLASS;
        else                    zbuf[0] = (char)MPSDEFAULTWPTCLASS;
-       fwrite(zbuf, 4, 1, mps_file);           /* class */
+       gbfwrite(zbuf, 4, 1, mps_file);         /* class */
 
        zbuf[0]=0;
-       fwrite(zbuf, 1, 1, mps_file);           /* country empty string */
+       gbfwrite(zbuf, 1, 1, mps_file);         /* country empty string */
 
        if ((mps_ver == 4) || (mps_ver == 5)) {
-               fwrite(zbuf, 4, 1, mps_file);   /* subclass part 1 */
-               fwrite(ffbuf, 12, 1, mps_file); /* subclass part 2 */
-               fwrite(zbuf, 2, 1, mps_file);   /* subclass part 3 */
-               fwrite(ffbuf, 4, 1, mps_file);  /* unknown */
+               gbfwrite(zbuf, 4, 1, mps_file); /* subclass part 1 */
+               gbfwrite(ffbuf, 12, 1, mps_file);       /* subclass part 2 */
+               gbfwrite(zbuf, 2, 1, mps_file); /* subclass part 3 */
+               gbfwrite(ffbuf, 4, 1, mps_file);        /* unknown */
        }
        else {
-               fwrite(zbuf, 8, 1, mps_file);
-               fwrite(ffbuf, 8, 1, mps_file);
-               fwrite(zbuf, 1, 1, mps_file);
+               gbfwrite(zbuf, 8, 1, mps_file);
+               gbfwrite(ffbuf, 8, 1, mps_file);
+               gbfwrite(zbuf, 1, 1, mps_file);
        }
 
-       le_write32(&lat, lat);
-       le_write32(&lon, lon);
-       fwrite(&lat, 4, 1, mps_file);
-       fwrite(&lon, 4, 1, mps_file);
+       gbfputint32(lat, mps_file);
+       gbfputint32(lon, mps_file);
 
        if (mps_altitude == unknown_alt) {
-               fwrite(zbuf, 9, 1, mps_file);
+               gbfwrite(zbuf, 9, 1, mps_file);
        }
        else {
-               hdr[0] = 1;
-               fwrite(hdr, 1 , 1, mps_file);
-               le_fwrite_double( mps_altitude, mps_file );
+               gbfputc(1, mps_file);
+               gbfputdbl(mps_altitude, mps_file);
        }
-       if (wpt->description) fputs(ascii_description, mps_file);
-       fwrite(zbuf, 1, 1, mps_file);   /* NULL termination */
+       if (wpt->description) gbfputs(ascii_description, mps_file);
+       gbfwrite(zbuf, 1, 1, mps_file); /* NULL termination */
        xfree(ascii_description);
        ascii_description = NULL;
 
        if (mps_proximity == unknown_alt) {
-               fwrite(zbuf, 9, 1, mps_file);
+               gbfwrite(zbuf, 9, 1, mps_file);
        }
        else {
-               hdr[0] = 1;
-               fwrite(hdr, 1 , 1, mps_file);
-               le_fwrite_double( mps_proximity, mps_file );
+               gbfputc(1, mps_file);
+               gbfputdbl( mps_proximity, mps_file );
        }
 
-       le_write32(&display, display);
-       fwrite(&display, 4, 1, mps_file);       /* Show waypoint w/ name */
-
-       le_write32(&colour, colour);
-       fwrite(&colour, 4, 1, mps_file);
+       gbfputint32(display, mps_file); /* Show waypoint w/ name */
+       gbfputint32(colour, mps_file);
+       gbfputint32(icon, mps_file);
 
-       le_write32(&icon, icon);
-       fwrite(&icon, 4, 1, mps_file);
+       gbfwrite(zbuf, 3, 1, mps_file);         /* city, state, facility */
 
-       fwrite(zbuf, 3, 1, mps_file);           /* city, state, facility */
-
-       fwrite(zbuf, 1, 1, mps_file);           /* unknown */
+       gbfwrite(zbuf, 1, 1, mps_file);         /* unknown */
 
        if (mps_depth == unknown_alt) {
-               fwrite(zbuf, 9, 1, mps_file);
+               gbfwrite(zbuf, 9, 1, mps_file);
        }
        else {
-               hdr[0] = 1;
-               fwrite(hdr, 1 , 1, mps_file);
-               le_fwrite_double(mps_depth, mps_file);
+               gbfputc(1, mps_file);
+               gbfputdbl(mps_depth, mps_file);
        }
 
-       fwrite(zbuf, 2, 1, mps_file);           /* unknown */
+       gbfwrite(zbuf, 2, 1, mps_file);         /* unknown */
        if ((mps_ver == 4) || (mps_ver == 5)) {
-               fwrite(zbuf, 4, 1, mps_file);   /* unknown */
-               if (wpt->notes) fputs(wpt->notes, mps_file);
-               fwrite(zbuf, 1, 1, mps_file);   /* string termination */
+               gbfwrite(zbuf, 4, 1, mps_file); /* unknown */
+               if (wpt->notes) gbfputs(wpt->notes, mps_file);
+               gbfwrite(zbuf, 1, 1, mps_file); /* string termination */
        }
 }
 
@@ -861,13 +816,13 @@ mps_waypoint_w_uniqloc_wrapper(waypoint *wpt)
  * MRCB
  */
 static void
-mps_route_r(FILE *mps_file, int mps_ver, route_head **rte)
+mps_route_r(gbfile *mps_file, int mps_ver, route_head **rte)
 {
        char tbuf[100];
-       char rtename[MPSNAMEBUFFERLEN];
+       char *rtename;
        char wptname[MPSNAMEBUFFERLEN];
-       int lat;
-       int lon;
+       int lat = 0;
+       int lon = 0;
        char rte_autoname;
        int     interlinkStepCount;
        int     thisInterlinkStep;
@@ -882,47 +837,40 @@ mps_route_r(FILE *mps_file, int mps_ver, route_head **rte)
        double  mps_altitude = unknown_alt;
        double  mps_depth = unknown_alt;
 
-       mps_readstr(mps_file, rtename, sizeof(rtename));
+       rtename = gbfgetcstr(mps_file);
 #ifdef MPS_DEBUG
        fprintf(stderr, "mps_route_r: reading route %s\n", rtename);
 #endif
 
-       fread(&rte_autoname, 1, 1, mps_file);   /* autoname flag */
+       gbfread(&rte_autoname, 1, 1, mps_file); /* autoname flag */
 
-       fread(tbuf, 1, 1, mps_file);            /* skip min/max values */
+       gbfread(tbuf, 1, 1, mps_file);          /* skip min/max values */
        if (tbuf[0] == 0) {
 
-               fread(&lat, 4, 1, mps_file); 
-               fread(&lon, 4, 1, mps_file); 
-               lat = le_read32(&lat);                  /* max lat of whole route */
-               lon = le_read32(&lon);                  /* max lon of whole route */
+               lat = gbfgetint32(mps_file);                    /* max lat of whole route */
+               lon = gbfgetint32(mps_file);                    /* max lon of whole route */
 
-               fread(tbuf, 1, 1, mps_file);                    /* altitude validity */
-               if (tbuf[0] == 1) {
-                       mps_altitude = le_fread_double(mps_file);
+               if (gbfgetc(mps_file) == 1) {                   /* altitude validity */
+                       mps_altitude = gbfgetdbl(mps_file);
                }
                else {
                        mps_altitude = unknown_alt;
-                       fseek( mps_file, 8, SEEK_CUR );
+                       gbfseek( mps_file, 8, SEEK_CUR );
                }
 
-               fread(&lat, 4, 1, mps_file); 
-               fread(&lon, 4, 1, mps_file); 
-               lat = le_read32(&lat);                  /* min lat of whole route */
-               lon = le_read32(&lon);                  /* min lon of whole route */
+               lat = gbfgetint32(mps_file);                    /* min lat of whole route */
+               lon = gbfgetint32(mps_file);                    /* min lon of whole route */
 
-               fread(tbuf, 1, 1, mps_file);                    /* altitude validity */
-               if (tbuf[0] == 1) {
-                       mps_altitude = le_fread_double(mps_file);
+               if (gbfgetc(mps_file) == 1) {                   /* altitude validity */
+                       mps_altitude = gbfgetdbl(mps_file);
                }
                else {
                        mps_altitude = unknown_alt;
-                       fseek( mps_file, 8, SEEK_CUR );
+                       gbfseek( mps_file, 8, SEEK_CUR );
                }
        }
 
-       fread(&rte_count, 4, 1, mps_file);                      /* number of waypoints in route */
-       rte_count = le_read32(&rte_count);
+       rte_count = gbfgetint32(mps_file);                      /* number of waypoints in route */
 
        /* This might be rather presumptuous, but is it valid in any format to have route with no points? */
        /* Let's assume not, so if the route count is zero or less, let's get out of here and allow the   */
@@ -934,7 +882,7 @@ mps_route_r(FILE *mps_file, int mps_ver, route_head **rte)
 #endif
 
        rte_head = route_head_alloc();
-       rte_head->rte_name = xstrdup(rtename);
+       rte_head->rte_name = rtename;
        route_add_head(rte_head);
        *rte = rte_head;
 
@@ -947,30 +895,28 @@ mps_route_r(FILE *mps_file, int mps_ver, route_head **rte)
                fprintf(stderr, "mps_route_r: reading route waypoint %s\n", wptname);
 #endif
 
-               fread(&mpsclass, 4, 1, mps_file);                       /* class */
-               mpsclass = le_read32(&mpsclass);
+               mpsclass = gbfgetint32(mps_file);                       /* class */
                mps_readstr(mps_file, tbuf, sizeof(tbuf));      /* country */
 
                if ((mps_ver == 4) || (mps_ver == 5)) {
-                       fread(tbuf, 22, 1, mps_file);                           /* subclass data */
+                       gbfread(tbuf, 22, 1, mps_file);                         /* subclass data */
 
                        /* This is a bit unpleasant. Routes have a variable length of
                           data (min 22 bytes) terminated by a zero */
                        do {
-                               fread(tbuf, 1, 1, mps_file);
+                               gbfread(tbuf, 1, 1, mps_file);
                        } while (tbuf[0]);
 
                        /* The next thing is the unknown 0x03 0x00 .. 0x00 (18 bytes) */
-                       fread(tbuf, 18, 1, mps_file);
+                       gbfread(tbuf, 18, 1, mps_file);
                }
                else {
-                       fread(tbuf, 17, 1, mps_file);                           /* subclass data */
-                       fread(tbuf, 18, 1, mps_file);                           /* unknown 0x00 0x03 0x00 .. 0x00 */
+                       gbfread(tbuf, 17, 1, mps_file);                         /* subclass data */
+                       gbfread(tbuf, 18, 1, mps_file);                         /* unknown 0x00 0x03 0x00 .. 0x00 */
                }
 
                /* link details */
-               fread(&interlinkStepCount, 4, 1, mps_file);                                     /* NOT always 2, but will assume > 0 */
-               interlinkStepCount = le_read32(&interlinkStepCount);
+               interlinkStepCount = gbfgetint32(mps_file);                                     /* NOT always 2, but will assume > 0 */
 
 #ifdef MPS_DEBUG
                fprintf(stderr, "mps_route_r: interlink steps are %d\n", interlinkStepCount);
@@ -988,18 +934,15 @@ mps_route_r(FILE *mps_file, int mps_ver, route_head **rte)
                }
 
                /* first end of link */
-               fread(&lat, 4, 1, mps_file); 
-               fread(&lon, 4, 1, mps_file); 
-               lat = le_read32(&lat);
-               lon = le_read32(&lon);
+               lat = gbfgetint32(mps_file);
+               lon = gbfgetint32(mps_file);
        
-               fread(tbuf, 1, 1, mps_file);                    /* altitude validity */
-               if (tbuf[0] == 1) {
-                       mps_altitude = le_fread_double(mps_file);
+               if (gbfgetc(mps_file) == 1) {                   /* altitude validity */
+                       mps_altitude = gbfgetdbl(mps_file);
                }
                else {
                        mps_altitude = unknown_alt;
-                       fseek( mps_file, 8, SEEK_CUR );
+                       gbfseek( mps_file, 8, SEEK_CUR );
                }
 
                /* with MapSource routes, the real waypoint details are held as a separate waypoint, so copy from there
@@ -1036,30 +979,27 @@ mps_route_r(FILE *mps_file, int mps_ver, route_head **rte)
                for (thisInterlinkStep = interlinkStepCount - 1; thisInterlinkStep > 0; thisInterlinkStep--) {
                        /* Could do this by doing a calculation on length of each co-ordinate and just doing one read
                           but doing it this way makes it easier in the future to make use of this data */
-                       fread(&lat, 4, 1, mps_file); 
-                       fread(&lon, 4, 1, mps_file); 
-                       lat = le_read32(&lat);
-                       lon = le_read32(&lon);
+                       lat = gbfgetint32(mps_file);
+                       lon = gbfgetint32(mps_file);
                
-                       fread(tbuf, 1, 1, mps_file);                    /* altitude validity */
-                       if (tbuf[0] == 1) {
-                               mps_altitude = le_fread_double( mps_file );
+                       if (gbfgetc(mps_file) == 1) {                   /* altitude validity */
+                               mps_altitude = gbfgetdbl( mps_file );
                        }
                        else {
                                mps_altitude = unknown_alt;
-                               fseek( mps_file, 8, SEEK_CUR );
+                               gbfseek( mps_file, 8, SEEK_CUR );
                        }
                }
 
-               fread(tbuf, 1, 1, mps_file);                    /* NULL */
+               gbfread(tbuf, 1, 1, mps_file);                  /* NULL */
 
-               fread(tbuf, 4, 1, mps_file);                    /* link max lat */
-               fread(tbuf, 4, 1, mps_file);                    /* link max lon */
-               fread(tbuf, 9, 1, mps_file);                    /* link max alt validity + alt */
+               gbfread(tbuf, 4, 1, mps_file);                  /* link max lat */
+               gbfread(tbuf, 4, 1, mps_file);                  /* link max lon */
+               gbfread(tbuf, 9, 1, mps_file);                  /* link max alt validity + alt */
 
-               fread(tbuf, 4, 1, mps_file);                    /* link min lat */
-               fread(tbuf, 4, 1, mps_file);                    /* link min lon */
-               fread(tbuf, 9, 1, mps_file);                    /* link min alt validity + alt */
+               gbfread(tbuf, 4, 1, mps_file);                  /* link min lat */
+               gbfread(tbuf, 4, 1, mps_file);                  /* link min lon */
+               gbfread(tbuf, 9, 1, mps_file);                  /* link min alt validity + alt */
 
        }               /* while (trk_count--) */
 
@@ -1071,28 +1011,27 @@ mps_route_r(FILE *mps_file, int mps_ver, route_head **rte)
 #endif
 
 
-       fread(&mpsclass, 4, 1, mps_file);                       /* class */
-       mpsclass = le_read32(&mpsclass);
+       mpsclass = gbfgetint32(mps_file);                       /* class */
        mps_readstr(mps_file, tbuf, sizeof(tbuf));      /* country */
 
        if ((mps_ver == 4) || (mps_ver == 5)) {
-               fread(tbuf, 22, 1, mps_file);                           /* subclass data */
+               gbfread(tbuf, 22, 1, mps_file);                         /* subclass data */
 
                /* This is a bit unpleasant. Routes have a variable length of
                        data (min 22 bytes) terminated by a zero */
                do {
-                       fread(tbuf, 1, 1, mps_file);
+                       gbfread(tbuf, 1, 1, mps_file);
                } while (tbuf[0]);
 
                /* The next thing is the unknown 0x03 0x00 .. 0x00 (18 bytes) */
-               fread(tbuf, 18, 1, mps_file);
+               gbfread(tbuf, 18, 1, mps_file);
        }
        else {
-               fread(tbuf, 17, 1, mps_file);                           /* subclass data */
-               fread(tbuf, 18, 1, mps_file);                           /* unknown 0x00 0x03 0x00 .. 0x00 */
+               gbfread(tbuf, 17, 1, mps_file);                         /* subclass data */
+               gbfread(tbuf, 18, 1, mps_file);                         /* unknown 0x00 0x03 0x00 .. 0x00 */
        }
 
-       fread(tbuf, 5, 1, mps_file);                                    /* 5 byte trailer */
+       gbfread(tbuf, 5, 1, mps_file);                                  /* 5 byte trailer */
        /* with MapSource routes, the real waypoint details are held as a separate waypoint, so copy from there
                if found because there is more info held in a real waypoint than in its route counterpart,
                e.g. the display symbol (aka icon)
@@ -1128,7 +1067,7 @@ mps_route_r(FILE *mps_file, int mps_ver, route_head **rte)
  * MRCB
  */
 static void
-mps_routehdr_w(FILE *mps_file, int mps_ver, const route_head *rte)
+mps_routehdr_w(gbfile *mps_file, int mps_ver, const route_head *rte)
 {
        unsigned int reclen;
        unsigned int rte_datapoints;
@@ -1226,59 +1165,46 @@ mps_routehdr_w(FILE *mps_file, int mps_ver, const route_head *rte)
                                        (rte_datapoints - 1) * 73 + 4;                          /* link details plus overall trailing bytes */
                }
 
-               le_write32(&reclen, reclen);
-               fwrite(&reclen, 4, 1, mps_file);
+               gbfputint32(reclen, mps_file);
+               gbfputc('R', mps_file);
+               gbfwrite(rname, rname_len, 1, mps_file);
 
-               hdr[0] = 'R';
-               fwrite(hdr, 1, 1, mps_file);
-
-               fwrite(rname, rname_len, 1, mps_file);
                xfree(rname);
 
                hdr[0] = 0;                                             /* NULL of string termination */
                hdr[1] = 0;                                             /* don't autoname */
                hdr[2] = 0;                                             /* MSB of don't autoname */
-               fwrite(hdr, 3, 1, mps_file);    /* NULL string terminator + route autoname flag */
+               gbfwrite(hdr, 3, 1, mps_file);  /* NULL string terminator + route autoname flag */
 
                lat = GPS_Math_Deg_To_Semi(maxlat);
                lon = GPS_Math_Deg_To_Semi(maxlon);
 
-               le_write32(&lat, lat);
-               le_write32(&lon, lon);
-
-               fwrite(&lat, 4, 1, mps_file);
-               fwrite(&lon, 4, 1, mps_file);
+               gbfputint32(lat, mps_file);
+               gbfputint32(lon, mps_file);
 
                if (maxalt == unknown_alt) {
-                       fwrite(zbuf, 9, 1, mps_file);
+                       gbfwrite(zbuf, 9, 1, mps_file);
                }
                else {
-                       hdr[0] = 1;
-                       fwrite(hdr, 1 , 1, mps_file);
-                       le_fwrite_double(maxalt, mps_file);
+                       gbfputc(1, mps_file);
+                       gbfputdbl(maxalt, mps_file);
                }
 
                lat = GPS_Math_Deg_To_Semi(minlat);
                lon = GPS_Math_Deg_To_Semi(minlon);
 
-               le_write32(&lat, lat);
-               le_write32(&lon, lon);
-
-               fwrite(&lat, 4, 1, mps_file);
-               fwrite(&lon, 4, 1, mps_file);
+               gbfputint32(lat, mps_file);
+               gbfputint32(lon, mps_file);
 
                if (minalt == unknown_alt) {
-                       fwrite(zbuf, 9, 1, mps_file);
+                       gbfwrite(zbuf, 9, 1, mps_file);
                }
                else {
-                       hdr[0] = 1;
-
-                       fwrite(hdr, 1 , 1, mps_file);
-                       le_fwrite_double(minalt, mps_file);
+                       gbfputc(1, mps_file);
+                       gbfputdbl(minalt, mps_file);
                }
 
-               le_write32(&rte_datapoints, rte_datapoints);
-               fwrite(&rte_datapoints, 4, 1, mps_file);
+               gbfputint32(rte_datapoints, mps_file);
        }
 }
 
@@ -1294,9 +1220,8 @@ mps_routehdr_w_wrapper(const route_head *rte)
  * MRCB
  */
 static void
-mps_routedatapoint_w(FILE *mps_file, int mps_ver, const waypoint *rtewpt)
+mps_routedatapoint_w(gbfile *mps_file, int mps_ver, const waypoint *rtewpt)
 {
-       unsigned char hdr[10];
        int                     lat;
        int                     lon;
        char            zbuf[20];
@@ -1321,45 +1246,38 @@ mps_routedatapoint_w(FILE *mps_file, int mps_ver, const waypoint *rtewpt)
        if (prevRouteWpt != NULL) {
                /* output the route link details */
                reclen = 2;
-               le_write32(&reclen, reclen);
-               fwrite(&reclen, 4, 1, mps_file);
+               gbfputint32(reclen, mps_file);
 
                /* output end point 1 */
                lat = GPS_Math_Deg_To_Semi(prevRouteWpt->latitude);
                lon = GPS_Math_Deg_To_Semi(prevRouteWpt->longitude);
-               le_write32(&lat, lat);
-               le_write32(&lon, lon);
 
-               fwrite(&lat, 4, 1, mps_file);
-               fwrite(&lon, 4, 1, mps_file);
+               gbfputint32(lat, mps_file);
+               gbfputint32(lon, mps_file);
 
                mps_altitude = prevRouteWpt->altitude;
                if (mps_altitude == unknown_alt) {
-                       fwrite(zbuf, 9, 1, mps_file);
+                       gbfwrite(zbuf, 9, 1, mps_file);
                }
                else {
-                       hdr[0] = 1;
-                       fwrite(hdr, 1 , 1, mps_file);
-                       le_fwrite_double(mps_altitude, mps_file );
+                       gbfputc(1, mps_file);
+                       gbfputdbl(mps_altitude, mps_file );
                }
 
                /* output end point 2 */
                lat = GPS_Math_Deg_To_Semi(rtewpt->latitude);
                lon = GPS_Math_Deg_To_Semi(rtewpt->longitude);
-               le_write32(&lat, lat);
-               le_write32(&lon, lon);
 
-               fwrite(&lat, 4, 1, mps_file);
-               fwrite(&lon, 4, 1, mps_file);
+               gbfputint32(lat, mps_file);
+               gbfputint32(lon, mps_file);
 
                mps_altitude = rtewpt->altitude;
                if (mps_altitude == unknown_alt) {
-                       fwrite(zbuf, 9, 1, mps_file);
+                       gbfwrite(zbuf, 9, 1, mps_file);
                }
                else {
-                       hdr[0] = 1;
-                       fwrite(hdr, 1 , 1, mps_file);
-                       le_fwrite_double(mps_altitude, mps_file);
+                       gbfputc(1, mps_file);
+                       gbfputdbl(mps_altitude, mps_file);
                }
 
                if (rtewpt->latitude > prevRouteWpt->latitude) {
@@ -1389,38 +1307,30 @@ mps_routedatapoint_w(FILE *mps_file, int mps_ver, const waypoint *rtewpt)
                                (minalt == unknown_alt)) minalt = prevRouteWpt->altitude;
                }
                
-               fwrite (zbuf, 1, 1, mps_file);
+               gbfwrite (zbuf, 1, 1, mps_file);
 
                /* output max coords of the link */
-               le_write32(&maxlat, maxlat);
-               le_write32(&maxlon, maxlon);
-
-               fwrite(&maxlat, 4, 1, mps_file);
-               fwrite(&maxlon, 4, 1, mps_file);
+               gbfputint32(maxlat, mps_file);
+               gbfputint32(maxlon, mps_file);
 
                if (maxalt == unknown_alt) {
-                       fwrite(zbuf, 9, 1, mps_file);
+                       gbfwrite(zbuf, 9, 1, mps_file);
                }
                else {
-                       hdr[0] = 1;
-                       fwrite(hdr, 1 , 1, mps_file);
-                       le_fwrite_double(maxalt, mps_file);
+                       gbfputc(1, mps_file);
+                       gbfputdbl(maxalt, mps_file);
                }
 
                /* output min coords of the link */
-               le_write32(&minlat, minlat);
-               le_write32(&minlon, minlon);
-
-               fwrite(&minlat, 4, 1, mps_file);
-               fwrite(&minlon, 4, 1, mps_file);
+               gbfputint32(minlat, mps_file);
+               gbfputint32(minlon, mps_file);
 
                if (minalt == unknown_alt) {
-                       fwrite(zbuf, 9, 1, mps_file);
+                       gbfwrite(zbuf, 9, 1, mps_file);
                }
                else {
-                       hdr[0] = 1;
-                       fwrite(hdr, 1 , 1, mps_file);
-                       le_fwrite_double(minalt, mps_file );
+                       gbfputc(1, mps_file);
+                       gbfputdbl(minalt, mps_file );
                }
 
        }
@@ -1431,38 +1341,36 @@ mps_routedatapoint_w(FILE *mps_file, int mps_ver, const waypoint *rtewpt)
                                mkshort(mkshort_handle, src) :
                                rtewpt->shortname;
 
-       fputs(ident, mps_file);
-       fwrite(zbuf, 1, 1, mps_file);   /* NULL termination to ident */
+       gbfputs(ident, mps_file);
+       gbfwrite(zbuf, 1, 1, mps_file); /* NULL termination to ident */
 
        wptfound = mps_find_wpt_q_by_name(&written_route_wpt_head, ident);
        if (wptfound != NULL)   zbuf[0] = (char)MPSHIDDENROUTEWPTCLASS;
        else                                    zbuf[0] = (char)MPSDEFAULTWPTCLASS;
-       fwrite(zbuf, 4, 1, mps_file);                   /* class */
+       gbfwrite(zbuf, 4, 1, mps_file);                 /* class */
 
        zbuf[0]=0;
-       fwrite(zbuf, 1, 1, mps_file);                   /* country - i.e. empty string */
+       gbfwrite(zbuf, 1, 1, mps_file);                 /* country - i.e. empty string */
 
        if ((mps_ver == 4) || (mps_ver == 5)) {
-               fwrite(zbuf, 4, 1, mps_file);           /* subclass part 1 */
-               fwrite(ffbuf, 12, 1, mps_file);         /* subclass part 2 */
-               fwrite(zbuf, 2, 1, mps_file);           /* subclass part 3 */
-               fwrite(ffbuf, 4, 1, mps_file);          /* unknown */
+               gbfwrite(zbuf, 4, 1, mps_file);         /* subclass part 1 */
+               gbfwrite(ffbuf, 12, 1, mps_file);               /* subclass part 2 */
+               gbfwrite(zbuf, 2, 1, mps_file);         /* subclass part 3 */
+               gbfwrite(ffbuf, 4, 1, mps_file);                /* unknown */
 
-               fwrite(zbuf, 1, 1, mps_file);
-               hdr[0] = 3;
-               fwrite(hdr, 1, 1, mps_file);
-               fwrite(zbuf, 17, 1, mps_file);
+               gbfwrite(zbuf, 1, 1, mps_file);
+               gbfputc(3, mps_file);
+               gbfwrite(zbuf, 17, 1, mps_file);
        }
        else {
-               fwrite(zbuf, 8, 1, mps_file);           /* subclass part 1 */
-               fwrite(ffbuf, 8, 1, mps_file);          /* subclass part 2 */
-               fwrite(zbuf, 1, 1, mps_file);           /* subclass part 3 */
+               gbfwrite(zbuf, 8, 1, mps_file);         /* subclass part 1 */
+               gbfwrite(ffbuf, 8, 1, mps_file);                /* subclass part 2 */
+               gbfwrite(zbuf, 1, 1, mps_file);         /* subclass part 3 */
 
                /* unknown */
-               fwrite(zbuf, 1, 1, mps_file);
-               hdr[0] = 3;
-               fwrite(hdr, 1, 1, mps_file);
-               fwrite(zbuf, 16, 1, mps_file);
+               gbfwrite(zbuf, 1, 1, mps_file);
+               gbfputc(3, mps_file);
+               gbfwrite(zbuf, 16, 1, mps_file);
        }
 
        prevRouteWpt = rtewpt;
@@ -1480,7 +1388,7 @@ mps_routedatapoint_w_wrapper(const waypoint *rte)
  * MRCB
  */
 static void
-mps_routetrlr_w(FILE *mps_file, int mps_ver, const route_head *rte)
+mps_routetrlr_w(gbfile *mps_file, int mps_ver, const route_head *rte)
 {
        char            hdr[2];
        int                     value = 0;
@@ -1488,8 +1396,8 @@ mps_routetrlr_w(FILE *mps_file, int mps_ver, const route_head *rte)
        hdr[0] = 1;
 
        if (rte->waypoint_list.next) {          /* this test doesn't do what I want i.e test if this is a valid route - treat as a placeholder for now */
-               fwrite(&value, 4, 1, mps_file);
-               fwrite(hdr, 1, 1, mps_file);
+               gbfwrite(&value, 4, 1, mps_file);
+               gbfwrite(hdr, 1, 1, mps_file);
        }
 }
        
@@ -1505,10 +1413,9 @@ mps_routetrlr_w_wrapper(const route_head *rte)
  * MRCB
  */
 static void
-mps_track_r(FILE *mps_file, int mps_ver, route_head **trk)
+mps_track_r(gbfile *mps_file, int mps_ver, route_head **trk)
 {
-       char tbuf[100];
-       char trkname[MPSNAMEBUFFERLEN];
+       char *trkname;
        int lat;
        int lon;
 
@@ -1520,17 +1427,15 @@ mps_track_r(FILE *mps_file, int mps_ver, route_head **trk)
        double  mps_altitude = unknown_alt;
        double  mps_depth = unknown_alt;
 
-       mps_readstr(mps_file, trkname, sizeof(trkname));
+       trkname = gbfgetcstr(mps_file);
 #ifdef MPS_DEBUG
        fprintf(stderr, "mps_track_r: reading track %s\n", trkname);
 #endif
 
+       (void) gbfgetc(mps_file);                               /* display flag */
+       (void) gbfgetint32(mps_file);                           /* colour */
 
-       fread(tbuf, 1, 1, mps_file);                            /* display flag */
-       fread(tbuf, 4, 1, mps_file);                            /* colour */
-
-       fread(&trk_count, 4, 1, mps_file);                      /* number of datapoints in tracklog */
-       trk_count = le_read32(&trk_count);
+       trk_count = gbfgetint32(mps_file);                      /* number of datapoints in tracklog */
 
        /* I don't know, but perhaps it's valid to have a track with no waypoints   */
        /* Seems dumb, but truth is stranger than fiction. Of course, it could be   */
@@ -1542,47 +1447,42 @@ mps_track_r(FILE *mps_file, int mps_ver, route_head **trk)
 #endif
 
        track_head = route_head_alloc();
-       track_head->rte_name = xstrdup(trkname);
+       track_head->rte_name = trkname;
        track_add_head(track_head);
        *trk = track_head;
 
        while (trk_count--) {
 
-               fread(&lat, 4, 1, mps_file); 
-               fread(&lon, 4, 1, mps_file); 
-               lat = le_read32(&lat);
-               lon = le_read32(&lon);
+               lat = gbfgetint32(mps_file);
+               lon = gbfgetint32(mps_file);
        
-               fread(tbuf, 1, 1, mps_file);                    /* altitude validity */
-               if (tbuf[0] == 1) {
-                       mps_altitude = le_fread_double( mps_file );
+               if (gbfgetc(mps_file) == 1) {                   /* altitude validity */
+                       mps_altitude = gbfgetdbl( mps_file );
                }
                else {
                        mps_altitude = unknown_alt;
-                       fseek( mps_file, 8, SEEK_CUR );
+                       gbfseek( mps_file, 8, SEEK_CUR );
                }
 
-               fread(tbuf, 1, 1, mps_file);                    /* date/time validity */
-               if (tbuf[0] == 1) {
-                       fread(&dateTime,sizeof(dateTime),1,mps_file);
+               if (gbfgetc(mps_file) == 1) {                   /* date/time validity */
+                       dateTime = gbfgetint32(mps_file);
                }
                else {
-                       fread(tbuf,sizeof(dateTime),1, mps_file);
+                       (void) gbfgetint32(mps_file);
                }
 
-               fread(tbuf, 1, 1, mps_file);                    /* depth validity */
-               if (tbuf[0] == 1) {
-                       mps_depth = le_fread_double(mps_file );
+               if (gbfgetc(mps_file) == 1) {                   /* depth validity */
+                       mps_depth = gbfgetdbl(mps_file );
                }
                else {
                        mps_depth = unknown_alt;
-                       fseek( mps_file, 8, SEEK_CUR );
+                       gbfseek( mps_file, 8, SEEK_CUR );
                }
 
                thisWaypoint = waypt_new();
                thisWaypoint->latitude = GPS_Math_Semi_To_Deg(lat);
                thisWaypoint->longitude = GPS_Math_Semi_To_Deg(lon);
-               thisWaypoint->creation_time = le_read32(&dateTime);
+               thisWaypoint->creation_time = dateTime;
                thisWaypoint->microseconds = 0;
                thisWaypoint->altitude = mps_altitude;
                if (mps_depth != unknown_alt) WAYPT_SET(thisWaypoint, depth, mps_depth);
@@ -1599,7 +1499,7 @@ mps_track_r(FILE *mps_file, int mps_ver, route_head **trk)
  * MRCB
  */
 static void
-mps_trackhdr_w(FILE *mps_file, int mps_ver, const route_head *trk)
+mps_trackhdr_w(gbfile *mps_file, int mps_ver, const route_head *trk)
 {
        unsigned int reclen;
        unsigned int trk_datapoints;
@@ -1641,24 +1541,19 @@ mps_trackhdr_w(FILE *mps_file, int mps_ver, const route_head *trk)
                
                reclen += (trk_datapoints * 31) - 1;    /* lat (4) + lon (4) + alt (9) + date (5) + depth (9) ;*/
                                                                                                /* -1 is because reclen starts from 0 which means a length of 1 */
-               le_write32(&reclen, reclen);
-               fwrite(&reclen, 4, 1, mps_file);
-
-               hdr[0] = 'T';
-               fwrite(hdr, 1, 1, mps_file);
+               gbfputint32(reclen, mps_file);
+               gbfputc('T', mps_file);
+               gbfwrite(tname, tname_len, 1, mps_file);
 
-               fwrite(tname, tname_len, 1, mps_file);
                xfree(tname);
 
                hdr[0] = 0;
                hdr[1] = 1;
-               fwrite(hdr, 2, 1, mps_file);    /* NULL string terminator + display flag */
+               gbfwrite(hdr, 2, 1, mps_file);  /* NULL string terminator + display flag */
 
-               le_write32(&colour, colour);
-               fwrite(&colour, 4, 1, mps_file);
+               gbfputint32(colour, mps_file);
 
-               le_write32(&trk_datapoints, trk_datapoints);
-               fwrite(&trk_datapoints, 4, 1, mps_file);
+               gbfputint32(trk_datapoints, mps_file);
        }
 
 }
@@ -1675,9 +1570,8 @@ mps_trackhdr_w_wrapper(const route_head *trk)
  * MRCB
  */
 static void
-mps_trackdatapoint_w(FILE *mps_file, int mps_ver, const waypoint *wpt)
+mps_trackdatapoint_w(gbfile *mps_file, int mps_ver, const waypoint *wpt)
 {
-       unsigned char hdr[10];
        int lat, lon;
        time_t  t = wpt->creation_time;
        char zbuf[10];
@@ -1691,37 +1585,31 @@ mps_trackdatapoint_w(FILE *mps_file, int mps_ver, const waypoint *wpt)
 
        memset(zbuf, 0, sizeof(zbuf));
 
-       le_write32(&lat, lat);
-       le_write32(&lon, lon);
-       fwrite(&lat, 4, 1, mps_file);
-       fwrite(&lon, 4, 1, mps_file);
+       gbfputint32(lat, mps_file);
+       gbfputint32(lon, mps_file);
 
        if (mps_altitude == unknown_alt) {
-               fwrite(zbuf, 9, 1, mps_file);
+               gbfwrite(zbuf, 9, 1, mps_file);
        }
        else {
-               hdr[0] = 1;
-               fwrite(hdr, 1 , 1, mps_file);
-               le_fwrite_double(mps_altitude, mps_file);
+               gbfputc(1, mps_file);
+               gbfputdbl(mps_altitude, mps_file);
        }
 
        if (t > 0) {                                    /* a valid time is assumed to > 0 */
-               hdr[0] = 1;
-               fwrite(hdr, 1 , 1, mps_file);
-               le_write32(&t, t);
-               fwrite(&t, 4, 1, mps_file);
+               gbfputc(1, mps_file);
+               gbfputint32(t, mps_file);
        }
        else {
-               fwrite(zbuf, 5, 1, mps_file);
+               gbfwrite(zbuf, 5, 1, mps_file);
        }
 
        if (mps_depth == unknown_alt) {
-               fwrite(zbuf, 9, 1, mps_file);
+               gbfwrite(zbuf, 9, 1, mps_file);
        }
        else {
-               hdr[0] = 1;
-               fwrite(hdr, 1 , 1, mps_file);
-               le_fwrite_double(mps_depth, mps_file );
+               gbfputc(1, mps_file);
+               gbfputdbl(mps_depth, mps_file );
        }
 }
 
@@ -1754,17 +1642,16 @@ mps_read(void)
 #endif
 
        morework = 1;
-       while (morework && !feof(mps_file_in)) {
+       while (morework && !gbfeof(mps_file_in)) {
 
                /* Read record length of next section */
-               fread(&reclen, 4, 1, mps_file_in);
-               reclen = le_read32(&reclen);
+               reclen = gbfgetint32(mps_file_in);
 
                if (reclen < 0) fatal (MYNAME ": a record length read from the input file is invalid. \nEither the file is corrupt or unsupported.\n");
 
-               /* Read the record type "flag" in - using fread in case in the future need more than one char */
-               fread(&recType, 1, 1, mps_file_in);
-               mpsFileInPos = ftell(mps_file_in);
+               /* Read the record type "flag" in - using gbfread in case in the future need more than one char */
+               gbfread(&recType, 1, 1, mps_file_in);
+               mpsFileInPos = gbftell(mps_file_in);
                switch (recType) {
                case 'W':
                        /* Waypoint record */
@@ -1775,13 +1662,13 @@ mps_read(void)
                        fprintf(stderr,"Read a waypoint - %s\n", wpt->shortname);
 #endif
 
-                       if (ftell(mps_file_in) != mpsFileInPos + reclen) {
+                       if (gbftell(mps_file_in) != mpsFileInPos + reclen) {
                                /* should junk this record and not save it since we're out of sync with the file */
                                /* Should and how do we warn the user?                                           */
 #ifdef MPS_DEBUG
                                fprintf(stderr,"Lost sync with the file reading waypoint - %s\n", wpt->shortname);
 #endif
-                               fseek (mps_file_in, mpsFileInPos + reclen, SEEK_SET);
+                               gbfseek (mps_file_in, mpsFileInPos + reclen, SEEK_SET);
                                waypt_free( wpt );
                        }
                        else {
@@ -1800,36 +1687,36 @@ mps_read(void)
                case 'R':
                        /* Route record */
                        mps_route_r(mps_file_in, mps_ver_in, &rte);
-                       if (ftell(mps_file_in) != mpsFileInPos + reclen) {
+                       if (gbftell(mps_file_in) != mpsFileInPos + reclen) {
                                /* should junk this record and not save it since we're out of sync with the file */
                                /* Should and how do we warn the user?                                           */
 #ifdef MPS_DEBUG
                                fprintf(stderr,"Lost sync with the file reading route - %s\n", rte->rte_name);
 #endif
-                               fseek (mps_file_in, mpsFileInPos + reclen, SEEK_SET);
+                               gbfseek (mps_file_in, mpsFileInPos + reclen, SEEK_SET);
                        }
                        break;
 
                case 'T':
                        /* Track record */
                        mps_track_r(mps_file_in, mps_ver_in, &trk);
-                       if (ftell(mps_file_in) != mpsFileInPos + reclen) {
+                       if (gbftell(mps_file_in) != mpsFileInPos + reclen) {
                                /* should junk this record and not save it since we're out of sync with the file */
                                /* Should and how do we warn the user?                                           */
 #ifdef MPS_DEBUG
                                fprintf(stderr,"Lost sync with the file reading track - %s\n", trk->rte_name);
 #endif
-                               fseek (mps_file_in, mpsFileInPos + reclen, SEEK_SET);
+                               gbfseek (mps_file_in, mpsFileInPos + reclen, SEEK_SET);
                        }
                        break;
 
                case 'L':
                        /* Map segment record */
                        mps_mapsegment_r(mps_file_in, mps_ver_in);
-                       if (ftell(mps_file_in) != mpsFileInPos + reclen) {
+                       if (gbftell(mps_file_in) != mpsFileInPos + reclen) {
                                /* should junk this record and not save it since we're out of sync with the file */
                                /* Should and how do we warn the user?                                           */
-                               fseek (mps_file_in, mpsFileInPos + reclen, SEEK_SET);
+                               gbfseek (mps_file_in, mpsFileInPos + reclen, SEEK_SET);
                        }
                        break;
 
@@ -1841,10 +1728,10 @@ mps_read(void)
                        break;
                default:
                        /* Unknown record type.  Skip over it. */
-                       fseek(mps_file_in, reclen, SEEK_CUR); 
+                       gbfseek(mps_file_in, reclen, SEEK_CUR); 
                }
 
-       }       /* while (!feof(mps_file_in)) */
+       }       /* while (!gbfeof(mps_file_in)) */
 
 #ifdef DUMP_ICON_TABLE
        printf("\t{ -1, NULL },\n");
@@ -1886,8 +1773,8 @@ mps_write(void)
                                /* Need to clean up after a junk version specified */
                                /* close the real output file + renamed original output file */
                                /* then delete the "real" file and rename the temporarily renamed file back */
-                               fclose(mps_file_temp);
-                               fclose(mps_file_out);
+                               gbfclose(mps_file_temp);
+                               gbfclose(mps_file_out);
                                remove(fin_name);
                                rename(tempname, fin_name);
                                fatal (MYNAME ": merge source version is %d, requested out version is %d\n", mps_ver_temp, atoi(mpsverout));
@@ -1921,36 +1808,35 @@ mps_write(void)
        */
        /* if ((mpsmergeout) && (global_opts.objective != wptdata)) { */
        if ((mpsmergeout) && (! doing_wpts)) {
-               while (!feof(mps_file_temp)) {
+               while (!gbfeof(mps_file_temp)) {
 
-                       fread(&reclen, 4, 1, mps_file_temp);
-                       reclen2 = le_read32(&reclen);
+                       reclen2 = gbfgetint32(mps_file_temp);
 
-                       /* Read the record type "flag" in - using fread in case in the future need more than one char */
-                       fread(&recType, 1, 1, mps_file_temp);
+                       /* Read the record type "flag" in - using gbfread in case in the future need more than one char */
+                       gbfread(&recType, 1, 1, mps_file_temp);
 
                        if (recType == 'W')  {
-                               fwrite(&reclen, 4, 1, mps_file_out);    /* write out untouched */
-                               fwrite(&recType, 1, 1, mps_file_out);
+                               gbfwrite(&reclen, 4, 1, mps_file_out);  /* write out untouched */
+                               gbfwrite(&recType, 1, 1, mps_file_out);
 
-                               tempFilePos = ftell(mps_file_temp);
+                               tempFilePos = gbftell(mps_file_temp);
                                /* need to read in the waypoint info only because later we may need to check for uniqueness
                                   since we're here because the user didn't request waypoints, this should be acceptable */
                                mps_waypoint_r(mps_file_temp, mps_ver_temp, &wpt, &mpsWptClass);
                                mps_wpt_q_add(&written_wpt_head, wpt);
                                waypt_free( wpt );
                                /* now return to the start of the waypoint data to do a "clean" copy */
-                               fseek(mps_file_temp, tempFilePos, SEEK_SET);
+                               gbfseek(mps_file_temp, tempFilePos, SEEK_SET);
 
                                /* copy the data using a "reasonably" sized buffer */
                                for(tocopy = reclen2; tocopy > 0; tocopy -= block) {
                                  block = (tocopy > sizeof(copybuf) ? sizeof(copybuf) : tocopy);
-                                 fread(copybuf, block, 1, mps_file_temp);
-                                 fwrite(copybuf, block, 1, mps_file_out);
+                                 gbfread(copybuf, block, 1, mps_file_temp);
+                                 gbfwrite(copybuf, block, 1, mps_file_out);
                                }
                        }
                        else break;
-               }       /* while (!feof(mps_file_temp)) */
+               }       /* while (!gbfeof(mps_file_temp)) */
        }       /* if (mpsmergeout) */
 
        /* irrespective of merging, now write out any waypoints */
@@ -1960,13 +1846,12 @@ mps_write(void)
                if (mpsmergeout) {
                        /* since we're processing waypoints, we should read in from whatever version and write out */
                        /* in the selected version */
-                       while (!feof(mps_file_temp)) {
+                       while (!gbfeof(mps_file_temp)) {
 
-                               fread(&reclen, 4, 1, mps_file_temp);
-                               reclen2 = le_read32(&reclen);
+                               reclen2 = gbfgetint32(mps_file_temp);
 
-                               /* Read the record type "flag" in - using fread in case in the future need more than one char */
-                               fread(&recType, 1, 1, mps_file_temp);
+                               /* Read the record type "flag" in - using gbfread in case in the future need more than one char */
+                               gbfread(&recType, 1, 1, mps_file_temp);
 
                                if (recType == 'W')  {
                                        /* need to be careful that we aren't duplicating a wpt defined from elsewhere */
@@ -1985,28 +1870,27 @@ mps_write(void)
 
        /* if ((mpsmergeout) && (global_opts.objective != rtedata)) { */
        if ((mpsmergeout) && (! doing_rtes)) {
-               while (!feof(mps_file_temp)) {
+               while (!gbfeof(mps_file_temp)) {
 
                        /* this might all fail if the relevant waypoints haven't been written */
                        if (recType == 'R')  {
-                               fwrite(&reclen, 4, 1, mps_file_out);    /* write out untouched */
-                               fwrite(&recType, 1, 1, mps_file_out);
+                               gbfwrite(&reclen, 4, 1, mps_file_out);  /* write out untouched */
+                               gbfwrite(&recType, 1, 1, mps_file_out);
 
                                /* copy the data using a "reasonably" sized buffer */
                                for(tocopy = reclen2; tocopy > 0; tocopy -= block) {
                                  block = (tocopy > sizeof(copybuf) ? sizeof(copybuf) : tocopy);
-                                 fread(copybuf, block, 1, mps_file_temp);
-                                 fwrite(copybuf, block, 1, mps_file_out);
+                                 gbfread(copybuf, block, 1, mps_file_temp);
+                                 gbfwrite(copybuf, block, 1, mps_file_out);
                                }
                        }
                        else break;
-                       fread(&reclen, 4, 1, mps_file_temp);
-                       reclen2 = le_read32(&reclen);
+                       reclen2 = gbfgetint32(mps_file_temp);
 
-                       /* Read the record type "flag" in - using fread in case in the future need more than one char */
-                       fread(&recType, 1, 1, mps_file_temp);
+                       /* Read the record type "flag" in - using gbfread in case in the future need more than one char */
+                       gbfread(&recType, 1, 1, mps_file_temp);
 
-               }       /* while (!feof(mps_file_temp)) */
+               }       /* while (!gbfeof(mps_file_temp)) */
        }       /* if (mpsmergeout) */
 
        /* routes are next in the wpts, rtes, trks, mapset sequence */
@@ -2016,18 +1900,17 @@ mps_write(void)
                if (mpsmergeout) {
                        /* since we're processing routes, we should read in from whatever version and write out */
                        /* in the selected version */
-                       while (!feof(mps_file_temp)) {
+                       while (!gbfeof(mps_file_temp)) {
 
                                if (recType == 'R')  {
                                        mps_route_r(mps_file_temp, mps_ver_temp, &rte);
                                }
                                else break;
 
-                               fread(&reclen, 4, 1, mps_file_temp);
-                               reclen2 = le_read32(&reclen);
+                               reclen2 = gbfgetint32(mps_file_temp);
 
-                               /* Read the record type "flag" in - using fread in case in the future need more than one char */
-                               fread(&recType, 1, 1, mps_file_temp);
+                               /* Read the record type "flag" in - using gbfread in case in the future need more than one char */
+                               gbfread(&recType, 1, 1, mps_file_temp);
                        }
                }
                /* need to make sure there is a "real" waypoint for each route waypoint
@@ -2048,27 +1931,26 @@ mps_write(void)
        */
        /* if ((mpsmergeout) && (global_opts.objective != trkdata)) { */
        if ((mpsmergeout) && (! doing_trks)) {
-               while (!feof(mps_file_temp)) {
+               while (!gbfeof(mps_file_temp)) {
 
                        if (recType == 'T')  {
-                               fwrite(&reclen, 4, 1, mps_file_out);    /* write out untouched */
-                               fwrite(&recType, 1, 1, mps_file_out);
+                               gbfwrite(&reclen, 4, 1, mps_file_out);  /* write out untouched */
+                               gbfwrite(&recType, 1, 1, mps_file_out);
 
                                /* copy the data using a "reasonably" sized buffer */
                                for(tocopy = reclen2; tocopy > 0; tocopy -= block) {
                                  block = (tocopy > sizeof(copybuf) ? sizeof(copybuf) : tocopy);
-                                 fread(copybuf, block, 1, mps_file_temp);
-                                 fwrite(copybuf, block, 1, mps_file_out);
+                                 gbfread(copybuf, block, 1, mps_file_temp);
+                                 gbfwrite(copybuf, block, 1, mps_file_out);
                                }
                        }
                        else break;
-                       fread(&reclen, 4, 1, mps_file_temp);
-                       reclen2 = le_read32(&reclen);
+                       reclen2 = gbfgetint32(mps_file_temp);
 
-                       /* Read the record type "flag" in - using fread in case in the future need more than one char */
-                       fread(&recType, 1, 1, mps_file_temp);
+                       /* Read the record type "flag" in - using gbfread in case in the future need more than one char */
+                       gbfread(&recType, 1, 1, mps_file_temp);
 
-               }       /* while (!feof(mps_file_temp)) */
+               }       /* while (!gbfeof(mps_file_temp)) */
        }       /* if (mpsmergeout) */
 
        /* tracks are next in the wpts, rte, trks, mapset sequence in .mps files */
@@ -2077,18 +1959,17 @@ mps_write(void)
                if (mpsmergeout) {
                        /* since we're processing tracks, we should read in from whatever version and write out
                           in the selected version */
-                       while (!feof(mps_file_temp)) {
+                       while (!gbfeof(mps_file_temp)) {
 
                                if (recType == 'T')  {
                                        mps_track_r(mps_file_temp, mps_ver_temp, &trk);
                                }
                                else break;
 
-                               fread(&reclen, 4, 1, mps_file_temp);
-                               reclen2 = le_read32(&reclen);
+                               reclen2 = gbfgetint32(mps_file_temp);
 
-                               /* Read the record type "flag" in - using fread in case in the future need more than one char */
-                               fread(&recType, 1, 1, mps_file_temp);
+                               /* Read the record type "flag" in - using gbfread in case in the future need more than one char */
+                               gbfread(&recType, 1, 1, mps_file_temp);
                        }
                }
                track_disp_all(mps_trackhdr_w_wrapper, mps_noop, mps_trackdatapoint_w_wrapper);
@@ -2098,22 +1979,21 @@ mps_write(void)
                /* should now be reading a either a map segment or a mapset - since we would write out an empty one,
                   let's use the one from the merge file which may well have decent data in */
                for (;;) {
-                       fwrite(&reclen, 4, 1, mps_file_out);    /* write out untouched */
-                       fwrite(&recType, 1, 1, mps_file_out);
+                       gbfwrite(&reclen, 4, 1, mps_file_out);  /* write out untouched */
+                       gbfwrite(&recType, 1, 1, mps_file_out);
 
                        /* copy the data using a "reasonably" sized buffer */
                        for(tocopy = reclen2; tocopy > 0; tocopy -= block) {
                          block = (tocopy > sizeof(copybuf) ? sizeof(copybuf) : tocopy);
-                         fread(copybuf, block, 1, mps_file_temp);
-                         fwrite(copybuf, block, 1, mps_file_out);
+                         gbfread(copybuf, block, 1, mps_file_temp);
+                         gbfwrite(copybuf, block, 1, mps_file_out);
                        }
                        
                        if (recType != 'V') {
-                               fread(&reclen, 4, 1, mps_file_temp);
-                               reclen2 = le_read32(&reclen);
+                               reclen2 = gbfgetint32(mps_file_temp);
 
-                               /* Read the record type "flag" in - using fread in case in the future need more than one char */
-                               fread(&recType, 1, 1, mps_file_temp);
+                               /* Read the record type "flag" in - using gbfread in case in the future need more than one char */
+                               gbfread(&recType, 1, 1, mps_file_temp);
                        }
                        else break;
                }
diff --git a/mingw/includew/expat.h b/mingw/includew/expat.h
new file mode 100644 (file)
index 0000000..c6a4b3b
--- /dev/null
@@ -0,0 +1,1013 @@
+/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd\r
+   See the file COPYING for copying permission.\r
+*/\r
+\r
+#ifndef Expat_INCLUDED\r
+#define Expat_INCLUDED 1\r
+\r
+#ifdef __VMS\r
+/*      0        1         2         3      0        1         2         3\r
+        1234567890123456789012345678901     1234567890123456789012345678901 */\r
+#define XML_SetProcessingInstructionHandler XML_SetProcessingInstrHandler\r
+#define XML_SetUnparsedEntityDeclHandler    XML_SetUnparsedEntDeclHandler\r
+#define XML_SetStartNamespaceDeclHandler    XML_SetStartNamespcDeclHandler\r
+#define XML_SetExternalEntityRefHandlerArg  XML_SetExternalEntRefHandlerArg\r
+#endif\r
+\r
+#include <stdlib.h>\r
+#include "expat_external.h"\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+struct XML_ParserStruct;\r
+typedef struct XML_ParserStruct *XML_Parser;\r
+\r
+/* Should this be defined using stdbool.h when C99 is available? */\r
+typedef unsigned char XML_Bool;\r
+#define XML_TRUE   ((XML_Bool) 1)\r
+#define XML_FALSE  ((XML_Bool) 0)\r
+\r
+/* The XML_Status enum gives the possible return values for several\r
+   API functions.  The preprocessor #defines are included so this\r
+   stanza can be added to code that still needs to support older\r
+   versions of Expat 1.95.x:\r
+\r
+   #ifndef XML_STATUS_OK\r
+   #define XML_STATUS_OK    1\r
+   #define XML_STATUS_ERROR 0\r
+   #endif\r
+\r
+   Otherwise, the #define hackery is quite ugly and would have been\r
+   dropped.\r
+*/\r
+enum XML_Status {\r
+  XML_STATUS_ERROR = 0,\r
+#define XML_STATUS_ERROR XML_STATUS_ERROR\r
+  XML_STATUS_OK = 1,\r
+#define XML_STATUS_OK XML_STATUS_OK\r
+  XML_STATUS_SUSPENDED = 2\r
+#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED\r
+};\r
+\r
+enum XML_Error {\r
+  XML_ERROR_NONE,\r
+  XML_ERROR_NO_MEMORY,\r
+  XML_ERROR_SYNTAX,\r
+  XML_ERROR_NO_ELEMENTS,\r
+  XML_ERROR_INVALID_TOKEN,\r
+  XML_ERROR_UNCLOSED_TOKEN,\r
+  XML_ERROR_PARTIAL_CHAR,\r
+  XML_ERROR_TAG_MISMATCH,\r
+  XML_ERROR_DUPLICATE_ATTRIBUTE,\r
+  XML_ERROR_JUNK_AFTER_DOC_ELEMENT,\r
+  XML_ERROR_PARAM_ENTITY_REF,\r
+  XML_ERROR_UNDEFINED_ENTITY,\r
+  XML_ERROR_RECURSIVE_ENTITY_REF,\r
+  XML_ERROR_ASYNC_ENTITY,\r
+  XML_ERROR_BAD_CHAR_REF,\r
+  XML_ERROR_BINARY_ENTITY_REF,\r
+  XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,\r
+  XML_ERROR_MISPLACED_XML_PI,\r
+  XML_ERROR_UNKNOWN_ENCODING,\r
+  XML_ERROR_INCORRECT_ENCODING,\r
+  XML_ERROR_UNCLOSED_CDATA_SECTION,\r
+  XML_ERROR_EXTERNAL_ENTITY_HANDLING,\r
+  XML_ERROR_NOT_STANDALONE,\r
+  XML_ERROR_UNEXPECTED_STATE,\r
+  XML_ERROR_ENTITY_DECLARED_IN_PE,\r
+  XML_ERROR_FEATURE_REQUIRES_XML_DTD,\r
+  XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING,\r
+  /* Added in 1.95.7. */\r
+  XML_ERROR_UNBOUND_PREFIX,\r
+  /* Added in 1.95.8. */\r
+  XML_ERROR_UNDECLARING_PREFIX,\r
+  XML_ERROR_INCOMPLETE_PE,\r
+  XML_ERROR_XML_DECL,\r
+  XML_ERROR_TEXT_DECL,\r
+  XML_ERROR_PUBLICID,\r
+  XML_ERROR_SUSPENDED,\r
+  XML_ERROR_NOT_SUSPENDED,\r
+  XML_ERROR_ABORTED,\r
+  XML_ERROR_FINISHED,\r
+  XML_ERROR_SUSPEND_PE,\r
+  /* Added in 2.0. */\r
+  XML_ERROR_RESERVED_PREFIX_XML,\r
+  XML_ERROR_RESERVED_PREFIX_XMLNS,\r
+  XML_ERROR_RESERVED_NAMESPACE_URI\r
+};\r
+\r
+enum XML_Content_Type {\r
+  XML_CTYPE_EMPTY = 1,\r
+  XML_CTYPE_ANY,\r
+  XML_CTYPE_MIXED,\r
+  XML_CTYPE_NAME,\r
+  XML_CTYPE_CHOICE,\r
+  XML_CTYPE_SEQ\r
+};\r
+\r
+enum XML_Content_Quant {\r
+  XML_CQUANT_NONE,\r
+  XML_CQUANT_OPT,\r
+  XML_CQUANT_REP,\r
+  XML_CQUANT_PLUS\r
+};\r
+\r
+/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be\r
+   XML_CQUANT_NONE, and the other fields will be zero or NULL.\r
+   If type == XML_CTYPE_MIXED, then quant will be NONE or REP and\r
+   numchildren will contain number of elements that may be mixed in\r
+   and children point to an array of XML_Content cells that will be\r
+   all of XML_CTYPE_NAME type with no quantification.\r
+\r
+   If type == XML_CTYPE_NAME, then the name points to the name, and\r
+   the numchildren field will be zero and children will be NULL. The\r
+   quant fields indicates any quantifiers placed on the name.\r
+\r
+   CHOICE and SEQ will have name NULL, the number of children in\r
+   numchildren and children will point, recursively, to an array\r
+   of XML_Content cells.\r
+\r
+   The EMPTY, ANY, and MIXED types will only occur at top level.\r
+*/\r
+\r
+typedef struct XML_cp XML_Content;\r
+\r
+struct XML_cp {\r
+  enum XML_Content_Type         type;\r
+  enum XML_Content_Quant        quant;\r
+  XML_Char *                    name;\r
+  unsigned int                  numchildren;\r
+  XML_Content *                 children;\r
+};\r
+\r
+\r
+/* This is called for an element declaration. See above for\r
+   description of the model argument. It's the caller's responsibility\r
+   to free model when finished with it.\r
+*/\r
+typedef void (XMLCALL *XML_ElementDeclHandler) (void *userData,\r
+                                                const XML_Char *name,\r
+                                                XML_Content *model);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetElementDeclHandler(XML_Parser parser,\r
+                          XML_ElementDeclHandler eldecl);\r
+\r
+/* The Attlist declaration handler is called for *each* attribute. So\r
+   a single Attlist declaration with multiple attributes declared will\r
+   generate multiple calls to this handler. The "default" parameter\r
+   may be NULL in the case of the "#IMPLIED" or "#REQUIRED"\r
+   keyword. The "isrequired" parameter will be true and the default\r
+   value will be NULL in the case of "#REQUIRED". If "isrequired" is\r
+   true and default is non-NULL, then this is a "#FIXED" default.\r
+*/\r
+typedef void (XMLCALL *XML_AttlistDeclHandler) (\r
+                                    void            *userData,\r
+                                    const XML_Char  *elname,\r
+                                    const XML_Char  *attname,\r
+                                    const XML_Char  *att_type,\r
+                                    const XML_Char  *dflt,\r
+                                    int              isrequired);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetAttlistDeclHandler(XML_Parser parser,\r
+                          XML_AttlistDeclHandler attdecl);\r
+\r
+/* The XML declaration handler is called for *both* XML declarations\r
+   and text declarations. The way to distinguish is that the version\r
+   parameter will be NULL for text declarations. The encoding\r
+   parameter may be NULL for XML declarations. The standalone\r
+   parameter will be -1, 0, or 1 indicating respectively that there\r
+   was no standalone parameter in the declaration, that it was given\r
+   as no, or that it was given as yes.\r
+*/\r
+typedef void (XMLCALL *XML_XmlDeclHandler) (void           *userData,\r
+                                            const XML_Char *version,\r
+                                            const XML_Char *encoding,\r
+                                            int             standalone);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetXmlDeclHandler(XML_Parser parser,\r
+                      XML_XmlDeclHandler xmldecl);\r
+\r
+\r
+typedef struct {\r
+  void *(*malloc_fcn)(size_t size);\r
+  void *(*realloc_fcn)(void *ptr, size_t size);\r
+  void (*free_fcn)(void *ptr);\r
+} XML_Memory_Handling_Suite;\r
+\r
+/* Constructs a new parser; encoding is the encoding specified by the\r
+   external protocol or NULL if there is none specified.\r
+*/\r
+XMLPARSEAPI(XML_Parser)\r
+XML_ParserCreate(const XML_Char *encoding);\r
+\r
+/* Constructs a new parser and namespace processor.  Element type\r
+   names and attribute names that belong to a namespace will be\r
+   expanded; unprefixed attribute names are never expanded; unprefixed\r
+   element type names are expanded only if there is a default\r
+   namespace. The expanded name is the concatenation of the namespace\r
+   URI, the namespace separator character, and the local part of the\r
+   name.  If the namespace separator is '\0' then the namespace URI\r
+   and the local part will be concatenated without any separator.\r
+   It is a programming error to use the separator '\0' with namespace\r
+   triplets (see XML_SetReturnNSTriplet).\r
+*/\r
+XMLPARSEAPI(XML_Parser)\r
+XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);\r
+\r
+\r
+/* Constructs a new parser using the memory management suite referred to\r
+   by memsuite. If memsuite is NULL, then use the standard library memory\r
+   suite. If namespaceSeparator is non-NULL it creates a parser with\r
+   namespace processing as described above. The character pointed at\r
+   will serve as the namespace separator.\r
+\r
+   All further memory operations used for the created parser will come from\r
+   the given suite.\r
+*/\r
+XMLPARSEAPI(XML_Parser)\r
+XML_ParserCreate_MM(const XML_Char *encoding,\r
+                    const XML_Memory_Handling_Suite *memsuite,\r
+                    const XML_Char *namespaceSeparator);\r
+\r
+/* Prepare a parser object to be re-used.  This is particularly\r
+   valuable when memory allocation overhead is disproportionatly high,\r
+   such as when a large number of small documnents need to be parsed.\r
+   All handlers are cleared from the parser, except for the\r
+   unknownEncodingHandler. The parser's external state is re-initialized\r
+   except for the values of ns and ns_triplets.\r
+\r
+   Added in Expat 1.95.3.\r
+*/\r
+XMLPARSEAPI(XML_Bool)\r
+XML_ParserReset(XML_Parser parser, const XML_Char *encoding);\r
+\r
+/* atts is array of name/value pairs, terminated by 0;\r
+   names and values are 0 terminated.\r
+*/\r
+typedef void (XMLCALL *XML_StartElementHandler) (void *userData,\r
+                                                 const XML_Char *name,\r
+                                                 const XML_Char **atts);\r
+\r
+typedef void (XMLCALL *XML_EndElementHandler) (void *userData,\r
+                                               const XML_Char *name);\r
+\r
+\r
+/* s is not 0 terminated. */\r
+typedef void (XMLCALL *XML_CharacterDataHandler) (void *userData,\r
+                                                  const XML_Char *s,\r
+                                                  int len);\r
+\r
+/* target and data are 0 terminated */\r
+typedef void (XMLCALL *XML_ProcessingInstructionHandler) (\r
+                                                void *userData,\r
+                                                const XML_Char *target,\r
+                                                const XML_Char *data);\r
+\r
+/* data is 0 terminated */\r
+typedef void (XMLCALL *XML_CommentHandler) (void *userData,\r
+                                            const XML_Char *data);\r
+\r
+typedef void (XMLCALL *XML_StartCdataSectionHandler) (void *userData);\r
+typedef void (XMLCALL *XML_EndCdataSectionHandler) (void *userData);\r
+\r
+/* This is called for any characters in the XML document for which\r
+   there is no applicable handler.  This includes both characters that\r
+   are part of markup which is of a kind that is not reported\r
+   (comments, markup declarations), or characters that are part of a\r
+   construct which could be reported but for which no handler has been\r
+   supplied. The characters are passed exactly as they were in the XML\r
+   document except that they will be encoded in UTF-8 or UTF-16.\r
+   Line boundaries are not normalized. Note that a byte order mark\r
+   character is not passed to the default handler. There are no\r
+   guarantees about how characters are divided between calls to the\r
+   default handler: for example, a comment might be split between\r
+   multiple calls.\r
+*/\r
+typedef void (XMLCALL *XML_DefaultHandler) (void *userData,\r
+                                            const XML_Char *s,\r
+                                            int len);\r
+\r
+/* This is called for the start of the DOCTYPE declaration, before\r
+   any DTD or internal subset is parsed.\r
+*/\r
+typedef void (XMLCALL *XML_StartDoctypeDeclHandler) (\r
+                                            void *userData,\r
+                                            const XML_Char *doctypeName,\r
+                                            const XML_Char *sysid,\r
+                                            const XML_Char *pubid,\r
+                                            int has_internal_subset);\r
+\r
+/* This is called for the start of the DOCTYPE declaration when the\r
+   closing > is encountered, but after processing any external\r
+   subset.\r
+*/\r
+typedef void (XMLCALL *XML_EndDoctypeDeclHandler)(void *userData);\r
+\r
+/* This is called for entity declarations. The is_parameter_entity\r
+   argument will be non-zero if the entity is a parameter entity, zero\r
+   otherwise.\r
+\r
+   For internal entities (<!ENTITY foo "bar">), value will\r
+   be non-NULL and systemId, publicID, and notationName will be NULL.\r
+   The value string is NOT nul-terminated; the length is provided in\r
+   the value_length argument. Since it is legal to have zero-length\r
+   values, do not use this argument to test for internal entities.\r
+\r
+   For external entities, value will be NULL and systemId will be\r
+   non-NULL. The publicId argument will be NULL unless a public\r
+   identifier was provided. The notationName argument will have a\r
+   non-NULL value only for unparsed entity declarations.\r
+\r
+   Note that is_parameter_entity can't be changed to XML_Bool, since\r
+   that would break binary compatibility.\r
+*/\r
+typedef void (XMLCALL *XML_EntityDeclHandler) (\r
+                              void *userData,\r
+                              const XML_Char *entityName,\r
+                              int is_parameter_entity,\r
+                              const XML_Char *value,\r
+                              int value_length,\r
+                              const XML_Char *base,\r
+                              const XML_Char *systemId,\r
+                              const XML_Char *publicId,\r
+                              const XML_Char *notationName);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetEntityDeclHandler(XML_Parser parser,\r
+                         XML_EntityDeclHandler handler);\r
+\r
+/* OBSOLETE -- OBSOLETE -- OBSOLETE\r
+   This handler has been superceded by the EntityDeclHandler above.\r
+   It is provided here for backward compatibility.\r
+\r
+   This is called for a declaration of an unparsed (NDATA) entity.\r
+   The base argument is whatever was set by XML_SetBase. The\r
+   entityName, systemId and notationName arguments will never be\r
+   NULL. The other arguments may be.\r
+*/\r
+typedef void (XMLCALL *XML_UnparsedEntityDeclHandler) (\r
+                                    void *userData,\r
+                                    const XML_Char *entityName,\r
+                                    const XML_Char *base,\r
+                                    const XML_Char *systemId,\r
+                                    const XML_Char *publicId,\r
+                                    const XML_Char *notationName);\r
+\r
+/* This is called for a declaration of notation.  The base argument is\r
+   whatever was set by XML_SetBase. The notationName will never be\r
+   NULL.  The other arguments can be.\r
+*/\r
+typedef void (XMLCALL *XML_NotationDeclHandler) (\r
+                                    void *userData,\r
+                                    const XML_Char *notationName,\r
+                                    const XML_Char *base,\r
+                                    const XML_Char *systemId,\r
+                                    const XML_Char *publicId);\r
+\r
+/* When namespace processing is enabled, these are called once for\r
+   each namespace declaration. The call to the start and end element\r
+   handlers occur between the calls to the start and end namespace\r
+   declaration handlers. For an xmlns attribute, prefix will be\r
+   NULL.  For an xmlns="" attribute, uri will be NULL.\r
+*/\r
+typedef void (XMLCALL *XML_StartNamespaceDeclHandler) (\r
+                                    void *userData,\r
+                                    const XML_Char *prefix,\r
+                                    const XML_Char *uri);\r
+\r
+typedef void (XMLCALL *XML_EndNamespaceDeclHandler) (\r
+                                    void *userData,\r
+                                    const XML_Char *prefix);\r
+\r
+/* This is called if the document is not standalone, that is, it has an\r
+   external subset or a reference to a parameter entity, but does not\r
+   have standalone="yes". If this handler returns XML_STATUS_ERROR,\r
+   then processing will not continue, and the parser will return a\r
+   XML_ERROR_NOT_STANDALONE error.\r
+   If parameter entity parsing is enabled, then in addition to the\r
+   conditions above this handler will only be called if the referenced\r
+   entity was actually read.\r
+*/\r
+typedef int (XMLCALL *XML_NotStandaloneHandler) (void *userData);\r
+\r
+/* This is called for a reference to an external parsed general\r
+   entity.  The referenced entity is not automatically parsed.  The\r
+   application can parse it immediately or later using\r
+   XML_ExternalEntityParserCreate.\r
+\r
+   The parser argument is the parser parsing the entity containing the\r
+   reference; it can be passed as the parser argument to\r
+   XML_ExternalEntityParserCreate.  The systemId argument is the\r
+   system identifier as specified in the entity declaration; it will\r
+   not be NULL.\r
+\r
+   The base argument is the system identifier that should be used as\r
+   the base for resolving systemId if systemId was relative; this is\r
+   set by XML_SetBase; it may be NULL.\r
+\r
+   The publicId argument is the public identifier as specified in the\r
+   entity declaration, or NULL if none was specified; the whitespace\r
+   in the public identifier will have been normalized as required by\r
+   the XML spec.\r
+\r
+   The context argument specifies the parsing context in the format\r
+   expected by the context argument to XML_ExternalEntityParserCreate;\r
+   context is valid only until the handler returns, so if the\r
+   referenced entity is to be parsed later, it must be copied.\r
+   context is NULL only when the entity is a parameter entity.\r
+\r
+   The handler should return XML_STATUS_ERROR if processing should not\r
+   continue because of a fatal error in the handling of the external\r
+   entity.  In this case the calling parser will return an\r
+   XML_ERROR_EXTERNAL_ENTITY_HANDLING error.\r
+\r
+   Note that unlike other handlers the first argument is the parser,\r
+   not userData.\r
+*/\r
+typedef int (XMLCALL *XML_ExternalEntityRefHandler) (\r
+                                    XML_Parser parser,\r
+                                    const XML_Char *context,\r
+                                    const XML_Char *base,\r
+                                    const XML_Char *systemId,\r
+                                    const XML_Char *publicId);\r
+\r
+/* This is called in two situations:\r
+   1) An entity reference is encountered for which no declaration\r
+      has been read *and* this is not an error.\r
+   2) An internal entity reference is read, but not expanded, because\r
+      XML_SetDefaultHandler has been called.\r
+   Note: skipped parameter entities in declarations and skipped general\r
+         entities in attribute values cannot be reported, because\r
+         the event would be out of sync with the reporting of the\r
+         declarations or attribute values\r
+*/\r
+typedef void (XMLCALL *XML_SkippedEntityHandler) (\r
+                                    void *userData,\r
+                                    const XML_Char *entityName,\r
+                                    int is_parameter_entity);\r
+\r
+/* This structure is filled in by the XML_UnknownEncodingHandler to\r
+   provide information to the parser about encodings that are unknown\r
+   to the parser.\r
+\r
+   The map[b] member gives information about byte sequences whose\r
+   first byte is b.\r
+\r
+   If map[b] is c where c is >= 0, then b by itself encodes the\r
+   Unicode scalar value c.\r
+\r
+   If map[b] is -1, then the byte sequence is malformed.\r
+\r
+   If map[b] is -n, where n >= 2, then b is the first byte of an\r
+   n-byte sequence that encodes a single Unicode scalar value.\r
+\r
+   The data member will be passed as the first argument to the convert\r
+   function.\r
+\r
+   The convert function is used to convert multibyte sequences; s will\r
+   point to a n-byte sequence where map[(unsigned char)*s] == -n.  The\r
+   convert function must return the Unicode scalar value represented\r
+   by this byte sequence or -1 if the byte sequence is malformed.\r
+\r
+   The convert function may be NULL if the encoding is a single-byte\r
+   encoding, that is if map[b] >= -1 for all bytes b.\r
+\r
+   When the parser is finished with the encoding, then if release is\r
+   not NULL, it will call release passing it the data member; once\r
+   release has been called, the convert function will not be called\r
+   again.\r
+\r
+   Expat places certain restrictions on the encodings that are supported\r
+   using this mechanism.\r
+\r
+   1. Every ASCII character that can appear in a well-formed XML document,\r
+      other than the characters\r
+\r
+      $@\^`{}~\r
+\r
+      must be represented by a single byte, and that byte must be the\r
+      same byte that represents that character in ASCII.\r
+\r
+   2. No character may require more than 4 bytes to encode.\r
+\r
+   3. All characters encoded must have Unicode scalar values <=\r
+      0xFFFF, (i.e., characters that would be encoded by surrogates in\r
+      UTF-16 are  not allowed).  Note that this restriction doesn't\r
+      apply to the built-in support for UTF-8 and UTF-16.\r
+\r
+   4. No Unicode character may be encoded by more than one distinct\r
+      sequence of bytes.\r
+*/\r
+typedef struct {\r
+  int map[256];\r
+  void *data;\r
+  int (XMLCALL *convert)(void *data, const char *s);\r
+  void (XMLCALL *release)(void *data);\r
+} XML_Encoding;\r
+\r
+/* This is called for an encoding that is unknown to the parser.\r
+\r
+   The encodingHandlerData argument is that which was passed as the\r
+   second argument to XML_SetUnknownEncodingHandler.\r
+\r
+   The name argument gives the name of the encoding as specified in\r
+   the encoding declaration.\r
+\r
+   If the callback can provide information about the encoding, it must\r
+   fill in the XML_Encoding structure, and return XML_STATUS_OK.\r
+   Otherwise it must return XML_STATUS_ERROR.\r
+\r
+   If info does not describe a suitable encoding, then the parser will\r
+   return an XML_UNKNOWN_ENCODING error.\r
+*/\r
+typedef int (XMLCALL *XML_UnknownEncodingHandler) (\r
+                                    void *encodingHandlerData,\r
+                                    const XML_Char *name,\r
+                                    XML_Encoding *info);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetElementHandler(XML_Parser parser,\r
+                      XML_StartElementHandler start,\r
+                      XML_EndElementHandler end);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetStartElementHandler(XML_Parser parser,\r
+                           XML_StartElementHandler handler);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetEndElementHandler(XML_Parser parser,\r
+                         XML_EndElementHandler handler);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetCharacterDataHandler(XML_Parser parser,\r
+                            XML_CharacterDataHandler handler);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetProcessingInstructionHandler(XML_Parser parser,\r
+                                    XML_ProcessingInstructionHandler handler);\r
+XMLPARSEAPI(void)\r
+XML_SetCommentHandler(XML_Parser parser,\r
+                      XML_CommentHandler handler);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetCdataSectionHandler(XML_Parser parser,\r
+                           XML_StartCdataSectionHandler start,\r
+                           XML_EndCdataSectionHandler end);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetStartCdataSectionHandler(XML_Parser parser,\r
+                                XML_StartCdataSectionHandler start);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetEndCdataSectionHandler(XML_Parser parser,\r
+                              XML_EndCdataSectionHandler end);\r
+\r
+/* This sets the default handler and also inhibits expansion of\r
+   internal entities. These entity references will be passed to the\r
+   default handler, or to the skipped entity handler, if one is set.\r
+*/\r
+XMLPARSEAPI(void)\r
+XML_SetDefaultHandler(XML_Parser parser,\r
+                      XML_DefaultHandler handler);\r
+\r
+/* This sets the default handler but does not inhibit expansion of\r
+   internal entities.  The entity reference will not be passed to the\r
+   default handler.\r
+*/\r
+XMLPARSEAPI(void)\r
+XML_SetDefaultHandlerExpand(XML_Parser parser,\r
+                            XML_DefaultHandler handler);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetDoctypeDeclHandler(XML_Parser parser,\r
+                          XML_StartDoctypeDeclHandler start,\r
+                          XML_EndDoctypeDeclHandler end);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetStartDoctypeDeclHandler(XML_Parser parser,\r
+                               XML_StartDoctypeDeclHandler start);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetEndDoctypeDeclHandler(XML_Parser parser,\r
+                             XML_EndDoctypeDeclHandler end);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetUnparsedEntityDeclHandler(XML_Parser parser,\r
+                                 XML_UnparsedEntityDeclHandler handler);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetNotationDeclHandler(XML_Parser parser,\r
+                           XML_NotationDeclHandler handler);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetNamespaceDeclHandler(XML_Parser parser,\r
+                            XML_StartNamespaceDeclHandler start,\r
+                            XML_EndNamespaceDeclHandler end);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetStartNamespaceDeclHandler(XML_Parser parser,\r
+                                 XML_StartNamespaceDeclHandler start);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetEndNamespaceDeclHandler(XML_Parser parser,\r
+                               XML_EndNamespaceDeclHandler end);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetNotStandaloneHandler(XML_Parser parser,\r
+                            XML_NotStandaloneHandler handler);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetExternalEntityRefHandler(XML_Parser parser,\r
+                                XML_ExternalEntityRefHandler handler);\r
+\r
+/* If a non-NULL value for arg is specified here, then it will be\r
+   passed as the first argument to the external entity ref handler\r
+   instead of the parser object.\r
+*/\r
+XMLPARSEAPI(void)\r
+XML_SetExternalEntityRefHandlerArg(XML_Parser parser,\r
+                                   void *arg);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetSkippedEntityHandler(XML_Parser parser,\r
+                            XML_SkippedEntityHandler handler);\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetUnknownEncodingHandler(XML_Parser parser,\r
+                              XML_UnknownEncodingHandler handler,\r
+                              void *encodingHandlerData);\r
+\r
+/* This can be called within a handler for a start element, end\r
+   element, processing instruction or character data.  It causes the\r
+   corresponding markup to be passed to the default handler.\r
+*/\r
+XMLPARSEAPI(void)\r
+XML_DefaultCurrent(XML_Parser parser);\r
+\r
+/* If do_nst is non-zero, and namespace processing is in effect, and\r
+   a name has a prefix (i.e. an explicit namespace qualifier) then\r
+   that name is returned as a triplet in a single string separated by\r
+   the separator character specified when the parser was created: URI\r
+   + sep + local_name + sep + prefix.\r
+\r
+   If do_nst is zero, then namespace information is returned in the\r
+   default manner (URI + sep + local_name) whether or not the name\r
+   has a prefix.\r
+\r
+   Note: Calling XML_SetReturnNSTriplet after XML_Parse or\r
+     XML_ParseBuffer has no effect.\r
+*/\r
+\r
+XMLPARSEAPI(void)\r
+XML_SetReturnNSTriplet(XML_Parser parser, int do_nst);\r
+\r
+/* This value is passed as the userData argument to callbacks. */\r
+XMLPARSEAPI(void)\r
+XML_SetUserData(XML_Parser parser, void *userData);\r
+\r
+/* Returns the last value set by XML_SetUserData or NULL. */\r
+#define XML_GetUserData(parser) (*(void **)(parser))\r
+\r
+/* This is equivalent to supplying an encoding argument to\r
+   XML_ParserCreate. On success XML_SetEncoding returns non-zero,\r
+   zero otherwise.\r
+   Note: Calling XML_SetEncoding after XML_Parse or XML_ParseBuffer\r
+     has no effect and returns XML_STATUS_ERROR.\r
+*/\r
+XMLPARSEAPI(enum XML_Status)\r
+XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);\r
+\r
+/* If this function is called, then the parser will be passed as the\r
+   first argument to callbacks instead of userData.  The userData will\r
+   still be accessible using XML_GetUserData.\r
+*/\r
+XMLPARSEAPI(void)\r
+XML_UseParserAsHandlerArg(XML_Parser parser);\r
+\r
+/* If useDTD == XML_TRUE is passed to this function, then the parser\r
+   will assume that there is an external subset, even if none is\r
+   specified in the document. In such a case the parser will call the\r
+   externalEntityRefHandler with a value of NULL for the systemId\r
+   argument (the publicId and context arguments will be NULL as well).\r
+   Note: For the purpose of checking WFC: Entity Declared, passing\r
+     useDTD == XML_TRUE will make the parser behave as if the document\r
+     had a DTD with an external subset.\r
+   Note: If this function is called, then this must be done before\r
+     the first call to XML_Parse or XML_ParseBuffer, since it will\r
+     have no effect after that.  Returns\r
+     XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING.\r
+   Note: If the document does not have a DOCTYPE declaration at all,\r
+     then startDoctypeDeclHandler and endDoctypeDeclHandler will not\r
+     be called, despite an external subset being parsed.\r
+   Note: If XML_DTD is not defined when Expat is compiled, returns\r
+     XML_ERROR_FEATURE_REQUIRES_XML_DTD.\r
+*/\r
+XMLPARSEAPI(enum XML_Error)\r
+XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);\r
+\r
+\r
+/* Sets the base to be used for resolving relative URIs in system\r
+   identifiers in declarations.  Resolving relative identifiers is\r
+   left to the application: this value will be passed through as the\r
+   base argument to the XML_ExternalEntityRefHandler,\r
+   XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base\r
+   argument will be copied.  Returns XML_STATUS_ERROR if out of memory,\r
+   XML_STATUS_OK otherwise.\r
+*/\r
+XMLPARSEAPI(enum XML_Status)\r
+XML_SetBase(XML_Parser parser, const XML_Char *base);\r
+\r
+XMLPARSEAPI(const XML_Char *)\r
+XML_GetBase(XML_Parser parser);\r
+\r
+/* Returns the number of the attribute/value pairs passed in last call\r
+   to the XML_StartElementHandler that were specified in the start-tag\r
+   rather than defaulted. Each attribute/value pair counts as 2; thus\r
+   this correspondds to an index into the atts array passed to the\r
+   XML_StartElementHandler.\r
+*/\r
+XMLPARSEAPI(int)\r
+XML_GetSpecifiedAttributeCount(XML_Parser parser);\r
+\r
+/* Returns the index of the ID attribute passed in the last call to\r
+   XML_StartElementHandler, or -1 if there is no ID attribute.  Each\r
+   attribute/value pair counts as 2; thus this correspondds to an\r
+   index into the atts array passed to the XML_StartElementHandler.\r
+*/\r
+XMLPARSEAPI(int)\r
+XML_GetIdAttributeIndex(XML_Parser parser);\r
+\r
+/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is\r
+   detected.  The last call to XML_Parse must have isFinal true; len\r
+   may be zero for this call (or any other).\r
+\r
+   Though the return values for these functions has always been\r
+   described as a Boolean value, the implementation, at least for the\r
+   1.95.x series, has always returned exactly one of the XML_Status\r
+   values.\r
+*/\r
+XMLPARSEAPI(enum XML_Status)\r
+XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);\r
+\r
+XMLPARSEAPI(void *)\r
+XML_GetBuffer(XML_Parser parser, int len);\r
+\r
+XMLPARSEAPI(enum XML_Status)\r
+XML_ParseBuffer(XML_Parser parser, int len, int isFinal);\r
+\r
+/* Stops parsing, causing XML_Parse() or XML_ParseBuffer() to return.\r
+   Must be called from within a call-back handler, except when aborting\r
+   (resumable = 0) an already suspended parser. Some call-backs may\r
+   still follow because they would otherwise get lost. Examples:\r
+   - endElementHandler() for empty elements when stopped in\r
+     startElementHandler(), \r
+   - endNameSpaceDeclHandler() when stopped in endElementHandler(), \r
+   and possibly others.\r
+\r
+   Can be called from most handlers, including DTD related call-backs,\r
+   except when parsing an external parameter entity and resumable != 0.\r
+   Returns XML_STATUS_OK when successful, XML_STATUS_ERROR otherwise.\r
+   Possible error codes: \r
+   - XML_ERROR_SUSPENDED: when suspending an already suspended parser.\r
+   - XML_ERROR_FINISHED: when the parser has already finished.\r
+   - XML_ERROR_SUSPEND_PE: when suspending while parsing an external PE.\r
+\r
+   When resumable != 0 (true) then parsing is suspended, that is, \r
+   XML_Parse() and XML_ParseBuffer() return XML_STATUS_SUSPENDED. \r
+   Otherwise, parsing is aborted, that is, XML_Parse() and XML_ParseBuffer()\r
+   return XML_STATUS_ERROR with error code XML_ERROR_ABORTED.\r
+\r
+   *Note*:\r
+   This will be applied to the current parser instance only, that is, if\r
+   there is a parent parser then it will continue parsing when the\r
+   externalEntityRefHandler() returns. It is up to the implementation of\r
+   the externalEntityRefHandler() to call XML_StopParser() on the parent\r
+   parser (recursively), if one wants to stop parsing altogether.\r
+\r
+   When suspended, parsing can be resumed by calling XML_ResumeParser(). \r
+*/\r
+XMLPARSEAPI(enum XML_Status)\r
+XML_StopParser(XML_Parser parser, XML_Bool resumable);\r
+\r
+/* Resumes parsing after it has been suspended with XML_StopParser().\r
+   Must not be called from within a handler call-back. Returns same\r
+   status codes as XML_Parse() or XML_ParseBuffer().\r
+   Additional error code XML_ERROR_NOT_SUSPENDED possible.   \r
+\r
+   *Note*:\r
+   This must be called on the most deeply nested child parser instance\r
+   first, and on its parent parser only after the child parser has finished,\r
+   to be applied recursively until the document entity's parser is restarted.\r
+   That is, the parent parser will not resume by itself and it is up to the\r
+   application to call XML_ResumeParser() on it at the appropriate moment.\r
+*/\r
+XMLPARSEAPI(enum XML_Status)\r
+XML_ResumeParser(XML_Parser parser);\r
+\r
+enum XML_Parsing {\r
+  XML_INITIALIZED,\r
+  XML_PARSING,\r
+  XML_FINISHED,\r
+  XML_SUSPENDED\r
+};\r
+\r
+typedef struct {\r
+  enum XML_Parsing parsing;\r
+  XML_Bool finalBuffer;\r
+} XML_ParsingStatus;\r
+\r
+/* Returns status of parser with respect to being initialized, parsing,\r
+   finished, or suspended and processing the final buffer.\r
+   XXX XML_Parse() and XML_ParseBuffer() should return XML_ParsingStatus,\r
+   XXX with XML_FINISHED_OK or XML_FINISHED_ERROR replacing XML_FINISHED\r
+*/\r
+XMLPARSEAPI(void)\r
+XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status);\r
+\r
+/* Creates an XML_Parser object that can parse an external general\r
+   entity; context is a '\0'-terminated string specifying the parse\r
+   context; encoding is a '\0'-terminated string giving the name of\r
+   the externally specified encoding, or NULL if there is no\r
+   externally specified encoding.  The context string consists of a\r
+   sequence of tokens separated by formfeeds (\f); a token consisting\r
+   of a name specifies that the general entity of the name is open; a\r
+   token of the form prefix=uri specifies the namespace for a\r
+   particular prefix; a token of the form =uri specifies the default\r
+   namespace.  This can be called at any point after the first call to\r
+   an ExternalEntityRefHandler so longer as the parser has not yet\r
+   been freed.  The new parser is completely independent and may\r
+   safely be used in a separate thread.  The handlers and userData are\r
+   initialized from the parser argument.  Returns NULL if out of memory.\r
+   Otherwise returns a new XML_Parser object.\r
+*/\r
+XMLPARSEAPI(XML_Parser)\r
+XML_ExternalEntityParserCreate(XML_Parser parser,\r
+                               const XML_Char *context,\r
+                               const XML_Char *encoding);\r
+\r
+enum XML_ParamEntityParsing {\r
+  XML_PARAM_ENTITY_PARSING_NEVER,\r
+  XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE,\r
+  XML_PARAM_ENTITY_PARSING_ALWAYS\r
+};\r
+\r
+/* Controls parsing of parameter entities (including the external DTD\r
+   subset). If parsing of parameter entities is enabled, then\r
+   references to external parameter entities (including the external\r
+   DTD subset) will be passed to the handler set with\r
+   XML_SetExternalEntityRefHandler.  The context passed will be 0.\r
+\r
+   Unlike external general entities, external parameter entities can\r
+   only be parsed synchronously.  If the external parameter entity is\r
+   to be parsed, it must be parsed during the call to the external\r
+   entity ref handler: the complete sequence of\r
+   XML_ExternalEntityParserCreate, XML_Parse/XML_ParseBuffer and\r
+   XML_ParserFree calls must be made during this call.  After\r
+   XML_ExternalEntityParserCreate has been called to create the parser\r
+   for the external parameter entity (context must be 0 for this\r
+   call), it is illegal to make any calls on the old parser until\r
+   XML_ParserFree has been called on the newly created parser.\r
+   If the library has been compiled without support for parameter\r
+   entity parsing (ie without XML_DTD being defined), then\r
+   XML_SetParamEntityParsing will return 0 if parsing of parameter\r
+   entities is requested; otherwise it will return non-zero.\r
+   Note: If XML_SetParamEntityParsing is called after XML_Parse or\r
+      XML_ParseBuffer, then it has no effect and will always return 0.\r
+*/\r
+XMLPARSEAPI(int)\r
+XML_SetParamEntityParsing(XML_Parser parser,\r
+                          enum XML_ParamEntityParsing parsing);\r
+\r
+/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then\r
+   XML_GetErrorCode returns information about the error.\r
+*/\r
+XMLPARSEAPI(enum XML_Error)\r
+XML_GetErrorCode(XML_Parser parser);\r
+\r
+/* These functions return information about the current parse\r
+   location.  They may be called from any callback called to report\r
+   some parse event; in this case the location is the location of the\r
+   first of the sequence of characters that generated the event.  When\r
+   called from callbacks generated by declarations in the document\r
+   prologue, the location identified isn't as neatly defined, but will\r
+   be within the relevant markup.  When called outside of the callback\r
+   functions, the position indicated will be just past the last parse\r
+   event (regardless of whether there was an associated callback).\r
+   \r
+   They may also be called after returning from a call to XML_Parse\r
+   or XML_ParseBuffer.  If the return value is XML_STATUS_ERROR then\r
+   the location is the location of the character at which the error\r
+   was detected; otherwise the location is the location of the last\r
+   parse event, as described above.\r
+*/\r
+XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser);\r
+XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser);\r
+XMLPARSEAPI(XML_Index) XML_GetCurrentByteIndex(XML_Parser parser);\r
+\r
+/* Return the number of bytes in the current event.\r
+   Returns 0 if the event is in an internal entity.\r
+*/\r
+XMLPARSEAPI(int)\r
+XML_GetCurrentByteCount(XML_Parser parser);\r
+\r
+/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets\r
+   the integer pointed to by offset to the offset within this buffer\r
+   of the current parse position, and sets the integer pointed to by size\r
+   to the size of this buffer (the number of input bytes). Otherwise\r
+   returns a NULL pointer. Also returns a NULL pointer if a parse isn't\r
+   active.\r
+\r
+   NOTE: The character pointer returned should not be used outside\r
+   the handler that makes the call.\r
+*/\r
+XMLPARSEAPI(const char *)\r
+XML_GetInputContext(XML_Parser parser,\r
+                    int *offset,\r
+                    int *size);\r
+\r
+/* For backwards compatibility with previous versions. */\r
+#define XML_GetErrorLineNumber   XML_GetCurrentLineNumber\r
+#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber\r
+#define XML_GetErrorByteIndex    XML_GetCurrentByteIndex\r
+\r
+/* Frees the content model passed to the element declaration handler */\r
+XMLPARSEAPI(void)\r
+XML_FreeContentModel(XML_Parser parser, XML_Content *model);\r
+\r
+/* Exposing the memory handling functions used in Expat */\r
+XMLPARSEAPI(void *)\r
+XML_MemMalloc(XML_Parser parser, size_t size);\r
+\r
+XMLPARSEAPI(void *)\r
+XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);\r
+\r
+XMLPARSEAPI(void)\r
+XML_MemFree(XML_Parser parser, void *ptr);\r
+\r
+/* Frees memory used by the parser. */\r
+XMLPARSEAPI(void)\r
+XML_ParserFree(XML_Parser parser);\r
+\r
+/* Returns a string describing the error. */\r
+XMLPARSEAPI(const XML_LChar *)\r
+XML_ErrorString(enum XML_Error code);\r
+\r
+/* Return a string containing the version number of this expat */\r
+XMLPARSEAPI(const XML_LChar *)\r
+XML_ExpatVersion(void);\r
+\r
+typedef struct {\r
+  int major;\r
+  int minor;\r
+  int micro;\r
+} XML_Expat_Version;\r
+\r
+/* Return an XML_Expat_Version structure containing numeric version\r
+   number information for this version of expat.\r
+*/\r
+XMLPARSEAPI(XML_Expat_Version)\r
+XML_ExpatVersionInfo(void);\r
+\r
+/* Added in Expat 1.95.5. */\r
+enum XML_FeatureEnum {\r
+  XML_FEATURE_END = 0,\r
+  XML_FEATURE_UNICODE,\r
+  XML_FEATURE_UNICODE_WCHAR_T,\r
+  XML_FEATURE_DTD,\r
+  XML_FEATURE_CONTEXT_BYTES,\r
+  XML_FEATURE_MIN_SIZE,\r
+  XML_FEATURE_SIZEOF_XML_CHAR,\r
+  XML_FEATURE_SIZEOF_XML_LCHAR,\r
+  XML_FEATURE_NS\r
+  /* Additional features must be added to the end of this enum. */\r
+};\r
+\r
+typedef struct {\r
+  enum XML_FeatureEnum  feature;\r
+  const XML_LChar       *name;\r
+  long int              value;\r
+} XML_Feature;\r
+\r
+XMLPARSEAPI(const XML_Feature *)\r
+XML_GetFeatureList(void);\r
+\r
+\r
+/* Expat follows the GNU/Linux convention of odd number minor version for\r
+   beta/development releases and even number minor version for stable\r
+   releases. Micro is bumped with each release, and set to 0 with each\r
+   change to major or minor version.\r
+*/\r
+#define XML_MAJOR_VERSION 2\r
+#define XML_MINOR_VERSION 0\r
+#define XML_MICRO_VERSION 0\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* not Expat_INCLUDED */\r
diff --git a/mingw/includew/expat_external.h b/mingw/includew/expat_external.h
new file mode 100644 (file)
index 0000000..4cd1692
--- /dev/null
@@ -0,0 +1,115 @@
+/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd\r
+   See the file COPYING for copying permission.\r
+*/\r
+\r
+#ifndef Expat_External_INCLUDED\r
+#define Expat_External_INCLUDED 1\r
+\r
+/* External API definitions */\r
+\r
+#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)\r
+#define XML_USE_MSC_EXTENSIONS 1\r
+#endif\r
+\r
+/* Expat tries very hard to make the API boundary very specifically\r
+   defined.  There are two macros defined to control this boundary;\r
+   each of these can be defined before including this header to\r
+   achieve some different behavior, but doing so it not recommended or\r
+   tested frequently.\r
+\r
+   XMLCALL    - The calling convention to use for all calls across the\r
+                "library boundary."  This will default to cdecl, and\r
+                try really hard to tell the compiler that's what we\r
+                want.\r
+\r
+   XMLIMPORT  - Whatever magic is needed to note that a function is\r
+                to be imported from a dynamically loaded library\r
+                (.dll, .so, or .sl, depending on your platform).\r
+\r
+   The XMLCALL macro was added in Expat 1.95.7.  The only one which is\r
+   expected to be directly useful in client code is XMLCALL.\r
+\r
+   Note that on at least some Unix versions, the Expat library must be\r
+   compiled with the cdecl calling convention as the default since\r
+   system headers may assume the cdecl convention.\r
+*/\r
+#ifndef XMLCALL\r
+#if defined(XML_USE_MSC_EXTENSIONS)\r
+#define XMLCALL __cdecl\r
+#elif defined(__GNUC__) && defined(__i386)\r
+#define XMLCALL __attribute__((cdecl))\r
+#else\r
+/* For any platform which uses this definition and supports more than\r
+   one calling convention, we need to extend this definition to\r
+   declare the convention used on that platform, if it's possible to\r
+   do so.\r
+\r
+   If this is the case for your platform, please file a bug report\r
+   with information on how to identify your platform via the C\r
+   pre-processor and how to specify the same calling convention as the\r
+   platform's malloc() implementation.\r
+*/\r
+#define XMLCALL\r
+#endif\r
+#endif  /* not defined XMLCALL */\r
+\r
+\r
+#if !defined(XML_STATIC) && !defined(XMLIMPORT)\r
+#ifndef XML_BUILDING_EXPAT\r
+/* using Expat from an application */\r
+\r
+#ifdef XML_USE_MSC_EXTENSIONS\r
+#define XMLIMPORT __declspec(dllimport)\r
+#endif\r
+\r
+#endif\r
+#endif  /* not defined XML_STATIC */\r
+\r
+\r
+/* If we didn't define it above, define it away: */\r
+#ifndef XMLIMPORT\r
+#define XMLIMPORT\r
+#endif\r
+\r
+\r
+#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+#ifdef XML_UNICODE_WCHAR_T\r
+#define XML_UNICODE\r
+#endif\r
+\r
+#ifdef XML_UNICODE     /* Information is UTF-16 encoded. */\r
+#ifdef XML_UNICODE_WCHAR_T\r
+typedef wchar_t XML_Char;\r
+typedef wchar_t XML_LChar;\r
+#else\r
+typedef unsigned short XML_Char;\r
+typedef char XML_LChar;\r
+#endif /* XML_UNICODE_WCHAR_T */\r
+#else                  /* Information is UTF-8 encoded. */\r
+typedef char XML_Char;\r
+typedef char XML_LChar;\r
+#endif /* XML_UNICODE */\r
+\r
+#ifdef XML_LARGE_SIZE  /* Use large integers for file/stream positions. */\r
+#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400\r
+typedef __int64 XML_Index; \r
+typedef unsigned __int64 XML_Size;\r
+#else\r
+typedef long long XML_Index;\r
+typedef unsigned long long XML_Size;\r
+#endif\r
+#else\r
+typedef long XML_Index;\r
+typedef unsigned long XML_Size;\r
+#endif /* XML_LARGE_SIZE */\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif /* not Expat_External_INCLUDED */\r
index 754172b5032a4aad7b9398e6de0e0c27ae8a1c86..c3fb767c49c225a1b8880f533dbf3869344c1763 100644 (file)
--- a/msroute.c
+++ b/msroute.c
@@ -2,7 +2,7 @@
 
        Support for Microsoft AutoRoute 2002 ".axe" files,
        
-       Copyright (C) 2005,2007 Olaf Klein, o.b.klein@gpsbabel.org
+       Copyright (C) 2005,2007,2008 Olaf Klein, o.b.klein@gpsbabel.org
 
        This program is free software; you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
@@ -566,17 +566,15 @@ ole_deinit(void)
 static void
 msroute_read_journey(void)
 {
-       int len;
+       int bufsz;
        char *buff;
        
-       buff = ole_read_property_stream(MSROUTE_OBJ_NAME, &len);
+       buff = ole_read_property_stream(MSROUTE_OBJ_NAME, &bufsz);
                        
-       if ((buff != NULL) && (len > 0))
+       if ((buff != NULL) && (bufsz > 0))
        {
                msroute_head_t *head = (msroute_head_t *)buff;
-               char *cin;
-               int len;
-               char text[256];
+               unsigned char *cin, *cend;
                int count = 0;
                route_head *route;
                waypoint *wpt;
@@ -587,7 +585,8 @@ msroute_read_journey(void)
                version = buff[0x14];
                is_fatal((version < 1) || (version > 7), MYNAME ": Unsupported version %d!", version);
 
-               cin = buff + 71; // sizeof(msroute_head_t);
+               cin = (unsigned char *)buff + 71; // (at least?) sizeof(msroute_head_t);
+               cend = (unsigned char *)buff + bufsz;
                        
                route = route_head_alloc();
                route_add_head(route);
@@ -596,47 +595,51 @@ msroute_read_journey(void)
                
                while (count < head->waypts)
                {
-                       double lat, lon;
-                       short test;
+                       int len;
                                
-                       cin++;
-                       if (version == 7) cin+=8;
+                       /* after version 6 we've seen data with different header length */
+                       /* now we try to find the next pair of names in buff */
+
+                       while (1) {
+                               len = *cin;
+                               if ((cin + 120) > cend) {
+                                       cin = NULL;
+                                       break;
+                               }
+                               if ((cin + len < cend) &&       /* within buff ? */
+                                   (cin[len + 3] == 0xff) &&   /* 0xff before next length byte ? */
+                                   (cin[len + 4] == len) &&    /* wide string of same length ? */
+                                   (le_read16(cin + len + 1) == 0xfeff)) {
+                                       break;
+                               }
+                               cin++;
+                       }
+                       if (cin == NULL) break;
                        
-                       len = *cin++;
-                       strncpy(text, cin, len);
-                       text[len] = '\0';
+                       wpt = waypt_new();
 
-                       cin += len + 1;
-                       test = le_read16(cin);
-                       is_fatal((test != -2), MYNAME ": Unsupported byte order within data (%d).", test);
-                       
-                       cin += 2;
+                       len = *cin++;                   /* length of shortname */
+                       cin += len;
+                       cin += 3;                       /* 0xfffeff */
                        
-                       len = *cin;                     /* skip wide-string 'name' */
-                       cin += (len * 2) + 1;
-                               
+                       len = *cin++;
+                       wpt->shortname = cet_str_uni_to_utf8((const short *)cin, len);
+                       cin += (len * 2);               /* seek over wide string */
                        cin += (5 * sizeof(gbint32));   /* five unknown DWORDs */
                                
                        /* offs 12 !!!! Latitude int32 LE       */
                        /* offs 16 !!!! Longitude int32 LE      */
-                               
-                       lat = GPS_Math_Semi_To_Deg(le_read32(cin+12));
-                       lon = GPS_Math_Semi_To_Deg(le_read32(cin+16));
+                       wpt->latitude = GPS_Math_Semi_To_Deg(le_read32(cin+12));
+                       wpt->longitude = GPS_Math_Semi_To_Deg(le_read32(cin+16));
 
                        cin += (23 * sizeof(gbint32));
                        cin += 3;
-
-                       count++;
-                               
-                       wpt = waypt_new();
-                               
-                       wpt->latitude = lat;
-                       wpt->longitude = lon;
-                       wpt->shortname = xstrdup(text);
+                       
 #ifdef OLE_DEBUG
                        waypt_add(waypt_dupe(wpt));     /* put to wpt-list to see results if no output is specified */
 #endif                         
                        route_add_wpt(route, wpt);
+                       count++;
                }
        }
        
@@ -676,5 +679,5 @@ ff_vecs_t msroute_vecs = {
        NULL,
        NULL, 
        msroute_args,
-       CET_CHARSET_MS_ANSI, 1          /* CET-REVIEW */
+       CET_CHARSET_UTF8, 1             /* CET-REVIEW */
 };
index 99678856dde94704d2a8b089cc92515f53946d31..455e5b8fe2ea27d3bdf8192d691f16dcff56fc1a 100644 (file)
-/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd\r
-   See the file COPYING for copying permission.\r
-*/\r
-\r
-#ifndef XmlParse_INCLUDED\r
-#define XmlParse_INCLUDED 1\r
-\r
-#ifdef __VMS\r
-/*      0        1         2         3      0        1         2         3\r
-        1234567890123456789012345678901     1234567890123456789012345678901 */\r
-#define XML_SetProcessingInstructionHandler XML_SetProcessingInstrHandler\r
-#define XML_SetUnparsedEntityDeclHandler    XML_SetUnparsedEntDeclHandler\r
-#define XML_SetStartNamespaceDeclHandler    XML_SetStartNamespcDeclHandler\r
-#define XML_SetExternalEntityRefHandlerArg  XML_SetExternalEntRefHandlerArg\r
-#endif\r
-\r
-#include <stdlib.h>\r
-\r
-#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)\r
-#define XML_USE_MSC_EXTENSIONS 1\r
-#endif\r
-\r
-/* Expat tries very hard to make the API boundary very specifically\r
-   defined.  There are two macros defined to control this boundary;\r
-   each of these can be defined before including this header to\r
-   achieve some different behavior, but doing so it not recommended or\r
-   tested frequently.\r
-\r
-   XMLCALL    - The calling convention to use for all calls across the\r
-                "library boundary."  This will default to cdecl, and\r
-                try really hard to tell the compiler that's what we\r
-                want.\r
-\r
-   XMLIMPORT  - Whatever magic is needed to note that a function is\r
-                to be imported from a dynamically loaded library\r
-                (.dll, .so, or .sl, depending on your platform).\r
-\r
-   The XMLCALL macro was added in Expat 1.95.7.  The only one which is\r
-   expected to be directly useful in client code is XMLCALL.\r
-\r
-   Note that on at least some Unix versions, the Expat library must be\r
-   compiled with the cdecl calling convention as the default since\r
-   system headers may assume the cdecl convention.\r
-*/\r
-#ifndef XMLCALL\r
-#if defined(XML_USE_MSC_EXTENSIONS)\r
-#define XMLCALL __cdecl\r
-#elif defined(__GNUC__)\r
-#define XMLCALL __attribute__((cdecl))\r
-#else\r
-/* For any platform which uses this definition and supports more than\r
-   one calling convention, we need to extend this definition to\r
-   declare the convention used on that platform, if it's possible to\r
-   do so.\r
-\r
-   If this is the case for your platform, please file a bug report\r
-   with information on how to identify your platform via the C\r
-   pre-processor and how to specify the same calling convention as the\r
-   platform's malloc() implementation.\r
-*/\r
-#define XMLCALL\r
-#endif\r
-#endif  /* not defined XMLCALL */\r
-\r
-\r
-#if !defined(XML_STATIC) && !defined(XMLIMPORT)\r
-#ifndef XML_BUILDING_EXPAT\r
-/* using Expat from an application */\r
-\r
-#ifdef XML_USE_MSC_EXTENSIONS\r
-#define XMLIMPORT __declspec(dllimport)\r
-#endif\r
-\r
-#endif\r
-#endif  /* not defined XML_STATIC */\r
-\r
-/* If we didn't define it above, define it away: */\r
-#ifndef XMLIMPORT\r
-#define XMLIMPORT\r
-#endif\r
-\r
-\r
-#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-#ifdef XML_UNICODE_WCHAR_T\r
-#define XML_UNICODE\r
-#endif\r
-\r
-struct XML_ParserStruct;\r
-typedef struct XML_ParserStruct *XML_Parser;\r
-\r
-#ifdef XML_UNICODE     /* Information is UTF-16 encoded. */\r
-#ifdef XML_UNICODE_WCHAR_T\r
-typedef wchar_t XML_Char;\r
-typedef wchar_t XML_LChar;\r
-#else\r
-typedef unsigned short XML_Char;\r
-typedef char XML_LChar;\r
-#endif /* XML_UNICODE_WCHAR_T */\r
-#else                  /* Information is UTF-8 encoded. */\r
-typedef char XML_Char;\r
-typedef char XML_LChar;\r
-#endif /* XML_UNICODE */\r
-\r
-/* Should this be defined using stdbool.h when C99 is available? */\r
-typedef unsigned char XML_Bool;\r
-#define XML_TRUE   ((XML_Bool) 1)\r
-#define XML_FALSE  ((XML_Bool) 0)\r
-\r
-/* The XML_Status enum gives the possible return values for several\r
-   API functions.  The preprocessor #defines are included so this\r
-   stanza can be added to code that still needs to support older\r
-   versions of Expat 1.95.x:\r
-\r
-   #ifndef XML_STATUS_OK\r
-   #define XML_STATUS_OK    1\r
-   #define XML_STATUS_ERROR 0\r
-   #endif\r
-\r
-   Otherwise, the #define hackery is quite ugly and would have been\r
-   dropped.\r
-*/\r
-enum XML_Status {\r
-  XML_STATUS_ERROR = 0,\r
-#define XML_STATUS_ERROR XML_STATUS_ERROR\r
-  XML_STATUS_OK = 1\r
-#define XML_STATUS_OK XML_STATUS_OK\r
-};\r
-\r
-enum XML_Error {\r
-  XML_ERROR_NONE,\r
-  XML_ERROR_NO_MEMORY,\r
-  XML_ERROR_SYNTAX,\r
-  XML_ERROR_NO_ELEMENTS,\r
-  XML_ERROR_INVALID_TOKEN,\r
-  XML_ERROR_UNCLOSED_TOKEN,\r
-  XML_ERROR_PARTIAL_CHAR,\r
-  XML_ERROR_TAG_MISMATCH,\r
-  XML_ERROR_DUPLICATE_ATTRIBUTE,\r
-  XML_ERROR_JUNK_AFTER_DOC_ELEMENT,\r
-  XML_ERROR_PARAM_ENTITY_REF,\r
-  XML_ERROR_UNDEFINED_ENTITY,\r
-  XML_ERROR_RECURSIVE_ENTITY_REF,\r
-  XML_ERROR_ASYNC_ENTITY,\r
-  XML_ERROR_BAD_CHAR_REF,\r
-  XML_ERROR_BINARY_ENTITY_REF,\r
-  XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,\r
-  XML_ERROR_MISPLACED_XML_PI,\r
-  XML_ERROR_UNKNOWN_ENCODING,\r
-  XML_ERROR_INCORRECT_ENCODING,\r
-  XML_ERROR_UNCLOSED_CDATA_SECTION,\r
-  XML_ERROR_EXTERNAL_ENTITY_HANDLING,\r
-  XML_ERROR_NOT_STANDALONE,\r
-  XML_ERROR_UNEXPECTED_STATE,\r
-  XML_ERROR_ENTITY_DECLARED_IN_PE,\r
-  XML_ERROR_FEATURE_REQUIRES_XML_DTD,\r
-  XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING,\r
-  XML_ERROR_UNBOUND_PREFIX\r
-};\r
-\r
-enum XML_Content_Type {\r
-  XML_CTYPE_EMPTY = 1,\r
-  XML_CTYPE_ANY,\r
-  XML_CTYPE_MIXED,\r
-  XML_CTYPE_NAME,\r
-  XML_CTYPE_CHOICE,\r
-  XML_CTYPE_SEQ\r
-};\r
-\r
-enum XML_Content_Quant {\r
-  XML_CQUANT_NONE,\r
-  XML_CQUANT_OPT,\r
-  XML_CQUANT_REP,\r
-  XML_CQUANT_PLUS\r
-};\r
-\r
-/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be\r
-   XML_CQUANT_NONE, and the other fields will be zero or NULL.\r
-   If type == XML_CTYPE_MIXED, then quant will be NONE or REP and\r
-   numchildren will contain number of elements that may be mixed in\r
-   and children point to an array of XML_Content cells that will be\r
-   all of XML_CTYPE_NAME type with no quantification.\r
-\r
-   If type == XML_CTYPE_NAME, then the name points to the name, and\r
-   the numchildren field will be zero and children will be NULL. The\r
-   quant fields indicates any quantifiers placed on the name.\r
-\r
-   CHOICE and SEQ will have name NULL, the number of children in\r
-   numchildren and children will point, recursively, to an array\r
-   of XML_Content cells.\r
-\r
-   The EMPTY, ANY, and MIXED types will only occur at top level.\r
-*/\r
-\r
-typedef struct XML_cp XML_Content;\r
-\r
-struct XML_cp {\r
-  enum XML_Content_Type         type;\r
-  enum XML_Content_Quant        quant;\r
-  XML_Char *                    name;\r
-  unsigned int                  numchildren;\r
-  XML_Content *                 children;\r
-};\r
-\r
-\r
-/* This is called for an element declaration. See above for\r
-   description of the model argument. It's the caller's responsibility\r
-   to free model when finished with it.\r
-*/\r
-typedef void (XMLCALL *XML_ElementDeclHandler) (void *userData,\r
-                                                const XML_Char *name,\r
-                                                XML_Content *model);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetElementDeclHandler(XML_Parser parser,\r
-                          XML_ElementDeclHandler eldecl);\r
-\r
-/* The Attlist declaration handler is called for *each* attribute. So\r
-   a single Attlist declaration with multiple attributes declared will\r
-   generate multiple calls to this handler. The "default" parameter\r
-   may be NULL in the case of the "#IMPLIED" or "#REQUIRED"\r
-   keyword. The "isrequired" parameter will be true and the default\r
-   value will be NULL in the case of "#REQUIRED". If "isrequired" is\r
-   true and default is non-NULL, then this is a "#FIXED" default.\r
-*/\r
-typedef void (XMLCALL *XML_AttlistDeclHandler) (\r
-                                    void            *userData,\r
-                                    const XML_Char  *elname,\r
-                                    const XML_Char  *attname,\r
-                                    const XML_Char  *att_type,\r
-                                    const XML_Char  *dflt,\r
-                                    int              isrequired);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetAttlistDeclHandler(XML_Parser parser,\r
-                          XML_AttlistDeclHandler attdecl);\r
-\r
-/* The XML declaration handler is called for *both* XML declarations\r
-   and text declarations. The way to distinguish is that the version\r
-   parameter will be NULL for text declarations. The encoding\r
-   parameter may be NULL for XML declarations. The standalone\r
-   parameter will be -1, 0, or 1 indicating respectively that there\r
-   was no standalone parameter in the declaration, that it was given\r
-   as no, or that it was given as yes.\r
-*/\r
-typedef void (XMLCALL *XML_XmlDeclHandler) (void           *userData,\r
-                                            const XML_Char *version,\r
-                                            const XML_Char *encoding,\r
-                                            int             standalone);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetXmlDeclHandler(XML_Parser parser,\r
-                      XML_XmlDeclHandler xmldecl);\r
-\r
-\r
-typedef struct {\r
-  void *(XMLCALL *malloc_fcn)(size_t size);\r
-  void *(XMLCALL *realloc_fcn)(void *ptr, size_t size);\r
-  void (XMLCALL *free_fcn)(void *ptr);\r
-} XML_Memory_Handling_Suite;\r
-\r
-/* Constructs a new parser; encoding is the encoding specified by the\r
-   external protocol or NULL if there is none specified.\r
-*/\r
-XMLPARSEAPI(XML_Parser)\r
-XML_ParserCreate(const XML_Char *encoding);\r
-\r
-/* Constructs a new parser and namespace processor.  Element type\r
-   names and attribute names that belong to a namespace will be\r
-   expanded; unprefixed attribute names are never expanded; unprefixed\r
-   element type names are expanded only if there is a default\r
-   namespace. The expanded name is the concatenation of the namespace\r
-   URI, the namespace separator character, and the local part of the\r
-   name.  If the namespace separator is '\0' then the namespace URI\r
-   and the local part will be concatenated without any separator.\r
-   When a namespace is not declared, the name and prefix will be\r
-   passed through without expansion.\r
-*/\r
-XMLPARSEAPI(XML_Parser)\r
-XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);\r
-\r
-\r
-/* Constructs a new parser using the memory management suite referred to\r
-   by memsuite. If memsuite is NULL, then use the standard library memory\r
-   suite. If namespaceSeparator is non-NULL it creates a parser with\r
-   namespace processing as described above. The character pointed at\r
-   will serve as the namespace separator.\r
-\r
-   All further memory operations used for the created parser will come from\r
-   the given suite.\r
-*/\r
-XMLPARSEAPI(XML_Parser)\r
-XML_ParserCreate_MM(const XML_Char *encoding,\r
-                    const XML_Memory_Handling_Suite *memsuite,\r
-                    const XML_Char *namespaceSeparator);\r
-\r
-/* Prepare a parser object to be re-used.  This is particularly\r
-   valuable when memory allocation overhead is disproportionatly high,\r
-   such as when a large number of small documnents need to be parsed.\r
-   All handlers are cleared from the parser, except for the\r
-   unknownEncodingHandler. The parser's external state is re-initialized\r
-   except for the values of ns and ns_triplets.\r
-\r
-   Added in Expat 1.95.3.\r
-*/\r
-XMLPARSEAPI(XML_Bool)\r
-XML_ParserReset(XML_Parser parser, const XML_Char *encoding);\r
-\r
-/* atts is array of name/value pairs, terminated by 0;\r
-   names and values are 0 terminated.\r
-*/\r
-typedef void (XMLCALL *XML_StartElementHandler) (void *userData,\r
-                                                 const XML_Char *name,\r
-                                                 const XML_Char **atts);\r
-\r
-typedef void (XMLCALL *XML_EndElementHandler) (void *userData,\r
-                                               const XML_Char *name);\r
-\r
-\r
-/* s is not 0 terminated. */\r
-typedef void (XMLCALL *XML_CharacterDataHandler) (void *userData,\r
-                                                  const XML_Char *s,\r
-                                                  int len);\r
-\r
-/* target and data are 0 terminated */\r
-typedef void (XMLCALL *XML_ProcessingInstructionHandler) (\r
-                                                void *userData,\r
-                                                const XML_Char *target,\r
-                                                const XML_Char *data);\r
-\r
-/* data is 0 terminated */\r
-typedef void (XMLCALL *XML_CommentHandler) (void *userData,\r
-                                            const XML_Char *data);\r
-\r
-typedef void (XMLCALL *XML_StartCdataSectionHandler) (void *userData);\r
-typedef void (XMLCALL *XML_EndCdataSectionHandler) (void *userData);\r
-\r
-/* This is called for any characters in the XML document for which\r
-   there is no applicable handler.  This includes both characters that\r
-   are part of markup which is of a kind that is not reported\r
-   (comments, markup declarations), or characters that are part of a\r
-   construct which could be reported but for which no handler has been\r
-   supplied. The characters are passed exactly as they were in the XML\r
-   document except that they will be encoded in UTF-8 or UTF-16.\r
-   Line boundaries are not normalized. Note that a byte order mark\r
-   character is not passed to the default handler. There are no\r
-   guarantees about how characters are divided between calls to the\r
-   default handler: for example, a comment might be split between\r
-   multiple calls.\r
-*/\r
-typedef void (XMLCALL *XML_DefaultHandler) (void *userData,\r
-                                            const XML_Char *s,\r
-                                            int len);\r
-\r
-/* This is called for the start of the DOCTYPE declaration, before\r
-   any DTD or internal subset is parsed.\r
-*/\r
-typedef void (XMLCALL *XML_StartDoctypeDeclHandler) (\r
-                                            void *userData,\r
-                                            const XML_Char *doctypeName,\r
-                                            const XML_Char *sysid,\r
-                                            const XML_Char *pubid,\r
-                                            int has_internal_subset);\r
-\r
-/* This is called for the start of the DOCTYPE declaration when the\r
-   closing > is encountered, but after processing any external\r
-   subset.\r
-*/\r
-typedef void (XMLCALL *XML_EndDoctypeDeclHandler)(void *userData);\r
-\r
-/* This is called for entity declarations. The is_parameter_entity\r
-   argument will be non-zero if the entity is a parameter entity, zero\r
-   otherwise.\r
-\r
-   For internal entities (<!ENTITY foo "bar">), value will\r
-   be non-NULL and systemId, publicID, and notationName will be NULL.\r
-   The value string is NOT nul-terminated; the length is provided in\r
-   the value_length argument. Since it is legal to have zero-length\r
-   values, do not use this argument to test for internal entities.\r
-\r
-   For external entities, value will be NULL and systemId will be\r
-   non-NULL. The publicId argument will be NULL unless a public\r
-   identifier was provided. The notationName argument will have a\r
-   non-NULL value only for unparsed entity declarations.\r
-\r
-   Note that is_parameter_entity can't be changed to XML_Bool, since\r
-   that would break binary compatibility.\r
-*/\r
-typedef void (XMLCALL *XML_EntityDeclHandler) (\r
-                              void *userData,\r
-                              const XML_Char *entityName,\r
-                              int is_parameter_entity,\r
-                              const XML_Char *value,\r
-                              int value_length,\r
-                              const XML_Char *base,\r
-                              const XML_Char *systemId,\r
-                              const XML_Char *publicId,\r
-                              const XML_Char *notationName);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetEntityDeclHandler(XML_Parser parser,\r
-                         XML_EntityDeclHandler handler);\r
-\r
-/* OBSOLETE -- OBSOLETE -- OBSOLETE\r
-   This handler has been superceded by the EntityDeclHandler above.\r
-   It is provided here for backward compatibility.\r
-\r
-   This is called for a declaration of an unparsed (NDATA) entity.\r
-   The base argument is whatever was set by XML_SetBase. The\r
-   entityName, systemId and notationName arguments will never be\r
-   NULL. The other arguments may be.\r
-*/\r
-typedef void (XMLCALL *XML_UnparsedEntityDeclHandler) (\r
-                                    void *userData,\r
-                                    const XML_Char *entityName,\r
-                                    const XML_Char *base,\r
-                                    const XML_Char *systemId,\r
-                                    const XML_Char *publicId,\r
-                                    const XML_Char *notationName);\r
-\r
-/* This is called for a declaration of notation.  The base argument is\r
-   whatever was set by XML_SetBase. The notationName will never be\r
-   NULL.  The other arguments can be.\r
-*/\r
-typedef void (XMLCALL *XML_NotationDeclHandler) (\r
-                                    void *userData,\r
-                                    const XML_Char *notationName,\r
-                                    const XML_Char *base,\r
-                                    const XML_Char *systemId,\r
-                                    const XML_Char *publicId);\r
-\r
-/* When namespace processing is enabled, these are called once for\r
-   each namespace declaration. The call to the start and end element\r
-   handlers occur between the calls to the start and end namespace\r
-   declaration handlers. For an xmlns attribute, prefix will be\r
-   NULL.  For an xmlns="" attribute, uri will be NULL.\r
-*/\r
-typedef void (XMLCALL *XML_StartNamespaceDeclHandler) (\r
-                                    void *userData,\r
-                                    const XML_Char *prefix,\r
-                                    const XML_Char *uri);\r
-\r
-typedef void (XMLCALL *XML_EndNamespaceDeclHandler) (\r
-                                    void *userData,\r
-                                    const XML_Char *prefix);\r
-\r
-/* This is called if the document is not standalone, that is, it has an\r
-   external subset or a reference to a parameter entity, but does not\r
-   have standalone="yes". If this handler returns XML_STATUS_ERROR,\r
-   then processing will not continue, and the parser will return a\r
-   XML_ERROR_NOT_STANDALONE error.\r
-   If parameter entity parsing is enabled, then in addition to the\r
-   conditions above this handler will only be called if the referenced\r
-   entity was actually read.\r
-*/\r
-typedef int (XMLCALL *XML_NotStandaloneHandler) (void *userData);\r
-\r
-/* This is called for a reference to an external parsed general\r
-   entity.  The referenced entity is not automatically parsed.  The\r
-   application can parse it immediately or later using\r
-   XML_ExternalEntityParserCreate.\r
-\r
-   The parser argument is the parser parsing the entity containing the\r
-   reference; it can be passed as the parser argument to\r
-   XML_ExternalEntityParserCreate.  The systemId argument is the\r
-   system identifier as specified in the entity declaration; it will\r
-   not be NULL.\r
-\r
-   The base argument is the system identifier that should be used as\r
-   the base for resolving systemId if systemId was relative; this is\r
-   set by XML_SetBase; it may be NULL.\r
-\r
-   The publicId argument is the public identifier as specified in the\r
-   entity declaration, or NULL if none was specified; the whitespace\r
-   in the public identifier will have been normalized as required by\r
-   the XML spec.\r
-\r
-   The context argument specifies the parsing context in the format\r
-   expected by the context argument to XML_ExternalEntityParserCreate;\r
-   context is valid only until the handler returns, so if the\r
-   referenced entity is to be parsed later, it must be copied.\r
-   context is NULL only when the entity is a parameter entity.\r
-\r
-   The handler should return XML_STATUS_ERROR if processing should not\r
-   continue because of a fatal error in the handling of the external\r
-   entity.  In this case the calling parser will return an\r
-   XML_ERROR_EXTERNAL_ENTITY_HANDLING error.\r
-\r
-   Note that unlike other handlers the first argument is the parser,\r
-   not userData.\r
-*/\r
-typedef int (XMLCALL *XML_ExternalEntityRefHandler) (\r
-                                    XML_Parser parser,\r
-                                    const XML_Char *context,\r
-                                    const XML_Char *base,\r
-                                    const XML_Char *systemId,\r
-                                    const XML_Char *publicId);\r
-\r
-/* This is called in two situations:\r
-   1) An entity reference is encountered for which no declaration\r
-      has been read *and* this is not an error.\r
-   2) An internal entity reference is read, but not expanded, because\r
-      XML_SetDefaultHandler has been called.\r
-   Note: skipped parameter entities in declarations and skipped general\r
-         entities in attribute values cannot be reported, because\r
-         the event would be out of sync with the reporting of the\r
-         declarations or attribute values\r
-*/\r
-typedef void (XMLCALL *XML_SkippedEntityHandler) (\r
-                                    void *userData,\r
-                                    const XML_Char *entityName,\r
-                                    int is_parameter_entity);\r
-\r
-/* This structure is filled in by the XML_UnknownEncodingHandler to\r
-   provide information to the parser about encodings that are unknown\r
-   to the parser.\r
-\r
-   The map[b] member gives information about byte sequences whose\r
-   first byte is b.\r
-\r
-   If map[b] is c where c is >= 0, then b by itself encodes the\r
-   Unicode scalar value c.\r
-\r
-   If map[b] is -1, then the byte sequence is malformed.\r
-\r
-   If map[b] is -n, where n >= 2, then b is the first byte of an\r
-   n-byte sequence that encodes a single Unicode scalar value.\r
-\r
-   The data member will be passed as the first argument to the convert\r
-   function.\r
-\r
-   The convert function is used to convert multibyte sequences; s will\r
-   point to a n-byte sequence where map[(unsigned char)*s] == -n.  The\r
-   convert function must return the Unicode scalar value represented\r
-   by this byte sequence or -1 if the byte sequence is malformed.\r
-\r
-   The convert function may be NULL if the encoding is a single-byte\r
-   encoding, that is if map[b] >= -1 for all bytes b.\r
-\r
-   When the parser is finished with the encoding, then if release is\r
-   not NULL, it will call release passing it the data member; once\r
-   release has been called, the convert function will not be called\r
-   again.\r
-\r
-   Expat places certain restrictions on the encodings that are supported\r
-   using this mechanism.\r
-\r
-   1. Every ASCII character that can appear in a well-formed XML document,\r
-      other than the characters\r
-\r
-      $@\^`{}~\r
-\r
-      must be represented by a single byte, and that byte must be the\r
-      same byte that represents that character in ASCII.\r
-\r
-   2. No character may require more than 4 bytes to encode.\r
-\r
-   3. All characters encoded must have Unicode scalar values <=\r
-      0xFFFF, (i.e., characters that would be encoded by surrogates in\r
-      UTF-16 are  not allowed).  Note that this restriction doesn't\r
-      apply to the built-in support for UTF-8 and UTF-16.\r
-\r
-   4. No Unicode character may be encoded by more than one distinct\r
-      sequence of bytes.\r
-*/\r
-typedef struct {\r
-  int map[256];\r
-  void *data;\r
-  int (XMLCALL *convert)(void *data, const char *s);\r
-  void (XMLCALL *release)(void *data);\r
-} XML_Encoding;\r
-\r
-/* This is called for an encoding that is unknown to the parser.\r
-\r
-   The encodingHandlerData argument is that which was passed as the\r
-   second argument to XML_SetUnknownEncodingHandler.\r
-\r
-   The name argument gives the name of the encoding as specified in\r
-   the encoding declaration.\r
-\r
-   If the callback can provide information about the encoding, it must\r
-   fill in the XML_Encoding structure, and return XML_STATUS_OK.\r
-   Otherwise it must return XML_STATUS_ERROR.\r
-\r
-   If info does not describe a suitable encoding, then the parser will\r
-   return an XML_UNKNOWN_ENCODING error.\r
-*/\r
-typedef int (XMLCALL *XML_UnknownEncodingHandler) (\r
-                                    void *encodingHandlerData,\r
-                                    const XML_Char *name,\r
-                                    XML_Encoding *info);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetElementHandler(XML_Parser parser,\r
-                      XML_StartElementHandler start,\r
-                      XML_EndElementHandler end);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetStartElementHandler(XML_Parser, XML_StartElementHandler);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetEndElementHandler(XML_Parser, XML_EndElementHandler);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetCharacterDataHandler(XML_Parser parser,\r
-                            XML_CharacterDataHandler handler);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetProcessingInstructionHandler(XML_Parser parser,\r
-                                    XML_ProcessingInstructionHandler handler);\r
-XMLPARSEAPI(void)\r
-XML_SetCommentHandler(XML_Parser parser,\r
-                      XML_CommentHandler handler);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetCdataSectionHandler(XML_Parser parser,\r
-                           XML_StartCdataSectionHandler start,\r
-                           XML_EndCdataSectionHandler end);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetStartCdataSectionHandler(XML_Parser parser,\r
-                                XML_StartCdataSectionHandler start);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetEndCdataSectionHandler(XML_Parser parser,\r
-                              XML_EndCdataSectionHandler end);\r
-\r
-/* This sets the default handler and also inhibits expansion of\r
-   internal entities. These entity references will be passed to the\r
-   default handler, or to the skipped entity handler, if one is set.\r
-*/\r
-XMLPARSEAPI(void)\r
-XML_SetDefaultHandler(XML_Parser parser,\r
-                      XML_DefaultHandler handler);\r
-\r
-/* This sets the default handler but does not inhibit expansion of\r
-   internal entities.  The entity reference will not be passed to the\r
-   default handler.\r
-*/\r
-XMLPARSEAPI(void)\r
-XML_SetDefaultHandlerExpand(XML_Parser parser,\r
-                            XML_DefaultHandler handler);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetDoctypeDeclHandler(XML_Parser parser,\r
-                          XML_StartDoctypeDeclHandler start,\r
-                          XML_EndDoctypeDeclHandler end);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetStartDoctypeDeclHandler(XML_Parser parser,\r
-                               XML_StartDoctypeDeclHandler start);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetEndDoctypeDeclHandler(XML_Parser parser,\r
-                             XML_EndDoctypeDeclHandler end);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetUnparsedEntityDeclHandler(XML_Parser parser,\r
-                                 XML_UnparsedEntityDeclHandler handler);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetNotationDeclHandler(XML_Parser parser,\r
-                           XML_NotationDeclHandler handler);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetNamespaceDeclHandler(XML_Parser parser,\r
-                            XML_StartNamespaceDeclHandler start,\r
-                            XML_EndNamespaceDeclHandler end);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetStartNamespaceDeclHandler(XML_Parser parser,\r
-                                 XML_StartNamespaceDeclHandler start);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetEndNamespaceDeclHandler(XML_Parser parser,\r
-                               XML_EndNamespaceDeclHandler end);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetNotStandaloneHandler(XML_Parser parser,\r
-                            XML_NotStandaloneHandler handler);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetExternalEntityRefHandler(XML_Parser parser,\r
-                                XML_ExternalEntityRefHandler handler);\r
-\r
-/* If a non-NULL value for arg is specified here, then it will be\r
-   passed as the first argument to the external entity ref handler\r
-   instead of the parser object.\r
-*/\r
-XMLPARSEAPI(void)\r
-XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetSkippedEntityHandler(XML_Parser parser,\r
-                            XML_SkippedEntityHandler handler);\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetUnknownEncodingHandler(XML_Parser parser,\r
-                              XML_UnknownEncodingHandler handler,\r
-                              void *encodingHandlerData);\r
-\r
-/* This can be called within a handler for a start element, end\r
-   element, processing instruction or character data.  It causes the\r
-   corresponding markup to be passed to the default handler.\r
-*/\r
-XMLPARSEAPI(void)\r
-XML_DefaultCurrent(XML_Parser parser);\r
-\r
-/* If do_nst is non-zero, and namespace processing is in effect, and\r
-   a name has a prefix (i.e. an explicit namespace qualifier) then\r
-   that name is returned as a triplet in a single string separated by\r
-   the separator character specified when the parser was created: URI\r
-   + sep + local_name + sep + prefix.\r
-\r
-   If do_nst is zero, then namespace information is returned in the\r
-   default manner (URI + sep + local_name) whether or not the name\r
-   has a prefix.\r
-\r
-   Note: Calling XML_SetReturnNSTriplet after XML_Parse or\r
-     XML_ParseBuffer has no effect.\r
-*/\r
-\r
-XMLPARSEAPI(void)\r
-XML_SetReturnNSTriplet(XML_Parser parser, int do_nst);\r
-\r
-/* This value is passed as the userData argument to callbacks. */\r
-XMLPARSEAPI(void)\r
-XML_SetUserData(XML_Parser parser, void *userData);\r
-\r
-/* Returns the last value set by XML_SetUserData or NULL. */\r
-#define XML_GetUserData(parser) (*(void **)(parser))\r
-\r
-/* This is equivalent to supplying an encoding argument to\r
-   XML_ParserCreate. On success XML_SetEncoding returns non-zero,\r
-   zero otherwise.\r
-   Note: Calling XML_SetEncoding after XML_Parse or XML_ParseBuffer\r
-     has no effect and returns XML_STATUS_ERROR.\r
-*/\r
-XMLPARSEAPI(enum XML_Status)\r
-XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);\r
-\r
-/* If this function is called, then the parser will be passed as the\r
-   first argument to callbacks instead of userData.  The userData will\r
-   still be accessible using XML_GetUserData.\r
-*/\r
-XMLPARSEAPI(void)\r
-XML_UseParserAsHandlerArg(XML_Parser parser);\r
-\r
-/* If useDTD == XML_TRUE is passed to this function, then the parser\r
-   will assume that there is an external subset, even if none is\r
-   specified in the document. In such a case the parser will call the\r
-   externalEntityRefHandler with a value of NULL for the systemId\r
-   argument (the publicId and context arguments will be NULL as well).\r
-   Note: If this function is called, then this must be done before\r
-     the first call to XML_Parse or XML_ParseBuffer, since it will\r
-     have no effect after that.  Returns\r
-     XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING.\r
-   Note: If the document does not have a DOCTYPE declaration at all,\r
-     then startDoctypeDeclHandler and endDoctypeDeclHandler will not\r
-     be called, despite an external subset being parsed.\r
-   Note: If XML_DTD is not defined when Expat is compiled, returns\r
-     XML_ERROR_FEATURE_REQUIRES_XML_DTD.\r
-*/\r
-XMLPARSEAPI(enum XML_Error)\r
-XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);\r
-\r
-\r
-/* Sets the base to be used for resolving relative URIs in system\r
-   identifiers in declarations.  Resolving relative identifiers is\r
-   left to the application: this value will be passed through as the\r
-   base argument to the XML_ExternalEntityRefHandler,\r
-   XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base\r
-   argument will be copied.  Returns XML_STATUS_ERROR if out of memory,\r
-   XML_STATUS_OK otherwise.\r
-*/\r
-XMLPARSEAPI(enum XML_Status)\r
-XML_SetBase(XML_Parser parser, const XML_Char *base);\r
-\r
-XMLPARSEAPI(const XML_Char *)\r
-XML_GetBase(XML_Parser parser);\r
-\r
-/* Returns the number of the attribute/value pairs passed in last call\r
-   to the XML_StartElementHandler that were specified in the start-tag\r
-   rather than defaulted. Each attribute/value pair counts as 2; thus\r
-   this correspondds to an index into the atts array passed to the\r
-   XML_StartElementHandler.\r
-*/\r
-XMLPARSEAPI(int)\r
-XML_GetSpecifiedAttributeCount(XML_Parser parser);\r
-\r
-/* Returns the index of the ID attribute passed in the last call to\r
-   XML_StartElementHandler, or -1 if there is no ID attribute.  Each\r
-   attribute/value pair counts as 2; thus this correspondds to an\r
-   index into the atts array passed to the XML_StartElementHandler.\r
-*/\r
-XMLPARSEAPI(int)\r
-XML_GetIdAttributeIndex(XML_Parser parser);\r
-\r
-/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is\r
-   detected.  The last call to XML_Parse must have isFinal true; len\r
-   may be zero for this call (or any other).\r
-\r
-   Though the return values for these functions has always been\r
-   described as a Boolean value, the implementation, at least for the\r
-   1.95.x series, has always returned exactly one of the XML_Status\r
-   values.\r
-*/\r
-XMLPARSEAPI(enum XML_Status)\r
-XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);\r
-\r
-XMLPARSEAPI(void *)\r
-XML_GetBuffer(XML_Parser parser, int len);\r
-\r
-XMLPARSEAPI(enum XML_Status)\r
-XML_ParseBuffer(XML_Parser parser, int len, int isFinal);\r
-\r
-/* Creates an XML_Parser object that can parse an external general\r
-   entity; context is a '\0'-terminated string specifying the parse\r
-   context; encoding is a '\0'-terminated string giving the name of\r
-   the externally specified encoding, or NULL if there is no\r
-   externally specified encoding.  The context string consists of a\r
-   sequence of tokens separated by formfeeds (\f); a token consisting\r
-   of a name specifies that the general entity of the name is open; a\r
-   token of the form prefix=uri specifies the namespace for a\r
-   particular prefix; a token of the form =uri specifies the default\r
-   namespace.  This can be called at any point after the first call to\r
-   an ExternalEntityRefHandler so longer as the parser has not yet\r
-   been freed.  The new parser is completely independent and may\r
-   safely be used in a separate thread.  The handlers and userData are\r
-   initialized from the parser argument.  Returns NULL if out of memory.\r
-   Otherwise returns a new XML_Parser object.\r
-*/\r
-XMLPARSEAPI(XML_Parser)\r
-XML_ExternalEntityParserCreate(XML_Parser parser,\r
-                               const XML_Char *context,\r
-                               const XML_Char *encoding);\r
-\r
-enum XML_ParamEntityParsing {\r
-  XML_PARAM_ENTITY_PARSING_NEVER,\r
-  XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE,\r
-  XML_PARAM_ENTITY_PARSING_ALWAYS\r
-};\r
-\r
-/* Controls parsing of parameter entities (including the external DTD\r
-   subset). If parsing of parameter entities is enabled, then\r
-   references to external parameter entities (including the external\r
-   DTD subset) will be passed to the handler set with\r
-   XML_SetExternalEntityRefHandler.  The context passed will be 0.\r
-\r
-   Unlike external general entities, external parameter entities can\r
-   only be parsed synchronously.  If the external parameter entity is\r
-   to be parsed, it must be parsed during the call to the external\r
-   entity ref handler: the complete sequence of\r
-   XML_ExternalEntityParserCreate, XML_Parse/XML_ParseBuffer and\r
-   XML_ParserFree calls must be made during this call.  After\r
-   XML_ExternalEntityParserCreate has been called to create the parser\r
-   for the external parameter entity (context must be 0 for this\r
-   call), it is illegal to make any calls on the old parser until\r
-   XML_ParserFree has been called on the newly created parser.\r
-   If the library has been compiled without support for parameter\r
-   entity parsing (ie without XML_DTD being defined), then\r
-   XML_SetParamEntityParsing will return 0 if parsing of parameter\r
-   entities is requested; otherwise it will return non-zero.\r
-   Note: If XML_SetParamEntityParsing is called after XML_Parse or\r
-      XML_ParseBuffer, then it has no effect and will always return 0.\r
-*/\r
-XMLPARSEAPI(int)\r
-XML_SetParamEntityParsing(XML_Parser parser,\r
-                          enum XML_ParamEntityParsing parsing);\r
-\r
-/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then\r
-   XML_GetErrorCode returns information about the error.\r
-*/\r
-XMLPARSEAPI(enum XML_Error)\r
-XML_GetErrorCode(XML_Parser parser);\r
-\r
-/* These functions return information about the current parse\r
-   location.  They may be called from any callback called to report\r
-   some parse event; in this case the location is the location of the\r
-   first of the sequence of characters that generated the event.  When\r
-   called from callbacks generated by declarations in the document\r
-   prologue, the location identified isn't as neatly defined, but will\r
-   be within the relevant markup.  When called outside of the callback\r
-   functions, the position indicated will be just past the last parse\r
-   event (regardless of whether there was an associated callback).\r
-   \r
-   They may also be called after returning from a call to XML_Parse\r
-   or XML_ParseBuffer.  If the return value is XML_STATUS_ERROR then\r
-   the location is the location of the character at which the error\r
-   was detected; otherwise the location is the location of the last\r
-   parse event, as described above.\r
-*/\r
-XMLPARSEAPI(int) XML_GetCurrentLineNumber(XML_Parser parser);\r
-XMLPARSEAPI(int) XML_GetCurrentColumnNumber(XML_Parser parser);\r
-XMLPARSEAPI(long) XML_GetCurrentByteIndex(XML_Parser parser);\r
-\r
-/* Return the number of bytes in the current event.\r
-   Returns 0 if the event is in an internal entity.\r
-*/\r
-XMLPARSEAPI(int)\r
-XML_GetCurrentByteCount(XML_Parser parser);\r
-\r
-/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets\r
-   the integer pointed to by offset to the offset within this buffer\r
-   of the current parse position, and sets the integer pointed to by size\r
-   to the size of this buffer (the number of input bytes). Otherwise\r
-   returns a NULL pointer. Also returns a NULL pointer if a parse isn't\r
-   active.\r
-\r
-   NOTE: The character pointer returned should not be used outside\r
-   the handler that makes the call.\r
-*/\r
-XMLPARSEAPI(const char *)\r
-XML_GetInputContext(XML_Parser parser,\r
-                    int *offset,\r
-                    int *size);\r
-\r
-/* For backwards compatibility with previous versions. */\r
-#define XML_GetErrorLineNumber   XML_GetCurrentLineNumber\r
-#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber\r
-#define XML_GetErrorByteIndex    XML_GetCurrentByteIndex\r
-\r
-/* Frees the content model passed to the element declaration handler */\r
-XMLPARSEAPI(void)\r
-XML_FreeContentModel(XML_Parser parser, XML_Content *model);\r
-\r
-/* Exposing the memory handling functions used in Expat */\r
-XMLPARSEAPI(void *)\r
-XML_MemMalloc(XML_Parser parser, size_t size);\r
-\r
-XMLPARSEAPI(void *)\r
-XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);\r
-\r
-XMLPARSEAPI(void)\r
-XML_MemFree(XML_Parser parser, void *ptr);\r
-\r
-/* Frees memory used by the parser. */\r
-XMLPARSEAPI(void)\r
-XML_ParserFree(XML_Parser parser);\r
-\r
-/* Returns a string describing the error. */\r
-XMLPARSEAPI(const XML_LChar *)\r
-XML_ErrorString(enum XML_Error code);\r
-\r
-/* Return a string containing the version number of this expat */\r
-XMLPARSEAPI(const XML_LChar *)\r
-XML_ExpatVersion(void);\r
-\r
-typedef struct {\r
-  int major;\r
-  int minor;\r
-  int micro;\r
-} XML_Expat_Version;\r
-\r
-/* Return an XML_Expat_Version structure containing numeric version\r
-   number information for this version of expat.\r
-*/\r
-XMLPARSEAPI(XML_Expat_Version)\r
-XML_ExpatVersionInfo(void);\r
-\r
-/* Added in Expat 1.95.5. */\r
-enum XML_FeatureEnum {\r
-  XML_FEATURE_END = 0,\r
-  XML_FEATURE_UNICODE,\r
-  XML_FEATURE_UNICODE_WCHAR_T,\r
-  XML_FEATURE_DTD,\r
-  XML_FEATURE_CONTEXT_BYTES,\r
-  XML_FEATURE_MIN_SIZE,\r
-  XML_FEATURE_SIZEOF_XML_CHAR,\r
-  XML_FEATURE_SIZEOF_XML_LCHAR\r
-  /* Additional features must be added to the end of this enum. */\r
-};\r
-\r
-typedef struct {\r
-  enum XML_FeatureEnum  feature;\r
-  const XML_LChar       *name;\r
-  long int              value;\r
-} XML_Feature;\r
-\r
-XMLPARSEAPI(const XML_Feature *)\r
-XML_GetFeatureList(void);\r
-\r
-\r
-/* Expat follows the GNU/Linux convention of odd number minor version for\r
-   beta/development releases and even number minor version for stable\r
-   releases. Micro is bumped with each release, and set to 0 with each\r
-   change to major or minor version.\r
-*/\r
-#define XML_MAJOR_VERSION 1\r
-#define XML_MINOR_VERSION 95\r
-#define XML_MICRO_VERSION 7\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif /* not XmlParse_INCLUDED */\r
+/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
+   See the file COPYING for copying permission.
+*/
+
+#ifndef XmlParse_INCLUDED
+#define XmlParse_INCLUDED 1
+
+#ifdef __VMS
+/*      0        1         2         3      0        1         2         3
+        1234567890123456789012345678901     1234567890123456789012345678901 */
+#define XML_SetProcessingInstructionHandler XML_SetProcessingInstrHandler
+#define XML_SetUnparsedEntityDeclHandler    XML_SetUnparsedEntDeclHandler
+#define XML_SetStartNamespaceDeclHandler    XML_SetStartNamespcDeclHandler
+#define XML_SetExternalEntityRefHandlerArg  XML_SetExternalEntRefHandlerArg
+#endif
+
+#include <stdlib.h>
+
+#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
+#define XML_USE_MSC_EXTENSIONS 1
+#endif
+
+/* Expat tries very hard to make the API boundary very specifically
+   defined.  There are two macros defined to control this boundary;
+   each of these can be defined before including this header to
+   achieve some different behavior, but doing so it not recommended or
+   tested frequently.
+
+   XMLCALL    - The calling convention to use for all calls across the
+                "library boundary."  This will default to cdecl, and
+                try really hard to tell the compiler that's what we
+                want.
+
+   XMLIMPORT  - Whatever magic is needed to note that a function is
+                to be imported from a dynamically loaded library
+                (.dll, .so, or .sl, depending on your platform).
+
+   The XMLCALL macro was added in Expat 1.95.7.  The only one which is
+   expected to be directly useful in client code is XMLCALL.
+
+   Note that on at least some Unix versions, the Expat library must be
+   compiled with the cdecl calling convention as the default since
+   system headers may assume the cdecl convention.
+*/
+#ifndef XMLCALL
+#if defined(XML_USE_MSC_EXTENSIONS)
+#define XMLCALL __cdecl
+#elif defined(__GNUC__)
+#define XMLCALL __attribute__((cdecl))
+#else
+/* For any platform which uses this definition and supports more than
+   one calling convention, we need to extend this definition to
+   declare the convention used on that platform, if it's possible to
+   do so.
+
+   If this is the case for your platform, please file a bug report
+   with information on how to identify your platform via the C
+   pre-processor and how to specify the same calling convention as the
+   platform's malloc() implementation.
+*/
+#define XMLCALL
+#endif
+#endif  /* not defined XMLCALL */
+
+
+#if !defined(XML_STATIC) && !defined(XMLIMPORT)
+#ifndef XML_BUILDING_EXPAT
+/* using Expat from an application */
+
+#ifdef XML_USE_MSC_EXTENSIONS
+#define XMLIMPORT __declspec(dllimport)
+#endif
+
+#endif
+#endif  /* not defined XML_STATIC */
+
+/* If we didn't define it above, define it away: */
+#ifndef XMLIMPORT
+#define XMLIMPORT
+#endif
+
+
+#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef XML_UNICODE_WCHAR_T
+#define XML_UNICODE
+#endif
+
+struct XML_ParserStruct;
+typedef struct XML_ParserStruct *XML_Parser;
+
+#ifdef XML_UNICODE     /* Information is UTF-16 encoded. */
+#ifdef XML_UNICODE_WCHAR_T
+typedef wchar_t XML_Char;
+typedef wchar_t XML_LChar;
+#else
+typedef unsigned short XML_Char;
+typedef char XML_LChar;
+#endif /* XML_UNICODE_WCHAR_T */
+#else                  /* Information is UTF-8 encoded. */
+typedef char XML_Char;
+typedef char XML_LChar;
+#endif /* XML_UNICODE */
+
+/* Should this be defined using stdbool.h when C99 is available? */
+typedef unsigned char XML_Bool;
+#define XML_TRUE   ((XML_Bool) 1)
+#define XML_FALSE  ((XML_Bool) 0)
+
+/* The XML_Status enum gives the possible return values for several
+   API functions.  The preprocessor #defines are included so this
+   stanza can be added to code that still needs to support older
+   versions of Expat 1.95.x:
+
+   #ifndef XML_STATUS_OK
+   #define XML_STATUS_OK    1
+   #define XML_STATUS_ERROR 0
+   #endif
+
+   Otherwise, the #define hackery is quite ugly and would have been
+   dropped.
+*/
+enum XML_Status {
+  XML_STATUS_ERROR = 0,
+#define XML_STATUS_ERROR XML_STATUS_ERROR
+  XML_STATUS_OK = 1
+#define XML_STATUS_OK XML_STATUS_OK
+};
+
+enum XML_Error {
+  XML_ERROR_NONE,
+  XML_ERROR_NO_MEMORY,
+  XML_ERROR_SYNTAX,
+  XML_ERROR_NO_ELEMENTS,
+  XML_ERROR_INVALID_TOKEN,
+  XML_ERROR_UNCLOSED_TOKEN,
+  XML_ERROR_PARTIAL_CHAR,
+  XML_ERROR_TAG_MISMATCH,
+  XML_ERROR_DUPLICATE_ATTRIBUTE,
+  XML_ERROR_JUNK_AFTER_DOC_ELEMENT,
+  XML_ERROR_PARAM_ENTITY_REF,
+  XML_ERROR_UNDEFINED_ENTITY,
+  XML_ERROR_RECURSIVE_ENTITY_REF,
+  XML_ERROR_ASYNC_ENTITY,
+  XML_ERROR_BAD_CHAR_REF,
+  XML_ERROR_BINARY_ENTITY_REF,
+  XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF,
+  XML_ERROR_MISPLACED_XML_PI,
+  XML_ERROR_UNKNOWN_ENCODING,
+  XML_ERROR_INCORRECT_ENCODING,
+  XML_ERROR_UNCLOSED_CDATA_SECTION,
+  XML_ERROR_EXTERNAL_ENTITY_HANDLING,
+  XML_ERROR_NOT_STANDALONE,
+  XML_ERROR_UNEXPECTED_STATE,
+  XML_ERROR_ENTITY_DECLARED_IN_PE,
+  XML_ERROR_FEATURE_REQUIRES_XML_DTD,
+  XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING,
+  XML_ERROR_UNBOUND_PREFIX
+};
+
+enum XML_Content_Type {
+  XML_CTYPE_EMPTY = 1,
+  XML_CTYPE_ANY,
+  XML_CTYPE_MIXED,
+  XML_CTYPE_NAME,
+  XML_CTYPE_CHOICE,
+  XML_CTYPE_SEQ
+};
+
+enum XML_Content_Quant {
+  XML_CQUANT_NONE,
+  XML_CQUANT_OPT,
+  XML_CQUANT_REP,
+  XML_CQUANT_PLUS
+};
+
+/* If type == XML_CTYPE_EMPTY or XML_CTYPE_ANY, then quant will be
+   XML_CQUANT_NONE, and the other fields will be zero or NULL.
+   If type == XML_CTYPE_MIXED, then quant will be NONE or REP and
+   numchildren will contain number of elements that may be mixed in
+   and children point to an array of XML_Content cells that will be
+   all of XML_CTYPE_NAME type with no quantification.
+
+   If type == XML_CTYPE_NAME, then the name points to the name, and
+   the numchildren field will be zero and children will be NULL. The
+   quant fields indicates any quantifiers placed on the name.
+
+   CHOICE and SEQ will have name NULL, the number of children in
+   numchildren and children will point, recursively, to an array
+   of XML_Content cells.
+
+   The EMPTY, ANY, and MIXED types will only occur at top level.
+*/
+
+typedef struct XML_cp XML_Content;
+
+struct XML_cp {
+  enum XML_Content_Type         type;
+  enum XML_Content_Quant        quant;
+  XML_Char *                    name;
+  unsigned int                  numchildren;
+  XML_Content *                 children;
+};
+
+
+/* This is called for an element declaration. See above for
+   description of the model argument. It's the caller's responsibility
+   to free model when finished with it.
+*/
+typedef void (XMLCALL *XML_ElementDeclHandler) (void *userData,
+                                                const XML_Char *name,
+                                                XML_Content *model);
+
+XMLPARSEAPI(void)
+XML_SetElementDeclHandler(XML_Parser parser,
+                          XML_ElementDeclHandler eldecl);
+
+/* The Attlist declaration handler is called for *each* attribute. So
+   a single Attlist declaration with multiple attributes declared will
+   generate multiple calls to this handler. The "default" parameter
+   may be NULL in the case of the "#IMPLIED" or "#REQUIRED"
+   keyword. The "isrequired" parameter will be true and the default
+   value will be NULL in the case of "#REQUIRED". If "isrequired" is
+   true and default is non-NULL, then this is a "#FIXED" default.
+*/
+typedef void (XMLCALL *XML_AttlistDeclHandler) (
+                                    void            *userData,
+                                    const XML_Char  *elname,
+                                    const XML_Char  *attname,
+                                    const XML_Char  *att_type,
+                                    const XML_Char  *dflt,
+                                    int              isrequired);
+
+XMLPARSEAPI(void)
+XML_SetAttlistDeclHandler(XML_Parser parser,
+                          XML_AttlistDeclHandler attdecl);
+
+/* The XML declaration handler is called for *both* XML declarations
+   and text declarations. The way to distinguish is that the version
+   parameter will be NULL for text declarations. The encoding
+   parameter may be NULL for XML declarations. The standalone
+   parameter will be -1, 0, or 1 indicating respectively that there
+   was no standalone parameter in the declaration, that it was given
+   as no, or that it was given as yes.
+*/
+typedef void (XMLCALL *XML_XmlDeclHandler) (void           *userData,
+                                            const XML_Char *version,
+                                            const XML_Char *encoding,
+                                            int             standalone);
+
+XMLPARSEAPI(void)
+XML_SetXmlDeclHandler(XML_Parser parser,
+                      XML_XmlDeclHandler xmldecl);
+
+
+typedef struct {
+  void *(XMLCALL *malloc_fcn)(size_t size);
+  void *(XMLCALL *realloc_fcn)(void *ptr, size_t size);
+  void (XMLCALL *free_fcn)(void *ptr);
+} XML_Memory_Handling_Suite;
+
+/* Constructs a new parser; encoding is the encoding specified by the
+   external protocol or NULL if there is none specified.
+*/
+XMLPARSEAPI(XML_Parser)
+XML_ParserCreate(const XML_Char *encoding);
+
+/* Constructs a new parser and namespace processor.  Element type
+   names and attribute names that belong to a namespace will be
+   expanded; unprefixed attribute names are never expanded; unprefixed
+   element type names are expanded only if there is a default
+   namespace. The expanded name is the concatenation of the namespace
+   URI, the namespace separator character, and the local part of the
+   name.  If the namespace separator is '\0' then the namespace URI
+   and the local part will be concatenated without any separator.
+   When a namespace is not declared, the name and prefix will be
+   passed through without expansion.
+*/
+XMLPARSEAPI(XML_Parser)
+XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
+
+
+/* Constructs a new parser using the memory management suite referred to
+   by memsuite. If memsuite is NULL, then use the standard library memory
+   suite. If namespaceSeparator is non-NULL it creates a parser with
+   namespace processing as described above. The character pointed at
+   will serve as the namespace separator.
+
+   All further memory operations used for the created parser will come from
+   the given suite.
+*/
+XMLPARSEAPI(XML_Parser)
+XML_ParserCreate_MM(const XML_Char *encoding,
+                    const XML_Memory_Handling_Suite *memsuite,
+                    const XML_Char *namespaceSeparator);
+
+/* Prepare a parser object to be re-used.  This is particularly
+   valuable when memory allocation overhead is disproportionatly high,
+   such as when a large number of small documnents need to be parsed.
+   All handlers are cleared from the parser, except for the
+   unknownEncodingHandler. The parser's external state is re-initialized
+   except for the values of ns and ns_triplets.
+
+   Added in Expat 1.95.3.
+*/
+XMLPARSEAPI(XML_Bool)
+XML_ParserReset(XML_Parser parser, const XML_Char *encoding);
+
+/* atts is array of name/value pairs, terminated by 0;
+   names and values are 0 terminated.
+*/
+typedef void (XMLCALL *XML_StartElementHandler) (void *userData,
+                                                 const XML_Char *name,
+                                                 const XML_Char **atts);
+
+typedef void (XMLCALL *XML_EndElementHandler) (void *userData,
+                                               const XML_Char *name);
+
+
+/* s is not 0 terminated. */
+typedef void (XMLCALL *XML_CharacterDataHandler) (void *userData,
+                                                  const XML_Char *s,
+                                                  int len);
+
+/* target and data are 0 terminated */
+typedef void (XMLCALL *XML_ProcessingInstructionHandler) (
+                                                void *userData,
+                                                const XML_Char *target,
+                                                const XML_Char *data);
+
+/* data is 0 terminated */
+typedef void (XMLCALL *XML_CommentHandler) (void *userData,
+                                            const XML_Char *data);
+
+typedef void (XMLCALL *XML_StartCdataSectionHandler) (void *userData);
+typedef void (XMLCALL *XML_EndCdataSectionHandler) (void *userData);
+
+/* This is called for any characters in the XML document for which
+   there is no applicable handler.  This includes both characters that
+   are part of markup which is of a kind that is not reported
+   (comments, markup declarations), or characters that are part of a
+   construct which could be reported but for which no handler has been
+   supplied. The characters are passed exactly as they were in the XML
+   document except that they will be encoded in UTF-8 or UTF-16.
+   Line boundaries are not normalized. Note that a byte order mark
+   character is not passed to the default handler. There are no
+   guarantees about how characters are divided between calls to the
+   default handler: for example, a comment might be split between
+   multiple calls.
+*/
+typedef void (XMLCALL *XML_DefaultHandler) (void *userData,
+                                            const XML_Char *s,
+                                            int len);
+
+/* This is called for the start of the DOCTYPE declaration, before
+   any DTD or internal subset is parsed.
+*/
+typedef void (XMLCALL *XML_StartDoctypeDeclHandler) (
+                                            void *userData,
+                                            const XML_Char *doctypeName,
+                                            const XML_Char *sysid,
+                                            const XML_Char *pubid,
+                                            int has_internal_subset);
+
+/* This is called for the start of the DOCTYPE declaration when the
+   closing > is encountered, but after processing any external
+   subset.
+*/
+typedef void (XMLCALL *XML_EndDoctypeDeclHandler)(void *userData);
+
+/* This is called for entity declarations. The is_parameter_entity
+   argument will be non-zero if the entity is a parameter entity, zero
+   otherwise.
+
+   For internal entities (<!ENTITY foo "bar">), value will
+   be non-NULL and systemId, publicID, and notationName will be NULL.
+   The value string is NOT nul-terminated; the length is provided in
+   the value_length argument. Since it is legal to have zero-length
+   values, do not use this argument to test for internal entities.
+
+   For external entities, value will be NULL and systemId will be
+   non-NULL. The publicId argument will be NULL unless a public
+   identifier was provided. The notationName argument will have a
+   non-NULL value only for unparsed entity declarations.
+
+   Note that is_parameter_entity can't be changed to XML_Bool, since
+   that would break binary compatibility.
+*/
+typedef void (XMLCALL *XML_EntityDeclHandler) (
+                              void *userData,
+                              const XML_Char *entityName,
+                              int is_parameter_entity,
+                              const XML_Char *value,
+                              int value_length,
+                              const XML_Char *base,
+                              const XML_Char *systemId,
+                              const XML_Char *publicId,
+                              const XML_Char *notationName);
+
+XMLPARSEAPI(void)
+XML_SetEntityDeclHandler(XML_Parser parser,
+                         XML_EntityDeclHandler handler);
+
+/* OBSOLETE -- OBSOLETE -- OBSOLETE
+   This handler has been superceded by the EntityDeclHandler above.
+   It is provided here for backward compatibility.
+
+   This is called for a declaration of an unparsed (NDATA) entity.
+   The base argument is whatever was set by XML_SetBase. The
+   entityName, systemId and notationName arguments will never be
+   NULL. The other arguments may be.
+*/
+typedef void (XMLCALL *XML_UnparsedEntityDeclHandler) (
+                                    void *userData,
+                                    const XML_Char *entityName,
+                                    const XML_Char *base,
+                                    const XML_Char *systemId,
+                                    const XML_Char *publicId,
+                                    const XML_Char *notationName);
+
+/* This is called for a declaration of notation.  The base argument is
+   whatever was set by XML_SetBase. The notationName will never be
+   NULL.  The other arguments can be.
+*/
+typedef void (XMLCALL *XML_NotationDeclHandler) (
+                                    void *userData,
+                                    const XML_Char *notationName,
+                                    const XML_Char *base,
+                                    const XML_Char *systemId,
+                                    const XML_Char *publicId);
+
+/* When namespace processing is enabled, these are called once for
+   each namespace declaration. The call to the start and end element
+   handlers occur between the calls to the start and end namespace
+   declaration handlers. For an xmlns attribute, prefix will be
+   NULL.  For an xmlns="" attribute, uri will be NULL.
+*/
+typedef void (XMLCALL *XML_StartNamespaceDeclHandler) (
+                                    void *userData,
+                                    const XML_Char *prefix,
+                                    const XML_Char *uri);
+
+typedef void (XMLCALL *XML_EndNamespaceDeclHandler) (
+                                    void *userData,
+                                    const XML_Char *prefix);
+
+/* This is called if the document is not standalone, that is, it has an
+   external subset or a reference to a parameter entity, but does not
+   have standalone="yes". If this handler returns XML_STATUS_ERROR,
+   then processing will not continue, and the parser will return a
+   XML_ERROR_NOT_STANDALONE error.
+   If parameter entity parsing is enabled, then in addition to the
+   conditions above this handler will only be called if the referenced
+   entity was actually read.
+*/
+typedef int (XMLCALL *XML_NotStandaloneHandler) (void *userData);
+
+/* This is called for a reference to an external parsed general
+   entity.  The referenced entity is not automatically parsed.  The
+   application can parse it immediately or later using
+   XML_ExternalEntityParserCreate.
+
+   The parser argument is the parser parsing the entity containing the
+   reference; it can be passed as the parser argument to
+   XML_ExternalEntityParserCreate.  The systemId argument is the
+   system identifier as specified in the entity declaration; it will
+   not be NULL.
+
+   The base argument is the system identifier that should be used as
+   the base for resolving systemId if systemId was relative; this is
+   set by XML_SetBase; it may be NULL.
+
+   The publicId argument is the public identifier as specified in the
+   entity declaration, or NULL if none was specified; the whitespace
+   in the public identifier will have been normalized as required by
+   the XML spec.
+
+   The context argument specifies the parsing context in the format
+   expected by the context argument to XML_ExternalEntityParserCreate;
+   context is valid only until the handler returns, so if the
+   referenced entity is to be parsed later, it must be copied.
+   context is NULL only when the entity is a parameter entity.
+
+   The handler should return XML_STATUS_ERROR if processing should not
+   continue because of a fatal error in the handling of the external
+   entity.  In this case the calling parser will return an
+   XML_ERROR_EXTERNAL_ENTITY_HANDLING error.
+
+   Note that unlike other handlers the first argument is the parser,
+   not userData.
+*/
+typedef int (XMLCALL *XML_ExternalEntityRefHandler) (
+                                    XML_Parser parser,
+                                    const XML_Char *context,
+                                    const XML_Char *base,
+                                    const XML_Char *systemId,
+                                    const XML_Char *publicId);
+
+/* This is called in two situations:
+   1) An entity reference is encountered for which no declaration
+      has been read *and* this is not an error.
+   2) An internal entity reference is read, but not expanded, because
+      XML_SetDefaultHandler has been called.
+   Note: skipped parameter entities in declarations and skipped general
+         entities in attribute values cannot be reported, because
+         the event would be out of sync with the reporting of the
+         declarations or attribute values
+*/
+typedef void (XMLCALL *XML_SkippedEntityHandler) (
+                                    void *userData,
+                                    const XML_Char *entityName,
+                                    int is_parameter_entity);
+
+/* This structure is filled in by the XML_UnknownEncodingHandler to
+   provide information to the parser about encodings that are unknown
+   to the parser.
+
+   The map[b] member gives information about byte sequences whose
+   first byte is b.
+
+   If map[b] is c where c is >= 0, then b by itself encodes the
+   Unicode scalar value c.
+
+   If map[b] is -1, then the byte sequence is malformed.
+
+   If map[b] is -n, where n >= 2, then b is the first byte of an
+   n-byte sequence that encodes a single Unicode scalar value.
+
+   The data member will be passed as the first argument to the convert
+   function.
+
+   The convert function is used to convert multibyte sequences; s will
+   point to a n-byte sequence where map[(unsigned char)*s] == -n.  The
+   convert function must return the Unicode scalar value represented
+   by this byte sequence or -1 if the byte sequence is malformed.
+
+   The convert function may be NULL if the encoding is a single-byte
+   encoding, that is if map[b] >= -1 for all bytes b.
+
+   When the parser is finished with the encoding, then if release is
+   not NULL, it will call release passing it the data member; once
+   release has been called, the convert function will not be called
+   again.
+
+   Expat places certain restrictions on the encodings that are supported
+   using this mechanism.
+
+   1. Every ASCII character that can appear in a well-formed XML document,
+      other than the characters
+
+      $@\^`{}~
+
+      must be represented by a single byte, and that byte must be the
+      same byte that represents that character in ASCII.
+
+   2. No character may require more than 4 bytes to encode.
+
+   3. All characters encoded must have Unicode scalar values <=
+      0xFFFF, (i.e., characters that would be encoded by surrogates in
+      UTF-16 are  not allowed).  Note that this restriction doesn't
+      apply to the built-in support for UTF-8 and UTF-16.
+
+   4. No Unicode character may be encoded by more than one distinct
+      sequence of bytes.
+*/
+typedef struct {
+  int map[256];
+  void *data;
+  int (XMLCALL *convert)(void *data, const char *s);
+  void (XMLCALL *release)(void *data);
+} XML_Encoding;
+
+/* This is called for an encoding that is unknown to the parser.
+
+   The encodingHandlerData argument is that which was passed as the
+   second argument to XML_SetUnknownEncodingHandler.
+
+   The name argument gives the name of the encoding as specified in
+   the encoding declaration.
+
+   If the callback can provide information about the encoding, it must
+   fill in the XML_Encoding structure, and return XML_STATUS_OK.
+   Otherwise it must return XML_STATUS_ERROR.
+
+   If info does not describe a suitable encoding, then the parser will
+   return an XML_UNKNOWN_ENCODING error.
+*/
+typedef int (XMLCALL *XML_UnknownEncodingHandler) (
+                                    void *encodingHandlerData,
+                                    const XML_Char *name,
+                                    XML_Encoding *info);
+
+XMLPARSEAPI(void)
+XML_SetElementHandler(XML_Parser parser,
+                      XML_StartElementHandler start,
+                      XML_EndElementHandler end);
+
+XMLPARSEAPI(void)
+XML_SetStartElementHandler(XML_Parser, XML_StartElementHandler);
+
+XMLPARSEAPI(void)
+XML_SetEndElementHandler(XML_Parser, XML_EndElementHandler);
+
+XMLPARSEAPI(void)
+XML_SetCharacterDataHandler(XML_Parser parser,
+                            XML_CharacterDataHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetProcessingInstructionHandler(XML_Parser parser,
+                                    XML_ProcessingInstructionHandler handler);
+XMLPARSEAPI(void)
+XML_SetCommentHandler(XML_Parser parser,
+                      XML_CommentHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetCdataSectionHandler(XML_Parser parser,
+                           XML_StartCdataSectionHandler start,
+                           XML_EndCdataSectionHandler end);
+
+XMLPARSEAPI(void)
+XML_SetStartCdataSectionHandler(XML_Parser parser,
+                                XML_StartCdataSectionHandler start);
+
+XMLPARSEAPI(void)
+XML_SetEndCdataSectionHandler(XML_Parser parser,
+                              XML_EndCdataSectionHandler end);
+
+/* This sets the default handler and also inhibits expansion of
+   internal entities. These entity references will be passed to the
+   default handler, or to the skipped entity handler, if one is set.
+*/
+XMLPARSEAPI(void)
+XML_SetDefaultHandler(XML_Parser parser,
+                      XML_DefaultHandler handler);
+
+/* This sets the default handler but does not inhibit expansion of
+   internal entities.  The entity reference will not be passed to the
+   default handler.
+*/
+XMLPARSEAPI(void)
+XML_SetDefaultHandlerExpand(XML_Parser parser,
+                            XML_DefaultHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetDoctypeDeclHandler(XML_Parser parser,
+                          XML_StartDoctypeDeclHandler start,
+                          XML_EndDoctypeDeclHandler end);
+
+XMLPARSEAPI(void)
+XML_SetStartDoctypeDeclHandler(XML_Parser parser,
+                               XML_StartDoctypeDeclHandler start);
+
+XMLPARSEAPI(void)
+XML_SetEndDoctypeDeclHandler(XML_Parser parser,
+                             XML_EndDoctypeDeclHandler end);
+
+XMLPARSEAPI(void)
+XML_SetUnparsedEntityDeclHandler(XML_Parser parser,
+                                 XML_UnparsedEntityDeclHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetNotationDeclHandler(XML_Parser parser,
+                           XML_NotationDeclHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetNamespaceDeclHandler(XML_Parser parser,
+                            XML_StartNamespaceDeclHandler start,
+                            XML_EndNamespaceDeclHandler end);
+
+XMLPARSEAPI(void)
+XML_SetStartNamespaceDeclHandler(XML_Parser parser,
+                                 XML_StartNamespaceDeclHandler start);
+
+XMLPARSEAPI(void)
+XML_SetEndNamespaceDeclHandler(XML_Parser parser,
+                               XML_EndNamespaceDeclHandler end);
+
+XMLPARSEAPI(void)
+XML_SetNotStandaloneHandler(XML_Parser parser,
+                            XML_NotStandaloneHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetExternalEntityRefHandler(XML_Parser parser,
+                                XML_ExternalEntityRefHandler handler);
+
+/* If a non-NULL value for arg is specified here, then it will be
+   passed as the first argument to the external entity ref handler
+   instead of the parser object.
+*/
+XMLPARSEAPI(void)
+XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg);
+
+XMLPARSEAPI(void)
+XML_SetSkippedEntityHandler(XML_Parser parser,
+                            XML_SkippedEntityHandler handler);
+
+XMLPARSEAPI(void)
+XML_SetUnknownEncodingHandler(XML_Parser parser,
+                              XML_UnknownEncodingHandler handler,
+                              void *encodingHandlerData);
+
+/* This can be called within a handler for a start element, end
+   element, processing instruction or character data.  It causes the
+   corresponding markup to be passed to the default handler.
+*/
+XMLPARSEAPI(void)
+XML_DefaultCurrent(XML_Parser parser);
+
+/* If do_nst is non-zero, and namespace processing is in effect, and
+   a name has a prefix (i.e. an explicit namespace qualifier) then
+   that name is returned as a triplet in a single string separated by
+   the separator character specified when the parser was created: URI
+   + sep + local_name + sep + prefix.
+
+   If do_nst is zero, then namespace information is returned in the
+   default manner (URI + sep + local_name) whether or not the name
+   has a prefix.
+
+   Note: Calling XML_SetReturnNSTriplet after XML_Parse or
+     XML_ParseBuffer has no effect.
+*/
+
+XMLPARSEAPI(void)
+XML_SetReturnNSTriplet(XML_Parser parser, int do_nst);
+
+/* This value is passed as the userData argument to callbacks. */
+XMLPARSEAPI(void)
+XML_SetUserData(XML_Parser parser, void *userData);
+
+/* Returns the last value set by XML_SetUserData or NULL. */
+#define XML_GetUserData(parser) (*(void **)(parser))
+
+/* This is equivalent to supplying an encoding argument to
+   XML_ParserCreate. On success XML_SetEncoding returns non-zero,
+   zero otherwise.
+   Note: Calling XML_SetEncoding after XML_Parse or XML_ParseBuffer
+     has no effect and returns XML_STATUS_ERROR.
+*/
+XMLPARSEAPI(enum XML_Status)
+XML_SetEncoding(XML_Parser parser, const XML_Char *encoding);
+
+/* If this function is called, then the parser will be passed as the
+   first argument to callbacks instead of userData.  The userData will
+   still be accessible using XML_GetUserData.
+*/
+XMLPARSEAPI(void)
+XML_UseParserAsHandlerArg(XML_Parser parser);
+
+/* If useDTD == XML_TRUE is passed to this function, then the parser
+   will assume that there is an external subset, even if none is
+   specified in the document. In such a case the parser will call the
+   externalEntityRefHandler with a value of NULL for the systemId
+   argument (the publicId and context arguments will be NULL as well).
+   Note: If this function is called, then this must be done before
+     the first call to XML_Parse or XML_ParseBuffer, since it will
+     have no effect after that.  Returns
+     XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING.
+   Note: If the document does not have a DOCTYPE declaration at all,
+     then startDoctypeDeclHandler and endDoctypeDeclHandler will not
+     be called, despite an external subset being parsed.
+   Note: If XML_DTD is not defined when Expat is compiled, returns
+     XML_ERROR_FEATURE_REQUIRES_XML_DTD.
+*/
+XMLPARSEAPI(enum XML_Error)
+XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD);
+
+
+/* Sets the base to be used for resolving relative URIs in system
+   identifiers in declarations.  Resolving relative identifiers is
+   left to the application: this value will be passed through as the
+   base argument to the XML_ExternalEntityRefHandler,
+   XML_NotationDeclHandler and XML_UnparsedEntityDeclHandler. The base
+   argument will be copied.  Returns XML_STATUS_ERROR if out of memory,
+   XML_STATUS_OK otherwise.
+*/
+XMLPARSEAPI(enum XML_Status)
+XML_SetBase(XML_Parser parser, const XML_Char *base);
+
+XMLPARSEAPI(const XML_Char *)
+XML_GetBase(XML_Parser parser);
+
+/* Returns the number of the attribute/value pairs passed in last call
+   to the XML_StartElementHandler that were specified in the start-tag
+   rather than defaulted. Each attribute/value pair counts as 2; thus
+   this correspondds to an index into the atts array passed to the
+   XML_StartElementHandler.
+*/
+XMLPARSEAPI(int)
+XML_GetSpecifiedAttributeCount(XML_Parser parser);
+
+/* Returns the index of the ID attribute passed in the last call to
+   XML_StartElementHandler, or -1 if there is no ID attribute.  Each
+   attribute/value pair counts as 2; thus this correspondds to an
+   index into the atts array passed to the XML_StartElementHandler.
+*/
+XMLPARSEAPI(int)
+XML_GetIdAttributeIndex(XML_Parser parser);
+
+/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is
+   detected.  The last call to XML_Parse must have isFinal true; len
+   may be zero for this call (or any other).
+
+   Though the return values for these functions has always been
+   described as a Boolean value, the implementation, at least for the
+   1.95.x series, has always returned exactly one of the XML_Status
+   values.
+*/
+XMLPARSEAPI(enum XML_Status)
+XML_Parse(XML_Parser parser, const char *s, int len, int isFinal);
+
+XMLPARSEAPI(void *)
+XML_GetBuffer(XML_Parser parser, int len);
+
+XMLPARSEAPI(enum XML_Status)
+XML_ParseBuffer(XML_Parser parser, int len, int isFinal);
+
+/* Creates an XML_Parser object that can parse an external general
+   entity; context is a '\0'-terminated string specifying the parse
+   context; encoding is a '\0'-terminated string giving the name of
+   the externally specified encoding, or NULL if there is no
+   externally specified encoding.  The context string consists of a
+   sequence of tokens separated by formfeeds (\f); a token consisting
+   of a name specifies that the general entity of the name is open; a
+   token of the form prefix=uri specifies the namespace for a
+   particular prefix; a token of the form =uri specifies the default
+   namespace.  This can be called at any point after the first call to
+   an ExternalEntityRefHandler so longer as the parser has not yet
+   been freed.  The new parser is completely independent and may
+   safely be used in a separate thread.  The handlers and userData are
+   initialized from the parser argument.  Returns NULL if out of memory.
+   Otherwise returns a new XML_Parser object.
+*/
+XMLPARSEAPI(XML_Parser)
+XML_ExternalEntityParserCreate(XML_Parser parser,
+                               const XML_Char *context,
+                               const XML_Char *encoding);
+
+enum XML_ParamEntityParsing {
+  XML_PARAM_ENTITY_PARSING_NEVER,
+  XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE,
+  XML_PARAM_ENTITY_PARSING_ALWAYS
+};
+
+/* Controls parsing of parameter entities (including the external DTD
+   subset). If parsing of parameter entities is enabled, then
+   references to external parameter entities (including the external
+   DTD subset) will be passed to the handler set with
+   XML_SetExternalEntityRefHandler.  The context passed will be 0.
+
+   Unlike external general entities, external parameter entities can
+   only be parsed synchronously.  If the external parameter entity is
+   to be parsed, it must be parsed during the call to the external
+   entity ref handler: the complete sequence of
+   XML_ExternalEntityParserCreate, XML_Parse/XML_ParseBuffer and
+   XML_ParserFree calls must be made during this call.  After
+   XML_ExternalEntityParserCreate has been called to create the parser
+   for the external parameter entity (context must be 0 for this
+   call), it is illegal to make any calls on the old parser until
+   XML_ParserFree has been called on the newly created parser.
+   If the library has been compiled without support for parameter
+   entity parsing (ie without XML_DTD being defined), then
+   XML_SetParamEntityParsing will return 0 if parsing of parameter
+   entities is requested; otherwise it will return non-zero.
+   Note: If XML_SetParamEntityParsing is called after XML_Parse or
+      XML_ParseBuffer, then it has no effect and will always return 0.
+*/
+XMLPARSEAPI(int)
+XML_SetParamEntityParsing(XML_Parser parser,
+                          enum XML_ParamEntityParsing parsing);
+
+/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then
+   XML_GetErrorCode returns information about the error.
+*/
+XMLPARSEAPI(enum XML_Error)
+XML_GetErrorCode(XML_Parser parser);
+
+/* These functions return information about the current parse
+   location.  They may be called from any callback called to report
+   some parse event; in this case the location is the location of the
+   first of the sequence of characters that generated the event.  When
+   called from callbacks generated by declarations in the document
+   prologue, the location identified isn't as neatly defined, but will
+   be within the relevant markup.  When called outside of the callback
+   functions, the position indicated will be just past the last parse
+   event (regardless of whether there was an associated callback).
+   
+   They may also be called after returning from a call to XML_Parse
+   or XML_ParseBuffer.  If the return value is XML_STATUS_ERROR then
+   the location is the location of the character at which the error
+   was detected; otherwise the location is the location of the last
+   parse event, as described above.
+*/
+XMLPARSEAPI(int) XML_GetCurrentLineNumber(XML_Parser parser);
+XMLPARSEAPI(int) XML_GetCurrentColumnNumber(XML_Parser parser);
+XMLPARSEAPI(long) XML_GetCurrentByteIndex(XML_Parser parser);
+
+/* Return the number of bytes in the current event.
+   Returns 0 if the event is in an internal entity.
+*/
+XMLPARSEAPI(int)
+XML_GetCurrentByteCount(XML_Parser parser);
+
+/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets
+   the integer pointed to by offset to the offset within this buffer
+   of the current parse position, and sets the integer pointed to by size
+   to the size of this buffer (the number of input bytes). Otherwise
+   returns a NULL pointer. Also returns a NULL pointer if a parse isn't
+   active.
+
+   NOTE: The character pointer returned should not be used outside
+   the handler that makes the call.
+*/
+XMLPARSEAPI(const char *)
+XML_GetInputContext(XML_Parser parser,
+                    int *offset,
+                    int *size);
+
+/* For backwards compatibility with previous versions. */
+#define XML_GetErrorLineNumber   XML_GetCurrentLineNumber
+#define XML_GetErrorColumnNumber XML_GetCurrentColumnNumber
+#define XML_GetErrorByteIndex    XML_GetCurrentByteIndex
+
+/* Frees the content model passed to the element declaration handler */
+XMLPARSEAPI(void)
+XML_FreeContentModel(XML_Parser parser, XML_Content *model);
+
+/* Exposing the memory handling functions used in Expat */
+XMLPARSEAPI(void *)
+XML_MemMalloc(XML_Parser parser, size_t size);
+
+XMLPARSEAPI(void *)
+XML_MemRealloc(XML_Parser parser, void *ptr, size_t size);
+
+XMLPARSEAPI(void)
+XML_MemFree(XML_Parser parser, void *ptr);
+
+/* Frees memory used by the parser. */
+XMLPARSEAPI(void)
+XML_ParserFree(XML_Parser parser);
+
+/* Returns a string describing the error. */
+XMLPARSEAPI(const XML_LChar *)
+XML_ErrorString(enum XML_Error code);
+
+/* Return a string containing the version number of this expat */
+XMLPARSEAPI(const XML_LChar *)
+XML_ExpatVersion(void);
+
+typedef struct {
+  int major;
+  int minor;
+  int micro;
+} XML_Expat_Version;
+
+/* Return an XML_Expat_Version structure containing numeric version
+   number information for this version of expat.
+*/
+XMLPARSEAPI(XML_Expat_Version)
+XML_ExpatVersionInfo(void);
+
+/* Added in Expat 1.95.5. */
+enum XML_FeatureEnum {
+  XML_FEATURE_END = 0,
+  XML_FEATURE_UNICODE,
+  XML_FEATURE_UNICODE_WCHAR_T,
+  XML_FEATURE_DTD,
+  XML_FEATURE_CONTEXT_BYTES,
+  XML_FEATURE_MIN_SIZE,
+  XML_FEATURE_SIZEOF_XML_CHAR,
+  XML_FEATURE_SIZEOF_XML_LCHAR
+  /* Additional features must be added to the end of this enum. */
+};
+
+typedef struct {
+  enum XML_FeatureEnum  feature;
+  const XML_LChar       *name;
+  long int              value;
+} XML_Feature;
+
+XMLPARSEAPI(const XML_Feature *)
+XML_GetFeatureList(void);
+
+
+/* Expat follows the GNU/Linux convention of odd number minor version for
+   beta/development releases and even number minor version for stable
+   releases. Micro is bumped with each release, and set to 0 with each
+   change to major or minor version.
+*/
+#define XML_MAJOR_VERSION 1
+#define XML_MINOR_VERSION 95
+#define XML_MICRO_VERSION 7
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not XmlParse_INCLUDED */
index 360343b0bcae00f0f67c300e10fe7b69c730ccd4..a80dc9194f26a1142f812ddc64357a41c5149fd3 100644 (file)
                                                BrowseInformation="1"/>
                                </FileConfiguration>
                        </File>
+                       <File
+                               RelativePath="..\avltree.c">
+                       </File>
                        <File
                                RelativePath="..\axim_gpb.c">
                        </File>
                                                BrowseInformation="1"/>
                                </FileConfiguration>
                        </File>
+                       <File
+                               RelativePath="..\dg-100.c">
+                       </File>
+                       <File
+                               RelativePath="..\destinator.c">
+                       </File>
                        <File
                                RelativePath="..\discard.c">
                        </File>
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\fatal.c">
+                               RelativePath="..\exif.c">
                        </File>
                        <File
-                               RelativePath="..\filter_skeleton.c">
+                               RelativePath="..\fatal.c">
                        </File>
                        <File
                                RelativePath="..\filter_vecs.c">
                                </FileConfiguration>
                        </File>
                        <File
-                               RelativePath="..\format_skeleton.c">
+                               RelativePath="..\formspec.c">
                        </File>
                        <File
-                               RelativePath="..\formspec.c">
+                               RelativePath="..\g7towin.c">
                        </File>
                        <File
                                RelativePath="..\garmin.c">
                        <File
                                RelativePath="..\garmin_fs.c">
                        </File>
+                       <File
+                               RelativePath="..\garmin_gpi.c">
+                       </File>
                        <File
                                RelativePath="..\garmin_tables.c">
                                <FileConfiguration
                                                BrowseInformation="1"/>
                                </FileConfiguration>
                        </File>
+                       <File
+                               RelativePath="..\ggv_log.c">
+                       </File>
                        <File
                                RelativePath="..\globals.c">
                        </File>
                        <File
                                RelativePath="..\ignrando.c">
                        </File>
+                       <File
+                               RelativePath="..\ik3d.c">
+                       </File>
                        <File
                                RelativePath="..\inifile.c">
                        </File>
                        <File
                                RelativePath=".\Expatw\libexpatw.lib">
                        </File>
+                       <File
+                               RelativePath="..\lmx.c">
+                       </File>
                        <File
                                RelativePath="..\lowranceusr.c">
                                <FileConfiguration
                        <File
                                RelativePath="..\msroute.c">
                        </File>
+                       <File
+                               RelativePath="..\mtk_logger.c">
+                       </File>
                        <File
                                RelativePath="..\navicache.c">
                                <FileConfiguration
                                                BrowseInformation="1"/>
                                </FileConfiguration>
                        </File>
+                       <File
+                               RelativePath="..\navilink.c">
+                       </File>
                        <File
                                RelativePath="..\netstumbler.c">
                                <FileConfiguration
                        <File
                                RelativePath="..\nukedata.c">
                        </File>
+                       <File
+                               RelativePath="..\osm.c">
+                       </File>
                        <File
                                RelativePath="..\overlay.c">
                                <FileConfiguration
                                                BrowseInformation="1"/>
                                </FileConfiguration>
                        </File>
+                       <File
+                               RelativePath="..\parse.c">
+                       </File>
                        <File
                                RelativePath="..\pathaway.c">
                                <FileConfiguration
                        <File
                                RelativePath="..\radius.c">
                        </File>
+                       <File
+                               RelativePath="..\random.c">
+                       </File>
                        <File
                                RelativePath="..\raymarine.c">
                        </File>
                                                BrowseInformation="1"/>
                                </FileConfiguration>
                        </File>
+                       <File
+                               RelativePath="..\vitovtt.c">
+                       </File>
                        <File
                                RelativePath="..\vmem.c">
                                <FileConfiguration
                                                BrowseInformation="1"/>
                                </FileConfiguration>
                        </File>
+                       <File
+                               RelativePath="..\xhtmlent.c">
+                       </File>
                        <File
                                RelativePath="..\xmlgeneric.c">
                                <FileConfiguration
                        <File
                                RelativePath="..\yahoo.c">
                        </File>
+                       <File
+                               RelativePath="..\xol.c">
+                       </File>
                        <Filter
                                Name="Jeeps"
                                Filter="">
                                        </FileConfiguration>
                                </File>
                        </Filter>
+                       <Filter
+                               Name="Zlib"
+                               >
+                               <File
+                                       RelativePath="..\zlib\adler32.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\compress.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\crc32.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\deflate.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\gzio.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\infback.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\inffast.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\inflate.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\inftrees.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\trees.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\uncompr.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\zutil.c"
+                                       >
+                               </File>
+                       </Filter>
                </Filter>
                <Filter
                        Name="Header Files"
                        Filter="h;hpp;hxx;hm;inl">
+                       <File
+                               RelativePath="..\avltree.h">
+                       </File>
                        <File
                                RelativePath=".\config.h">
                        </File>
                        <File
                                RelativePath="..\defs.h">
                        </File>
+                       <File
+                               RelativePath="..\garmin_gpi.h">
+                       </File>
                        <File
                                RelativePath="..\garmin_tables.h">
                        </File>
+                       <File
+                               RelativePath="..\gbfile.h">
+                       </File>
+                       <File
+                               RelativePath="..\gbtypes.h">
+                       </File>
                        <File
                                RelativePath="..\grtcirc.h">
                        </File>
index f07d153211b5aef117e2d4c121e8c4d62c171072..ed82fee4e7c6b5b42cb211874c4fad0e8e194111 100644 (file)
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="8.00"\r
-       Name="GPSBabel"\r
-       ProjectGUID="{EB2609DB-5800-45B2-BCB2-06D72F389DCA}"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       OutputDirectory=".\Release"\r
-                       IntermediateDirectory=".\Release"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TypeLibraryName=".\Release/GPSBabel.tlb"\r
-                               HeaderFileName=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="3"\r
-                               InlineFunctionExpansion="1"\r
-                               EnableIntrinsicFunctions="false"\r
-                               FavorSizeOrSpeed="2"\r
-                               WholeProgramOptimization="true"\r
-                               AdditionalIncludeDirectories="expat,."\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;__WIN32__;"\r
-                               StringPooling="true"\r
-                               ExceptionHandling="0"\r
-                               RuntimeLibrary="0"\r
-                               EnableFunctionLevelLinking="true"\r
-                               UsePrecompiledHeader="0"\r
-                               PrecompiledHeaderFile=".\Release/GPSBabel.pch"\r
-                               AssemblerListingLocation=".\Release/"\r
-                               ObjectFile=".\Release/"\r
-                               ProgramDataBaseFileName=".\Release/"\r
-                               WarningLevel="3"\r
-                               WarnAsError="true"\r
-                               SuppressStartupBanner="true"\r
-                               DebugInformationFormat="3"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="setupapi.lib"\r
-                               OutputFile=".\Release/GPSBabel.exe"\r
-                               LinkIncremental="1"\r
-                               SuppressStartupBanner="true"\r
-                               GenerateDebugInformation="true"\r
-                               AssemblyDebug="1"\r
-                               ProgramDatabaseFile=".\Release/GPSBabel.pdb"\r
-                               SubSystem="1"\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       OutputDirectory=".\Debug"\r
-                       IntermediateDirectory=".\Debug"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TypeLibraryName=".\Debug/GPSBabel.tlb"\r
-                               HeaderFileName=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="0"\r
-                               AdditionalIncludeDirectories="expat;."\r
-                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;__WIN32__;_DEBUG;_CONSOLE;"\r
-                               BasicRuntimeChecks="3"\r
-                               RuntimeLibrary="1"\r
-                               UsePrecompiledHeader="0"\r
-                               PrecompiledHeaderFile=".\Debug/GPSBabel.pch"\r
-                               AssemblerListingLocation=".\Debug/"\r
-                               ObjectFile=".\Debug/"\r
-                               ProgramDataBaseFileName=".\Debug/"\r
-                               BrowseInformation="1"\r
-                               WarningLevel="3"\r
-                               WarnAsError="true"\r
-                               SuppressStartupBanner="true"\r
-                               DebugInformationFormat="3"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="_DEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="setupapi.lib"\r
-                               OutputFile=".\Debug/GPSBabel.exe"\r
-                               LinkIncremental="1"\r
-                               SuppressStartupBanner="true"\r
-                               GenerateDebugInformation="true"\r
-                               ProgramDatabaseFile=".\Debug/GPSBabel.pdb"\r
-                               SubSystem="1"\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Unicode|Win32"\r
-                       OutputDirectory="$(ConfigurationName)"\r
-                       IntermediateDirectory="$(ConfigurationName)"\r
-                       ConfigurationType="1"\r
-                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
-                       UseOfMFC="0"\r
-                       ATLMinimizesCRunTimeLibraryUsage="false"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                               TypeLibraryName=".\Release/GPSBabel.tlb"\r
-                               HeaderFileName=""\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               Optimization="3"\r
-                               InlineFunctionExpansion="1"\r
-                               EnableIntrinsicFunctions="false"\r
-                               FavorSizeOrSpeed="2"\r
-                               WholeProgramOptimization="true"\r
-                               AdditionalIncludeDirectories="expatw;."\r
-                               PreprocessorDefinitions="XML_UNICODE=1;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;__WIN32__;"\r
-                               StringPooling="true"\r
-                               ExceptionHandling="0"\r
-                               RuntimeLibrary="0"\r
-                               EnableFunctionLevelLinking="true"\r
-                               UsePrecompiledHeader="0"\r
-                               PrecompiledHeaderFile=".\unicode/GPSBabel.pch"\r
-                               AssemblerListingLocation=".\unicode/"\r
-                               ObjectFile=".\unicode/"\r
-                               ProgramDataBaseFileName=".\unicode/"\r
-                               WarningLevel="3"\r
-                               WarnAsError="true"\r
-                               SuppressStartupBanner="true"\r
-                               DebugInformationFormat="3"\r
-                               CompileAs="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                               PreprocessorDefinitions="NDEBUG"\r
-                               Culture="1033"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalDependencies="setupapi.lib expatw\libexpatw.lib"\r
-                               LinkIncremental="1"\r
-                               SuppressStartupBanner="true"\r
-                               GenerateDebugInformation="false"\r
-                               AssemblyDebug="0"\r
-                               ProgramDatabaseFile=".\unicode/GPSBabel.pdb"\r
-                               SubSystem="1"\r
-                               TargetMachine="1"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebDeploymentTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <Filter\r
-                       Name="Source Files"\r
-                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
-                       >\r
-                       <File\r
-                               RelativePath="..\alan.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\an1.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\arcdist.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\axim_gpb.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\bcr.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\brauniger_iq.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\cet.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\cet_util.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\cetus.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\coastexp.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\compegps.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\copilot.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\coto.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\cst.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\csv_util.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\delgpl.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\discard.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\dmtlog.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\duplicate.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\easygps.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\fatal.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\filter_skeleton.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\filter_vecs.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\formspec.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\g7towin.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\garmin.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\garmin_fs.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\garmin_gpi.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\garmin_tables.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\garmin_txt.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gbfile.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gbser.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gbser_win.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gbsleep.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gcdb.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gdb.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\geo.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\geoniche.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\ggv_log.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\globals.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\glogbook.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\google.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gpilots.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\jeeps\gpsdevice.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\jeeps\gpsdevice_ser.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\jeeps\gpsdevice_usb.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gpspilot.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gpssim.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gpsutil.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gpx.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\grtcirc.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gtm.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\gtrnctr.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\hiketech.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\holux.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\hsa_ndv.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\html.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\igc.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\ignrando.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\inifile.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\internal_styles.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\interpolate.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\kml.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="Expat\libexpat.lib"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\lowranceusr.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\mag_pdb.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\maggeo.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\magnav.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\magproto.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\main.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\mapopolis.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\mapsend.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\mapsource.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\mkshort.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\msroute.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\navicache.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\netstumbler.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\nmea.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\nmn4.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\nukedata.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\overlay.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\ozi.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\palmdoc.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\pathaway.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\pcx.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\pdbfile.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\polygon.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\position.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\psitrex.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\psp.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\queue.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\quovadis.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\radius.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\raymarine.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\reverse_route.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\rgbcolors.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\route.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\saroute.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\shape.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\smplrout.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\sort.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\stackfilter.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\stmsdf.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\stmwpp.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\strptime.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\tef_xml.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\text.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\tiger.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\tmpro.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\tomtom.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\tpg.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\tpo.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\trackfilter.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\transform.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\unicsv.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\units.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\util.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\util_crc.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\uuid.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\vcf.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\vecs.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\vitosmt.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\vitovtt.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\vmem.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\waypt.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\wbt-200.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\wfff_xml.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\xcsv.c"\r
-                               >\r
-                               <FileConfiguration\r
-                                       Name="Release|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Debug|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="0"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                               BasicRuntimeChecks="3"\r
-                                               BrowseInformation="1"\r
-                                       />\r
-                               </FileConfiguration>\r
-                               <FileConfiguration\r
-                                       Name="Unicode|Win32"\r
-                                       >\r
-                                       <Tool\r
-                                               Name="VCCLCompilerTool"\r
-                                               Optimization="2"\r
-                                               AdditionalIncludeDirectories=""\r
-                                               PreprocessorDefinitions=""\r
-                                       />\r
-                               </FileConfiguration>\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\xhtmlent.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\xmlgeneric.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\xmltag.c"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\yahoo.c"\r
-                               >\r
-                       </File>\r
-                       <Filter\r
-                               Name="Jeeps"\r
-                               >\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsapp.c"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="0"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       BasicRuntimeChecks="3"\r
-                                                       ObjectFile=".\Debug\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Debug\Jeeps/"\r
-                                                       BrowseInformation="1"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Unicode|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpscom.c"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="0"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       BasicRuntimeChecks="3"\r
-                                                       ObjectFile=".\Debug\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Debug\Jeeps/"\r
-                                                       BrowseInformation="1"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Unicode|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsmath.c"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="0"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       BasicRuntimeChecks="3"\r
-                                                       ObjectFile=".\Debug\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Debug\Jeeps/"\r
-                                                       BrowseInformation="1"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Unicode|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsmem.c"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="0"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       BasicRuntimeChecks="3"\r
-                                                       ObjectFile=".\Debug\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Debug\Jeeps/"\r
-                                                       BrowseInformation="1"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Unicode|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsprot.c"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="0"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       BasicRuntimeChecks="3"\r
-                                                       ObjectFile=".\Debug\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Debug\Jeeps/"\r
-                                                       BrowseInformation="1"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Unicode|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsread.c"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="0"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       BasicRuntimeChecks="3"\r
-                                                       ObjectFile=".\Debug\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Debug\Jeeps/"\r
-                                                       BrowseInformation="1"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Unicode|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsrqst.c"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="0"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       BasicRuntimeChecks="3"\r
-                                                       ObjectFile=".\Debug\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Debug\Jeeps/"\r
-                                                       BrowseInformation="1"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Unicode|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpssend.c"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="0"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       BasicRuntimeChecks="3"\r
-                                                       ObjectFile=".\Debug\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Debug\Jeeps/"\r
-                                                       BrowseInformation="1"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Unicode|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsserial.c"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="0"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       BasicRuntimeChecks="3"\r
-                                                       ObjectFile=".\Debug\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Debug\Jeeps/"\r
-                                                       BrowseInformation="1"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Unicode|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsusbcommon.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsusbread.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsusbsend.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsusbwin.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsutil.c"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="0"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       BasicRuntimeChecks="3"\r
-                                                       ObjectFile=".\Debug\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Debug\Jeeps/"\r
-                                                       BrowseInformation="1"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Unicode|Win32"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                                       Optimization="2"\r
-                                                       AdditionalIncludeDirectories=""\r
-                                                       PreprocessorDefinitions=""\r
-                                                       ObjectFile=".\Release\Jeeps/"\r
-                                                       ProgramDataBaseFileName="Release\Jeeps/"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                       </Filter>\r
-                       <Filter\r
-                               Name="shapelib"\r
-                               >\r
-                               <File\r
-                                       RelativePath="..\shapelib\dbfopen.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\shapelib\shpopen.c"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-                       <Filter\r
-                               Name="Zlib"\r
-                               >\r
-                               <File\r
-                                       RelativePath="..\zlib\adler32.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\compress.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\crc32.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\deflate.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\gzio.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\infback.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\inffast.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\inflate.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\inftrees.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\trees.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\uncompr.c"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\zutil.c"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Header Files"\r
-                       Filter="h;hpp;hxx;hm;inl"\r
-                       >\r
-                       <File\r
-                               RelativePath=".\config.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\csv_util.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\defs.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\garmin_gpi.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\garmin_tables.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\jeeps\gpsdevice.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\grtcirc.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\holux.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\magellan.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\mapsend.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\pdbfile.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\queue.h"\r
-                               >\r
-                       </File>\r
-                       <File\r
-                               RelativePath="..\quovadis.h"\r
-                               >\r
-                       </File>\r
-                       <Filter\r
-                               Name="Jeeps-Headers"\r
-                               >\r
-                               <File\r
-                                       RelativePath="..\jeeps\gps.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsapp.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpscom.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsdatum.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsfmt.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsinput.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsmath.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsmem.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsnmea.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsnmeafmt.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsnmeaget.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsport.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsproj.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsprot.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsread.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsrqst.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpssend.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsserial.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsusbcommon.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsusbint.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\jeeps\gpsutil.h"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-                       <Filter\r
-                               Name="Zlib-Headers"\r
-                               >\r
-                               <File\r
-                                       RelativePath="..\zlib\crc32.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\deflate.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\inffast.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\inffixed.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\inflate.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\inftrees.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\trees.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\zconf.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\zlib.h"\r
-                                       >\r
-                               </File>\r
-                               <File\r
-                                       RelativePath="..\zlib\zutil.h"\r
-                                       >\r
-                               </File>\r
-                       </Filter>\r
-               </Filter>\r
-               <Filter\r
-                       Name="Resource Files"\r
-                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
-                       >\r
-               </Filter>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="8.00"
+       Name="GPSBabel"
+       ProjectGUID="{EB2609DB-5800-45B2-BCB2-06D72F389DCA}"
+       RootNamespace="GPSBabel"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory=".\Release"
+                       IntermediateDirectory=".\Release"
+                       ConfigurationType="1"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TypeLibraryName=".\Release/GPSBabel.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="3"
+                               InlineFunctionExpansion="1"
+                               EnableIntrinsicFunctions="false"
+                               FavorSizeOrSpeed="2"
+                               WholeProgramOptimization="true"
+                               AdditionalIncludeDirectories="expat,."
+                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;__WIN32__;"
+                               StringPooling="true"
+                               ExceptionHandling="0"
+                               RuntimeLibrary="0"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+                               PrecompiledHeaderFile=".\Release/GPSBabel.pch"
+                               AssemblerListingLocation=".\Release/"
+                               ObjectFile=".\Release/"
+                               ProgramDataBaseFileName=".\Release/"
+                               WarningLevel="3"
+                               WarnAsError="true"
+                               SuppressStartupBanner="true"
+                               DebugInformationFormat="3"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="setupapi.lib"
+                               OutputFile=".\Release/GPSBabel.exe"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               GenerateDebugInformation="true"
+                               AssemblyDebug="1"
+                               ProgramDatabaseFile=".\Release/GPSBabel.pdb"
+                               SubSystem="1"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory=".\Debug"
+                       IntermediateDirectory=".\Debug"
+                       ConfigurationType="1"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TypeLibraryName=".\Debug/GPSBabel.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="expat;."
+                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;__WIN32__;_DEBUG;_CONSOLE;"
+                               BasicRuntimeChecks="3"
+                               RuntimeLibrary="1"
+                               UsePrecompiledHeader="0"
+                               PrecompiledHeaderFile=".\Debug/GPSBabel.pch"
+                               AssemblerListingLocation=".\Debug/"
+                               ObjectFile=".\Debug/"
+                               ProgramDataBaseFileName=".\Debug/"
+                               BrowseInformation="1"
+                               WarningLevel="3"
+                               WarnAsError="true"
+                               SuppressStartupBanner="true"
+                               DebugInformationFormat="3"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="_DEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="setupapi.lib"
+                               OutputFile=".\Debug/GPSBabel.exe"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               GenerateDebugInformation="true"
+                               ProgramDatabaseFile=".\Debug/GPSBabel.pdb"
+                               SubSystem="1"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Unicode|Win32"
+                       OutputDirectory="$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="1"
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+                       UseOfMFC="0"
+                       ATLMinimizesCRunTimeLibraryUsage="false"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TypeLibraryName=".\Release/GPSBabel.tlb"
+                               HeaderFileName=""
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="3"
+                               InlineFunctionExpansion="1"
+                               EnableIntrinsicFunctions="false"
+                               FavorSizeOrSpeed="2"
+                               WholeProgramOptimization="true"
+                               AdditionalIncludeDirectories="expatw;."
+                               PreprocessorDefinitions="XML_UNICODE=1;_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;__WIN32__;"
+                               StringPooling="true"
+                               ExceptionHandling="0"
+                               RuntimeLibrary="0"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+                               PrecompiledHeaderFile=".\unicode/GPSBabel.pch"
+                               AssemblerListingLocation=".\unicode/"
+                               ObjectFile=".\unicode/"
+                               ProgramDataBaseFileName=".\unicode/"
+                               WarningLevel="3"
+                               WarnAsError="true"
+                               SuppressStartupBanner="true"
+                               DebugInformationFormat="3"
+                               CompileAs="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                               PreprocessorDefinitions="NDEBUG"
+                               Culture="1033"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="setupapi.lib expatw\libexpatw.lib"
+                               LinkIncremental="1"
+                               SuppressStartupBanner="true"
+                               GenerateDebugInformation="false"
+                               AssemblyDebug="0"
+                               ProgramDatabaseFile=".\unicode/GPSBabel.pdb"
+                               SubSystem="1"
+                               TargetMachine="1"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCWebDeploymentTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+                       >
+                       <File
+                               RelativePath="..\alan.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\an1.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\arcdist.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\avltree.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\axim_gpb.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\bcr.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\brauniger_iq.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\cet.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\cet_util.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\cetus.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\coastexp.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\compegps.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\copilot.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\coto.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\cst.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\csv_util.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\dg-100.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\delgpl.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\destinator.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\discard.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\dmtlog.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\duplicate.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\easygps.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\exif.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\fatal.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\filter_vecs.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\formspec.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\g7towin.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\garmin.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\garmin_fs.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\garmin_gpi.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\garmin_tables.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\garmin_txt.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gbfile.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gbser.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gbser_win.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gbsleep.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gcdb.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\gdb.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\geo.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\geoniche.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\ggv_log.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\globals.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\glogbook.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\google.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gpilots.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\jeeps\gpsdevice.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\jeeps\gpsdevice_ser.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\jeeps\gpsdevice_usb.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gpspilot.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\gpssim.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gpsutil.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\gpx.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\grtcirc.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\gtm.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gtrnctr.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\hiketech.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\holux.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\hsa_ndv.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\html.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\igc.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\ignrando.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\ik3d.c">
+                       </File>
+                       <File
+                               RelativePath="..\inifile.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\internal_styles.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\interpolate.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\kml.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="Expat\libexpat.lib"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\lmx.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\lowranceusr.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\mag_pdb.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\maggeo.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\magnav.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\magproto.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\main.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\mapopolis.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\mapsend.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\mapsource.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\mkshort.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\msroute.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\mtk_logger.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\navicache.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\navilink.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\netstumbler.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\nmea.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\nmn4.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\nukedata.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\osm.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\overlay.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\ozi.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\palmdoc.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\parse.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\pathaway.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\pcx.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\pdbfile.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\polygon.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\position.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\psitrex.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\psp.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\queue.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\quovadis.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\radius.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\random.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\raymarine.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\reverse_route.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\rgbcolors.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\route.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\saroute.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\shape.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\smplrout.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\sort.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\stackfilter.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\stmsdf.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\stmwpp.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\strptime.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\tef_xml.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\text.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\tiger.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\tmpro.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\tomtom.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\tpg.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\tpo.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\trackfilter.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\transform.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\unicsv.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\units.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\util.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\util_crc.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\uuid.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\vcf.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\vecs.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\vitosmt.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\vitovtt.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\vmem.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\waypt.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\wbt-200.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\wfff_xml.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\xcsv.c"
+                               >
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="0"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                               BasicRuntimeChecks="3"
+                                               BrowseInformation="1"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Unicode|Win32"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                               Optimization="2"
+                                               AdditionalIncludeDirectories=""
+                                               PreprocessorDefinitions=""
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="..\xhtmlent.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\xmlgeneric.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\xmltag.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\xol.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\yahoo.c"
+                               >
+                       </File>
+                       <Filter
+                               Name="Jeeps"
+                               >
+                               <File
+                                       RelativePath="..\jeeps\gpsapp.c"
+                                       >
+                                       <FileConfiguration
+                                               Name="Release|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Debug|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="0"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       BasicRuntimeChecks="3"
+                                                       ObjectFile=".\Debug\Jeeps/"
+                                                       ProgramDataBaseFileName="Debug\Jeeps/"
+                                                       BrowseInformation="1"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Unicode|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpscom.c"
+                                       >
+                                       <FileConfiguration
+                                               Name="Release|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Debug|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="0"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       BasicRuntimeChecks="3"
+                                                       ObjectFile=".\Debug\Jeeps/"
+                                                       ProgramDataBaseFileName="Debug\Jeeps/"
+                                                       BrowseInformation="1"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Unicode|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsmath.c"
+                                       >
+                                       <FileConfiguration
+                                               Name="Release|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Debug|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="0"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       BasicRuntimeChecks="3"
+                                                       ObjectFile=".\Debug\Jeeps/"
+                                                       ProgramDataBaseFileName="Debug\Jeeps/"
+                                                       BrowseInformation="1"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Unicode|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsmem.c"
+                                       >
+                                       <FileConfiguration
+                                               Name="Release|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Debug|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="0"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       BasicRuntimeChecks="3"
+                                                       ObjectFile=".\Debug\Jeeps/"
+                                                       ProgramDataBaseFileName="Debug\Jeeps/"
+                                                       BrowseInformation="1"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Unicode|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsprot.c"
+                                       >
+                                       <FileConfiguration
+                                               Name="Release|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Debug|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="0"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       BasicRuntimeChecks="3"
+                                                       ObjectFile=".\Debug\Jeeps/"
+                                                       ProgramDataBaseFileName="Debug\Jeeps/"
+                                                       BrowseInformation="1"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Unicode|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsread.c"
+                                       >
+                                       <FileConfiguration
+                                               Name="Release|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Debug|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="0"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       BasicRuntimeChecks="3"
+                                                       ObjectFile=".\Debug\Jeeps/"
+                                                       ProgramDataBaseFileName="Debug\Jeeps/"
+                                                       BrowseInformation="1"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Unicode|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsrqst.c"
+                                       >
+                                       <FileConfiguration
+                                               Name="Release|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Debug|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="0"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       BasicRuntimeChecks="3"
+                                                       ObjectFile=".\Debug\Jeeps/"
+                                                       ProgramDataBaseFileName="Debug\Jeeps/"
+                                                       BrowseInformation="1"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Unicode|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpssend.c"
+                                       >
+                                       <FileConfiguration
+                                               Name="Release|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Debug|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="0"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       BasicRuntimeChecks="3"
+                                                       ObjectFile=".\Debug\Jeeps/"
+                                                       ProgramDataBaseFileName="Debug\Jeeps/"
+                                                       BrowseInformation="1"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Unicode|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsserial.c"
+                                       >
+                                       <FileConfiguration
+                                               Name="Release|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Debug|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="0"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       BasicRuntimeChecks="3"
+                                                       ObjectFile=".\Debug\Jeeps/"
+                                                       ProgramDataBaseFileName="Debug\Jeeps/"
+                                                       BrowseInformation="1"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Unicode|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsusbcommon.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsusbread.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsusbsend.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsusbwin.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsutil.c"
+                                       >
+                                       <FileConfiguration
+                                               Name="Release|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Debug|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="0"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       BasicRuntimeChecks="3"
+                                                       ObjectFile=".\Debug\Jeeps/"
+                                                       ProgramDataBaseFileName="Debug\Jeeps/"
+                                                       BrowseInformation="1"
+                                               />
+                                       </FileConfiguration>
+                                       <FileConfiguration
+                                               Name="Unicode|Win32"
+                                               >
+                                               <Tool
+                                                       Name="VCCLCompilerTool"
+                                                       Optimization="2"
+                                                       AdditionalIncludeDirectories=""
+                                                       PreprocessorDefinitions=""
+                                                       ObjectFile=".\Release\Jeeps/"
+                                                       ProgramDataBaseFileName="Release\Jeeps/"
+                                               />
+                                       </FileConfiguration>
+                               </File>
+                       </Filter>
+                       <Filter
+                               Name="shapelib"
+                               >
+                               <File
+                                       RelativePath="..\shapelib\dbfopen.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\shapelib\shpopen.c"
+                                       >
+                               </File>
+                       </Filter>
+                       <Filter
+                               Name="Zlib"
+                               >
+                               <File
+                                       RelativePath="..\zlib\adler32.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\compress.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\crc32.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\deflate.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\gzio.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\infback.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\inffast.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\inflate.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\inftrees.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\trees.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\uncompr.c"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\zutil.c"
+                                       >
+                               </File>
+                       </Filter>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl"
+                       >
+                       <File
+                               RelativePath="..\avltree.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\config.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\csv_util.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\defs.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\garmin_gpi.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\garmin_tables.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\jeeps\gpsdevice.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gbfile.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\gbtypes.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\grtcirc.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\holux.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\magellan.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\mapsend.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\pdbfile.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\queue.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\quovadis.h"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\uuid.h">
+                       </File>
+                       <Filter
+                               Name="Jeeps-Headers"
+                               >
+                               <File
+                                       RelativePath="..\jeeps\gps.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsapp.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpscom.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsdatum.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsfmt.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsinput.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsmath.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsmem.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsnmea.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsnmeafmt.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsnmeaget.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsport.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsproj.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsprot.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsread.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsrqst.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpssend.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsserial.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsusbcommon.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsusbint.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\jeeps\gpsutil.h"
+                                       >
+                               </File>
+                       </Filter>
+                       <Filter
+                               Name="Zlib-Headers"
+                               >
+                               <File
+                                       RelativePath="..\zlib\crc32.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\deflate.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\inffast.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\inffixed.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\inflate.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\inftrees.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\trees.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\zconf.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\zlib.h"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\zlib\zutil.h"
+                                       >
+                               </File>
+                       </Filter>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+                       >
+               </Filter>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
index 39219e1028fd102c8f78ed4e04505f26cced7489..b8df41708e635596e7a0996461199aa7e62322ee 100644 (file)
@@ -6,8 +6,12 @@
 // Define to zero for the common UTF-8, ASCII and related sets.
 // Define to one for everything we know.
 
+/* 0 for most-used, 1 for all character sets */
 #undef CET_WANTED     
 
+/* 1 to enable as many formats as possible */
+#undef MAXIMAL_ENABLED
+
 /* 1 to enable the CSV formats support */
 #undef CSVFMTS_ENABLED 
 
@@ -20,5 +24,5 @@
 /* 1 to enable shapefile support */
 #undef SHAPELIB_ENABLED
 
+/* 1 to inhibit our use of zlib. */
 #define ZLIB_INHIBITED 1
-
diff --git a/mtk_logger.c b/mtk_logger.c
new file mode 100644 (file)
index 0000000..d1cb3fc
--- /dev/null
@@ -0,0 +1,1149 @@
+/*
+  Download track data from GPS loggers based in MTK chipset. 
+
+    Copyright (C) 2007 Per Borgentun, e4borgen(at)yahoo.com
+    With lot of inspiration from wbt-200.c 
+       Copyright (C) 2006 Andy Armstrong
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+*/
+/*  
+   --------------------------------------------------------------
+  This module will download track data from a MTK chipset based GPS logger. 
+  It will also convert the raw data.bin file to MTK compatible CSV and 
+  gpsbabel output of your choice.
+  It has been tested with Transystem i-Blue 747 but other devices should
+  work as well (Qstarz BT-Q1000, iTrek Z1, ...)
+
+  For more info and tweaks on MTK based loggers 
+   <http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=81990>
+   <http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=81315>
+ For info about the used log format:
+  <http://spreadsheets.google.com/pub?key=pyCLH-0TdNe-5N-5tBokuOA&gid=5>
+
+ Example usage::
+   
+   # Read from USB port, output trackpoints & waypoints in GPX format   
+  ./gpsbabel -D 2 -t -w -i mtk -f /dev/ttyUSB0 -o gpx -F out.gpx
+  
+   # Parse an existing .bin file (data_2007_09_04.bin), output trackpoints as 
+   #  both CSV file and GPX
+  ./gpsbabel -D 2 -t -i mtk-bin,csv=data__2007_09_04.csv -f data_2007_09_04.bin -o gpx -F out.gpx
+
+  Todo:
+    o ....    
+ */
+
+#include "defs.h"
+#include "gbser.h"
+#include "gbfile.h" /* used for csv output */
+#include <ctype.h>
+
+#define MYNAME "mtk_logger"
+
+/* MTK packet id's -- currently unused... */
+enum MTK_NMEA_PACKET { 
+   PMTK_TEST = 0,
+   PMTK_ACK  = 1,
+   PMTK_SYS_MSG = 10,
+   PMTK_CMD_HOT_START  = 101,
+   PMTK_CMD_WARM_START = 102,
+   PMTK_CMD_COLD_START = 103,
+   PMTK_CMD_FULL_COLD_START  = 104,
+   PMTK_CMD_LOG                = 182, /* Data log commands */
+   PMTK_SET_NMEA_BAUDRATE      = 251,
+   PMTK_API_SET_DGPS_MODE    = 301,
+   PMTK_API_SET_SBAS_ENABLED = 313,
+   PMTK_API_SET_NMEA_OUTPUT  = 314,
+   PMTK_API_SET_PWR_SAV_MODE = 320,
+   PMTK_API_SET_DATUM          = 330,
+   PMTK_API_SET_DATUM_ADVANCE  = 331,
+   PMTK_API_SET_USER_OPTION    = 390,
+   PMTK_API_Q_FIX_CTL          = 400,   
+   PMTK_API_Q_DGPS_MODE    = 401,
+   PMTK_API_Q_SBAS_ENABLED = 413,
+   PMTK_API_Q_NMEA_OUTPUT  = 414,
+   PMTK_API_Q_PWR_SAV_MODE = 420,
+   PMTK_API_Q_DATUM            = 430,
+   PMTK_API_Q_DATUM_ADVANCE    = 431,
+   PMTK_API_GET_USER_OPTION    = 490,
+   PMTK_DT_FIX_CTL             = 500,
+   PMTK_DT_DGPS_MODE    = 501,
+   PMTK_DT_SBAS_ENABLED = 513,
+   PMTK_DT_NMEA_OUTPUT  = 514,
+   PMTK_DT_PWR_SAV_MODE = 520,
+   PMTK_DT_DATUM               = 530,
+   PMTK_DT_FLASH_USER_OPTION   = 590,
+   PMTK_Q_VERSION       = 604,
+   PMTK_Q_RELEASE              = 605,
+   PMTK_DT_VERSION      = 704,
+   PMTK_DT_RELEASE             = 705
+};   
+
+static const unsigned char LOG_RST[16] = { 
+    0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, /* start marker */
+    0x00, 0x00, 0x00, 0x00, 0x00,       /* data */
+    0xbb, 0xbb, 0xbb, 0xbb };          /* end marker */
+
+static const char *MTK_ACK[] = { /* Flags returned from PMTK001 ack packet */
+  "Invalid packet", "Unsupported packet type", 
+  "Valid packet but action failed", "Valid packet, action success" };
+
+/* *************************************** */
+
+/* Data id, type, sizes used by MTK chipset - don't touch.... */
+enum {
+   UTC = 0,
+   VALID,
+   LATITUDE, 
+   LONGITUDE, 
+   HEIGHT,
+   SPEED, 
+   HEADING, 
+   DSTA, 
+   DAGE, 
+   PDOP, 
+   HDOP,
+   VDOP,
+   NSAT,
+   SID,
+   ELEVATION,
+   AZIMUTH,
+   SNR,
+   RCR,
+   MILLISECOND,
+   DISTANCE,
+} DATA_TYPES;
+
+struct log_type {
+   int id;
+   int size;
+   const char *name;
+} log_type[] =  {
+   { 0, 4, "UTC" },
+   { 1, 2, "VALID" },
+   { 2, 8, "LATITUDE,N/S"},
+   { 3, 8, "LONGITUDE,E/W"},
+   { 4, 4, "HEIGHT" },
+   { 5, 4, "SPEED" },
+   { 6, 4, "HEADING" },
+   { 7, 2, "DSTA" },
+   { 8, 4, "DAGE" },
+   { 9, 2, "PDOP" },
+   { 10, 2, "HDOP"},
+   { 11, 2, "VDOP"},
+   { 12, 2, "NSAT (USED/VIEW)"},
+   { 13, 4, "SID",},
+   { 14, 2, "ELEVATION" },
+   { 15, 2, "AZIMUTH" },
+   { 16, 2, "SNR"},
+   { 17, 2, "RCR"},
+   { 18, 2, "MILLISECOND"},
+   { 19, 8, "DISTANCE" }
+};
+
+struct sat_info {
+   char id, used; 
+   short elevation, azimut, snr;
+} sat_info;
+
+struct data_item {
+   time_t timestamp;
+   short valid;
+   double lat;
+   double lon;
+   float height;
+   float speed;
+   float heading;
+   short dsta; // differential station
+   float dage;  // differential ...
+   float pdop, hdop, vdop;
+   char sat_used, sat_view;
+   short rcr;
+   unsigned short timestamp_ms;
+   double distance;
+   struct sat_info sat_data[32];      
+} data_item;
+
+/* *************************************** */
+
+#define TIMEOUT        1000
+#define MTK_BAUDRATE 115200
+
+static void *fd;  /* serial fd */
+static FILE *fl;  /* bin.file fd */
+static char *port; /* serial port name */
+static char *erase;  /* erase ? command option */
+static char *csv_file; /* csv ? command option */
+static unsigned int bmask = 0x000e0e7f;
+static unsigned int mlog_period, mlog_distance, mlog_speed; /* in 10:ths of sec, m, km/h */
+
+
+const char LIVE_CHAR[4] = {'-', '\\','|','/'};
+const char TEMP_DATA_BIN[]= "data.bin";
+
+
+const char CMD_LOG_DISABLE[]= "$PMTK182,5*20\r\n";
+const char CMD_LOG_ENABLE[] = "$PMTK182,4*21\r\n";
+const char CMD_LOG_FORMAT[] = "$PMTK182,2,2*39\r\n";
+const char CMD_LOG_ERASE[]  = "$PMTK182,6,1*3E\r\n";
+
+
+static void file_init(const char *fname);
+static void file_deinit(void) ;
+static void file_read(void);
+
+
+
+// Arguments for logg fetch 'mtk' command..
+
+static arglist_t mtk_sargs[] = {
+    { "erase", &erase, "Erase device data after download",
+        "0", ARGTYPE_BOOL, ARG_NOMINMAX },
+    { "csv",   &csv_file, "MTK compatible CSV output file",
+        NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+    ARG_TERMINATOR
+};
+
+static void dbg(int l, const char *msg, ...) {
+    va_list ap;
+    va_start(ap, msg);
+    if (global_opts.debug_level >= l) {
+        vprintf(msg, ap);
+    }
+    va_end(ap);
+}
+static int do_send_cmd(const char *cmd, int cmdLen) {
+   int rc;
+
+   dbg(6, "Send %s ", cmd);
+   rc = gbser_print(fd, cmd);
+   if ( rc != gbser_OK )
+      fatal(MYNAME ": Write error (%d)\n", rc);
+
+   return cmdLen;
+}
+
+static int do_cmd(const char *cmd, const char *expect, time_t timeout_sec) {
+   char line[256];
+   int len, done, loops, cmd_erase;
+   int expect_len;
+   time_t tout;
+   
+   if ( expect )
+      expect_len = strlen(expect);
+   else
+      expect_len = 0;
+  
+   time(&tout);
+   if ( timeout_sec > 0 )
+     tout += timeout_sec;
+   else
+     tout += 1;
+     
+   cmd_erase = 0;
+   if  ( strncmp(cmd, CMD_LOG_ERASE, 12) == 0 ){
+      cmd_erase = 1;
+      if (global_opts.debug_level > 0 ) {
+         dbg(1, "Erasing    "); 
+         fflush(stdout); 
+      }
+   }
+   // dbg(6, "## Send '%s' -- Expect '%s' in %d sec\n", cmd, expect, timeout_sec);
+   
+   do_send_cmd(cmd, strlen(cmd)); // success or fatal()...
+   
+   done = 0;
+   loops = 0;
+   memset(line, '\0', sizeof(line));
+   do {
+    int rc;
+    rc = gbser_read_line(fd, line, sizeof(line)-1, TIMEOUT, 0x0A, 0x0D);
+    if ( rc != gbser_OK) {
+        if ( rc == gbser_TIMEOUT && time(NULL) > tout ){
+           dbg(2, "NMEA command '%s' timeout !\n", cmd);
+           return -1;
+           // fatal(MYNAME "do_cmd(): Read error (%d)\n", rc);
+        }
+        len = -1;
+    } else {
+       len = strlen(line);
+    }
+    loops++;
+    dbg(8, "Read %d bytes: '%s'\n", len, line);
+    if ( cmd_erase && global_opts.debug_level > 0 && global_opts.debug_level <= 3 ){ 
+       // erase cmd progress wheel -- only for debug level 1-3 
+       printf("\b%c", LIVE_CHAR[loops%4]); fflush(stdout);
+    }
+      if ( len > 5 && line[0] == '$' ){
+         if ( expect_len > 0 && strncmp(&line[1], expect, expect_len) == 0 ){
+            if ( cmd_erase && global_opts.debug_level > 0 ) printf("\n");
+            dbg(6, "NMEA command success !\n");
+            done = 1;
+          } else if ( strncmp(line, "$PMTK", 5) == 0 ){
+             /* A quick parser for ACK packets */
+             if ( !cmd_erase && strncmp(line, "$PMTK001,", 9) == 0 && line[9] != '\0' ){ 
+                char *pType, *pRslt;
+                int pAck;
+                pType = &line[9];
+                pRslt = strchr(&line[9], ',') + 1;
+                if ( memcmp(&cmd[5], pType, 3) == 0 && pRslt != NULL && *pRslt != '\0' ){
+                   pAck = *pRslt - '0';
+                   if ( pAck != 3 && pAck >= 0 && pAck < 4 ){ // Erase will return '2'
+                      dbg(1, "NMEA command '%s' failed - %s\n", cmd, MTK_ACK[pAck]);
+                      return -1;
+                   }
+                }
+                   
+             } 
+             dbg(6, "RECV: '%s'\n", line);
+          }
+          
+      }
+      if ( !done && time(NULL) > tout ){
+           dbg(1, "NMEA command '%s' timeout !\n", cmd);
+           return -1;
+      }
+   }  while ( len != 0 && loops > 0 && !done );
+   return done?0:1;
+}
+
+/*******************************************************************************
+* %%%        global callbacks called by gpsbabel main process              %%% *
+*******************************************************************************/
+
+static void mtk_rd_init(const char *fname){
+    int rc;
+    
+    port = xstrdup(fname);
+
+    dbg(1, "Opening port %s...\n", fname);
+    if (fd = gbser_init(port), NULL == fd) {
+        fatal(MYNAME ": Can't initialise port \"%s\"\n", port);
+    }
+    
+    // verify that we have a MTK based logger...
+    dbg(1, "Verifying MTK based device...\n");
+
+    if ((rc = gbser_set_port(fd, MTK_BAUDRATE, 8, 0, 1))) {
+        dbg(1, "Set baud rate to %d failed (%d)\n", MTK_BAUDRATE, rc);
+        fatal(MYNAME ": Failed to set baudrate !\n");
+    }
+    rc = do_cmd("$PMTK605*31\r\n", "PMTK705", 10);
+    if ( rc != 0 )
+      fatal(MYNAME ": This is not a MTK based GPS ! (or is it turned off ?)\n");
+
+}
+
+static void mtk_rd_deinit(void){
+    dbg(3, "Closing port...\n");
+    gbser_deinit(fd);
+    fd = NULL;
+    xfree(port);
+}
+
+int mtk_erase(void){
+   
+   dbg(1, "Start flash erase..\n");
+   do_cmd(CMD_LOG_DISABLE, "PMTK001,182,5,3", 1);
+   gb_sleep(10*1000);
+
+   do_cmd(CMD_LOG_FORMAT, "PMTK182,3,2", 2);
+   gb_sleep(10*1000);
+
+   // Erase log....
+   do_cmd(CMD_LOG_ERASE, "PMTK001,182,6", 30);
+   gb_sleep(100*1000);
+
+   do_cmd(CMD_LOG_ENABLE, "PMTK001,182,4,3", 2);
+
+   return 0;
+}
+
+static void mtk_read(void){
+  char cmd[256];
+  char *line = NULL;
+  unsigned char crc, *data = NULL;
+  int cmdLen, j, bsize, i, len, ff_len, rc, init_scan; 
+  unsigned int line_size, data_size, data_addr, addr, addr_max;
+  FILE *dout;
+  
+  dout = fopen(TEMP_DATA_BIN, "wb");
+  if ( dout == NULL ){
+     fatal(MYNAME ": Can't create temporary file %s", TEMP_DATA_BIN);
+     return;
+  }
+  dbg(1, "Download %s -> %s\n", port, TEMP_DATA_BIN);
+
+  i = do_cmd(CMD_LOG_DISABLE, "PMTK001,182,5,3", 2);
+  dbg(3, " ---- LOG DISABLE ---- %s\n", i==0?"Success":"Fail");
+        
+  addr_max = 0x200000-64*1024;  // 16Mbit/2Mbyte/32x64kByte block.
+  init_scan = 1;
+  bsize = 0x0400;
+  addr  = 0x0000;
+
+  line_size = 2*bsize + 32; // logdata as nmea/hex.
+  data_size = bsize + 32;
+  if ( (line = xmalloc(line_size)) == NULL){
+     fatal(MYNAME ": Can't allocate %u bytes for NMEA buffer\n",  line_size);
+  }
+  if ( (data = xmalloc(data_size)) ==  NULL ){
+     fatal(MYNAME ": Can't allocate %u bytes for data buffer\n",  data_size);
+  }
+  memset(line, '\0', line_size);
+  memset(data, '\0', data_size);
+
+  
+  while ( init_scan || addr < addr_max ) {
+     // generate - read address NMEA command, add crc.
+     crc = 0;
+     cmdLen = snprintf(cmd, sizeof(cmd), "$PMTK182,7,%.8x,%.8x", addr, bsize);
+     for (i=1;i<cmdLen;i++)
+       crc ^= cmd[i];
+     
+     cmdLen += snprintf(&cmd[cmdLen], sizeof(cmd)-cmdLen,  "*%.2X\r\n", crc);
+     do_send_cmd(cmd, cmdLen);
+
+      memset(line, '\0', line_size);
+      do {
+         rc = gbser_read_line(fd, line, line_size-1, TIMEOUT, 0x0A, 0x0D);
+         if ( rc != gbser_OK) {
+             fatal(MYNAME "mtk_read(): Read error (%d)\n", rc);
+         }
+         len = strlen(line);
+         dbg(8, "Read %d bytes: '%s'\n", len, line);
+
+         if ( len > 0 ) {
+            line[len] = '\0';
+            if ( strncmp(line, "$PMTK182,8", 10) == 0 ){//  $PMTK182,8,00005000,FFFFFFF
+               data_addr = strtoul(&line[11], NULL, 16);
+               fseek(dout, data_addr, SEEK_SET);
+               i = 20;
+               j = 0;
+               ff_len = 0; // number of 0xff bytes.
+               while ( i < (len-3) ){
+                  data[j] = (isdigit(line[i])?(line[i]-'0'):(line[i]-'A'+0xA))*0x10 +
+                            (isdigit(line[i+1])?(line[i+1]-'0'):(line[i+1]-'A'+0xA));
+                  if ( data[j] == 0xff )
+                     ff_len++;
+                  i += 2;
+                  j++;          
+               }
+               if ( init_scan ){
+                  if ( ff_len == j ){ // data in sector - we've found max sector..
+                     addr_max = addr;
+                     dbg(3, "### Init scan complete - max block is 0x%6x!!! ###\n", addr_max);
+                  }   
+                  len = 0;
+               } else {
+                  if ( fwrite(data, 1, j, dout) != j )
+                     fatal(MYNAME ": Failed to write temp. binary file\n");
+                  if ( ff_len == j ){ // 0xff block - read complete...
+                     len = ff_len;
+                     addr_max = addr;
+                     break;
+                  } else {
+                     len = 0;
+                  }
+               }    
+            } 
+         }
+      } while ( len != 0 );
+      if ( init_scan ){
+         addr += 0x10000;
+         if ( addr >= addr_max ){ // initial scan complete...
+            init_scan = 0;
+            addr = 0x0000;
+         }
+      } else {
+         int perc;
+         addr += bsize;
+         perc = 100 - 100*(addr_max-addr)/addr_max;
+         if ( addr >= addr_max ) 
+           perc = 100;
+         dbg(2, "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\bReading 0x%.6x %3d %%", addr, perc); fflush(stdout);
+      }
+  }
+  if ( dout != NULL )
+     fclose(dout);
+   dbg(2, "\n");
+
+  i = do_cmd(CMD_LOG_ENABLE, "PMTK001,182,4,3", 2);
+  dbg(3, " ---- LOG ENABLE ----%s\n", i==0?"Success":"Fail");
+  
+  if ( line != NULL )
+     xfree(line);
+  if ( data != NULL )
+     xfree(data);
+  
+  file_init(TEMP_DATA_BIN);
+  file_read();
+  file_deinit();   
+   /* fixme -- we're assuming all went well - erase flash.... */
+   if ( *erase != '0' ) {
+      mtk_erase();
+   } 
+     
+   return;
+}
+
+
+static route_head  *trk_head = NULL;
+static int add_trackpoint(int idx, unsigned long bmask, struct data_item *itm){
+    char     wp_name[20];
+    waypoint *trk = waypt_new();
+
+    if ( global_opts.masked_objective & TRKDATAMASK && trk_head == NULL ){
+        trk_head = route_head_alloc();
+        xasprintf(&trk_head->rte_desc, "Log every %.0f sec, %.0f m, %.0f km/h" 
+          , mlog_period/10., mlog_distance/10., mlog_speed/10.);
+        track_add_head(trk_head);
+    } 
+
+    if ( bmask & (1<<LATITUDE) && bmask & (1<<LONGITUDE) ){
+       trk->latitude       = itm->lat;
+       trk->longitude      = itm->lon;
+    } else {
+       return -1; // GPX requires lat/lon...
+    }  
+
+    if ( bmask & (1<<HEIGHT) ){
+       trk->altitude       = itm->height;
+       // WAYPT_SET(trk, altitude, itm->height);
+    }
+    trk->creation_time  = itm->timestamp; // in UTC..
+    if ( bmask & (1<<MILLISECOND) ) 
+       trk->microseconds  = MILLI_TO_MICRO(itm->timestamp_ms);
+    
+    if ( bmask & (1<<PDOP) )
+       trk->pdop = itm->pdop; 
+    if ( bmask & (1<<HDOP) )
+       trk->hdop = itm->hdop; 
+    if ( bmask & (1<<VDOP) )
+       trk->vdop = itm->vdop; 
+
+    if ( bmask & (1<<HEADING) ){
+       WAYPT_SET(trk, course, itm->heading);
+    }
+    if ( bmask & (1<<SPEED) ){
+       WAYPT_SET(trk, speed, KPH_TO_MPS(itm->speed));
+    }
+    if ( bmask & (1<<VALID) ){
+       switch (itm->valid){
+         case 0x0040: trk->fix = fix_unknown;break; /* Estimated mode */
+         case 0x0001: trk->fix = fix_none;   break; /* "No Fix" */
+         case 0x0002: trk->fix = fix_3d;     break; /* "SPS" - 2d/3d ?*/
+         case 0x0004: trk->fix = fix_dgps;   break;
+         case 0x0008: trk->fix = fix_pps;    break; /* Military GPS */
+
+         case 0x0010: /* "RTK" */  
+         case 0x0020: /* "FRTK" */ 
+         case 0x0080: /* "Manual input mode"  */
+         case 0x0100: /* "Simulator";*/
+         default:      
+            trk->fix = fix_unknown;
+            break;
+       }
+    }   
+    if ( bmask & (1<<NSAT) )
+       trk->sat = itm->sat_used;
+       
+    // RCR is a bitmask of possibly several log reasons..
+    if ( global_opts.masked_objective & WPTDATAMASK 
+       && bmask & (1<<RCR) && itm->rcr & 0x0008  )
+    {
+       /* Button press -- create waypoint, start count at 1 */
+       waypoint *w = waypt_dupe(trk);
+
+       sprintf(wp_name, "WP%04d", waypt_count()+1);
+       w->shortname      = xstrdup(wp_name);
+       waypt_add(w);
+    } 
+    // In theory we would not add the waypoint to the list of
+    // trackpoints. But as the MTK logger restart the 
+    // log session from the button press we would loose a 
+    // trackpoint unless we include/duplicate it.
+
+    if ( global_opts.masked_objective & TRKDATAMASK ){
+       sprintf(wp_name, "TP%04d", idx);
+       trk->shortname      = xstrdup(wp_name);
+
+       track_add_wpt(trk_head, trk);
+    }    
+    return 0;
+}
+
+
+/********************** MTK Logger -- CSV output *************************/
+static gbfile *cd;
+static void mtk_csv_init(char *csv_fname, unsigned long bitmask){
+   int i;
+   FILE *cf;
+      
+    dbg(1, "Opening csv output file %s...\n", csv_fname);
+   
+     // can't use gbfopen here - it will fatal() if file doesn't exist
+    if ( (cf = fopen(csv_fname, "r")) != NULL ) {
+        fclose(cf);
+        warning(MYNAME ": CSV file %s already exist ! Cowardly refusing to overwrite.\n", csv_fname);
+        return;
+    }
+    
+    if ( (cd = gbfopen(csv_fname, "w", MYNAME)) == NULL ) {
+        fatal(MYNAME ": Can't open csv file '%s'\n", csv_fname);
+    }
+   
+    /* Add the header line */
+    gbfprintf(cd, "INDEX,%s%s", ((1<<RCR) & bitmask)?"RCR,":"",
+        ((1<<UTC) & bitmask)?"DATE,TIME,":"" );
+   for (i=0;i<32;i++){
+      if ( (1<<i) & bmask ){
+         switch (i){
+            case RCR:
+            case UTC:
+            case MILLISECOND:
+               break;
+            case SID:   
+               gbfprintf(cd, "SAT INFO (SID");
+               break;
+            case ELEVATION:
+               gbfprintf(cd, "-ELE");
+               break;
+            case AZIMUTH:
+               gbfprintf(cd, "-AZI");
+               break;
+            case SNR:
+               gbfprintf(cd, "-SNR");
+               break;
+            default:
+               gbfprintf(cd, "%s,", log_type[i].name);
+               break;
+         }
+      }
+      if ( i == SNR && (1<<SID) & bmask )
+         gbfprintf(cd, "),");
+   }
+   gbfprintf(cd, "\n");
+}
+
+static void mtk_csv_deinit(void){
+   if ( cd != NULL ){
+      gbfclose(cd);
+      cd = NULL;
+   }
+}
+
+/* Output a single data line in MTK application compatible format - i.e ignore any locale settings... */
+static int csv_line(gbfile *csvFile, int idx, unsigned long bmask, struct data_item *itm){
+   struct tm *ts_tm;
+   char ts_str[30];
+   char *fix_str = "";
+
+   ts_tm = gmtime(&(itm->timestamp));
+   strftime(ts_str, sizeof(ts_str)-1, "%Y/%m/%d,%H:%M:%S", ts_tm);
+
+   if (  bmask & (1<<VALID) ){
+      switch (itm->valid){
+         case 0x0001: fix_str = "No fix"; break;
+         case 0x0002: fix_str = "SPS";    break;
+         case 0x0004: fix_str = "DGPS";   break;
+         case 0x0008: fix_str = "PPS";    break; /* Military GPS */
+         case 0x0010: fix_str = "RTK";    break; /* RealTime Kinematic */
+         case 0x0020: fix_str = "FRTK";   break;
+         case 0x0040: fix_str = "Estimated mode"; break;
+         case 0x0080: fix_str = "Manual input mode"; break;
+         case 0x0100: fix_str = "Simulator"; break;
+         default:     fix_str = "???";  break;
+      }   
+   }
+   gbfprintf(csvFile, "%d,", idx);
+   
+   // RCR is a bitmask of possibly several log reasons..
+   if ( bmask & (1<<RCR) )
+      gbfprintf(csvFile, "%s%s%s%s,"
+         , itm->rcr&0x0001?"T":"",itm->rcr&0x0002?"S":""
+         , itm->rcr&0x0004?"D":"",itm->rcr&0x0008?"B":"");
+
+   if ( bmask & (1<<UTC) )
+      gbfprintf(csvFile, "%s.%.3d,", ts_str, (bmask & (1<<MILLISECOND))?itm->timestamp_ms:0);
+
+   if ( bmask & (1<<VALID) )
+      gbfprintf(csvFile, "%s,", fix_str);
+   
+   if ( bmask & (1<<LATITUDE | 1<<LONGITUDE) )
+      gbfprintf(csvFile, "%.6f,%c,%.6f,%c,", fabs(itm->lat), itm->lat>0?'N':'S', 
+         fabs(itm->lon), itm->lon>0?'E':'W');
+
+   if ( bmask & (1<<HEIGHT) )
+      gbfprintf(csvFile, "%.3f m,",  itm->height);
+
+   if ( bmask & (1<<SPEED) )
+      gbfprintf(csvFile, "%.3f km/h,", itm->speed);
+
+   if ( bmask & (1<<HEADING) )
+      gbfprintf(csvFile, "%.6f,", itm->heading);
+
+   if ( bmask & (1<<DSTA) )
+      gbfprintf(csvFile, "%d,", itm->dsta);
+   if ( bmask & (1<<DAGE) )
+      gbfprintf(csvFile, "%.6f,", itm->dage);
+   
+   if ( bmask & (1<<PDOP) )
+      gbfprintf(csvFile, "%.2f,", itm->pdop);
+   if ( bmask & (1<<HDOP) )
+      gbfprintf(csvFile, "%.2f,", itm->hdop); // note bug in MTK appl. 1.02 is output as 1.2 !
+   if ( bmask & (1<<VDOP) )
+      gbfprintf(csvFile, "%.2f,", itm->vdop);
+   if ( bmask & (1<<NSAT) )
+      gbfprintf(csvFile, "%d(%d),", itm->sat_used, itm->sat_view);
+
+   if ( bmask & (1<<SID) ){
+      int l, slen, do_sc = 0;
+      char sstr[40];
+      for (l=0;l<32;l++){
+         if ( itm->sat_data[l].id > 0 ){
+            slen = 0;
+            slen += sprintf(&sstr[slen], "%s%.2d" 
+              , itm->sat_data[l].used?"#":""
+              , itm->sat_data[l].id);
+            if ( bmask & (1<<ELEVATION) ) 
+               slen += sprintf(&sstr[slen], "-%.2d", itm->sat_data[l].elevation);
+            if ( bmask & (1<<AZIMUTH) ) 
+               slen += sprintf(&sstr[slen], "-%.2d", itm->sat_data[l].azimut);
+            if ( bmask & (1<<SNR) ) 
+               slen += sprintf(&sstr[slen], "-%.2d", itm->sat_data[l].snr);
+         
+            gbfprintf(csvFile, "%s%s" , do_sc?";":"", sstr);
+            do_sc = 1;   
+         }
+      }
+      gbfprintf(csvFile, ",");
+   }
+
+   if ( bmask & (1<<DISTANCE) )
+      gbfprintf(csvFile, "%10.2f m,", itm->distance);
+   
+   gbfprintf(csvFile, "\n");
+   return 0;
+}
+
+
+/********************* MTK Logger -- Parse functions *********************/
+int mtk_parse(unsigned char *data, int dataLen, unsigned int bmask){
+   static int count = 0;
+   int i, k, sat_id;
+   unsigned char crc;
+   struct data_item itm;
+
+   memset(&itm, 0, sizeof(itm));    
+   i = 0;
+   crc = 0;
+   for (k=0;k<32;k++){
+      switch ( ((1<<k) & bmask) ){
+         case 1<<UTC:
+            itm.timestamp = le_read32(data + i);
+            break;
+         case 1<<VALID:
+            itm.valid = le_read16(data + i);
+            break;
+         case 1<<LATITUDE: 
+            itm.lat = endian_read_double(data + i, 1 /* le */);
+            break;
+        case 1<<LONGITUDE: 
+            itm.lon = endian_read_double(data + i, 1 /* le */);
+            break;
+         case 1<<HEIGHT:
+            itm.height = endian_read_float(data + i, 1 /* le */);
+            break;
+         case 1<<SPEED: 
+            itm.speed = endian_read_float(data + i, 1 /* le */);
+            break;
+         case 1<<HEADING: 
+            itm.heading = endian_read_float(data + i, 1 /* le */);
+            break;
+         case 1<<DSTA: 
+            itm.dsta = le_read16(data + i);
+            break;
+         case 1<<DAGE:  // ?? fixme - is this a float ?
+            itm.dage = endian_read_float(data + i, 1 /* le */);
+            break;
+         case 1<<PDOP: 
+            itm.pdop = le_read16(data + i) / 100.;
+            break;
+         case 1<<HDOP:
+            itm.hdop = le_read16(data + i) / 100.;
+            break;
+         case 1<<VDOP:
+            itm.vdop = le_read16(data + i) / 100.;
+            break;
+         case 1<<NSAT:
+            itm.sat_view = data[i];
+            itm.sat_used = data[i+1];
+            break;
+         case 1<<SID:
+            {
+               int dLeft, l, sat_count, sid_size, sat_idx;
+               
+               // calculate data length after SID fields
+               dLeft = 0;
+               for (l = SNR; l <= DISTANCE; l++) {
+                  if (bmask && (1 << l))
+                    dLeft += log_type[l].size;
+               }
+               sat_count = 0;
+               if ( dLeft > 0 )
+                  sat_count = le_read16(data + i + 2);
+               if ( sat_count > 32 )
+                  sat_count = 32; // this can't happen ? or...
+              
+               sid_size = log_type[SID].size;
+               if ( bmask & (1<<ELEVATION) )
+                   sid_size += log_type[ELEVATION].size;
+                if ( bmask & (1<<AZIMUTH) )
+                   sid_size += log_type[AZIMUTH].size;
+                if ( bmask & (1<<SNR) )
+                   sid_size += log_type[SNR].size;
+
+               l = 0;
+               sat_idx = 0;
+               while ( sat_count > 0 ){
+                  sat_id = data[i];
+                  itm.sat_data[sat_idx].id   = sat_id;
+                  itm.sat_data[sat_idx].used = data[i + 1];
+                  // get_word(&data[i+2], &smask); // assume - nr of satellites...
+
+                  if ( bmask & (1<<ELEVATION) )
+                     itm.sat_data[sat_idx].elevation = le_read16(data + i + 4);
+                  if ( bmask & (1<<AZIMUTH) )
+                     itm.sat_data[sat_idx].azimut = le_read16(data + i + 6);
+                  if ( bmask & (1<<SNR) )
+                     itm.sat_data[sat_idx].snr    = le_read16(data + i + 8);
+
+                  sat_idx++;
+                  // duplicated checksum and length calculations...for simplicity...
+                  for (l = 0; l < sid_size; l++)
+                    crc ^= data[i + l];
+                  i += sid_size;
+                  sat_count--;
+               } /* End: while ( sat_count > 0 ) */
+            }
+            continue; // dont do any more checksum calc..
+            break;   
+         case 1<<ELEVATION:
+         case 1<<AZIMUTH:
+         case 1<<SNR:
+            // handled in SID
+            continue; // avoid checksum calc
+            break;
+         case 1<<RCR:
+            itm.rcr = le_read16(data + i);
+            break;
+         case 1<<MILLISECOND:
+            itm.timestamp_ms = le_read16(data + i);
+            break;
+         case 1<<DISTANCE:         
+            itm.distance = endian_read_double(data + i, 1 /* le */);
+            break;
+      } /* End: switch (bmap) */
+
+      /* update item checksum and length */
+      if ( ((1<<k) & bmask) ){
+         int j;
+         for (j=0;j<log_type[k].size;j++)
+            crc ^= data[i+j];
+         i += log_type[k].size;
+      }
+   } /* for (bmap,...) */
+   
+   if ( data[i] != '*' ) {
+      if ( global_opts.debug_level > 0 ) {
+         int j;
+         printf("Missing '*' !\n");
+         for(j=0;j<dataLen;j++)
+            printf("%.2x ", data[j]);
+         printf("\n");
+      }
+      if ( data[0] == 0xaa && data[1] == 0xaa && data[2] == 0xaa && data[3] == 0xaa ){
+         printf(" --- Log restart ?? skip 16 bytes ---\n");
+         return 16;
+      }
+   }
+
+   i++; // skip '*' separator
+   if ( data[i] != crc ){
+      printf("%2d: Bad CRC %.2x != %.2x\n", count, data[i], crc);
+   }
+   i++; // crc         
+   count++;
+
+   if ( cd != NULL )
+      csv_line(cd, count, bmask, &itm);
+
+   add_trackpoint(count, bmask, &itm);
+
+   return i;
+}
+
+/* 
+  Description: Parse an info block 
+  Globals: bmask - may be affected if updated.
+ */
+static int mtk_parse_info(const unsigned char *data, int dataLen){
+   unsigned short cmd;
+   unsigned int bm;
+   if ( dataLen >= 16 
+        && memcmp(&data[0], &LOG_RST[0], 6) == 0 
+        && memcmp(&data[12], &LOG_RST[12], 4) == 0 )
+   {
+
+      cmd = le_read16(data + 8);
+      switch ( data[7] ){
+         case 0x02:
+            bm = le_read32(data + 8);
+            dbg(1, "# Log bitmask is: %.8x\n", bm);
+            if ( bmask != bm )
+               dbg(1," ########## Bitmask Change   %.8x -> %.8x ###########\n", bmask, bm);
+            bmask = bm;
+            break;
+         case 0x03:
+            dbg(1, "# Log period change %.0f sec\n", cmd/10.);
+            mlog_period = cmd;
+            break;
+         case 0x04:
+            dbg(1, "# Log distance change %.1f m\n", cmd/10.);
+            mlog_distance = cmd;
+            break;
+         case 0x05:
+            dbg(1, "# Log speed change %.1f km/h\n", cmd/10.);
+            mlog_speed  = cmd;
+            break;
+         case 0x06:
+            dbg(1, "# Log policy change 0x%.4x\n", cmd);
+            if  ( cmd == 0x01 ) 
+               dbg(1, "# Log policy change to OVERWRITE\n");
+            if  ( cmd == 0x02 ) 
+               dbg(1, "# Log policy change to STOP\n");
+            break;
+         case 0x07:
+            if ( cmd == 0x0106 )
+              dbg(5, "# GPS Logger# Turned On\n"); // Fixme - start new trk
+            if ( cmd == 0x0104 )
+              dbg(5, "# GPS Logger# Log disabled\n");
+            break;
+         default:
+            dbg(1, "## Unknown INFO 0x%.2x\n", data[7]);
+            break;   
+      }
+   } else {
+      if ( global_opts.debug_level > 0 ){
+        printf("#!! Invalid INFO block !! %d bytes\n >> ", dataLen);
+        for (bm=0;bm<16;bm++) printf("%.2x ", data[bm]);
+        printf("\n");
+      }
+      return 0;
+   }
+   return 16;
+}
+
+/********************** File-in interface ********************************/
+
+static void file_init(const char *fname) {
+    dbg(4, "Opening file %s...\n", fname);
+    if (fl = fopen(fname, "rb"), NULL == fl) {
+        fatal(MYNAME ": Can't open file '%s'\n", fname);
+    }
+}
+
+static void file_deinit(void) {
+    dbg(4, "Closing file...\n");
+    fclose(fl);
+}
+
+
+static void file_read(void) {
+   long fsize, pos;
+   int i, j, k, logLen, bLen;
+   unsigned char buf[512];
+
+   memset(buf, '\0', sizeof(buf));
+
+   /* Get size of file to  parse */
+   fseek(fl, 0L, SEEK_END);
+   fsize = ftell(fl);
+   if ( fsize <= 0 )
+       fatal(MYNAME ": File has size %ld\n", fsize);   
+
+   fseek(fl, 0L, SEEK_SET);  
+
+   /* Header: 20 bytes
+       47 05 | 7f 1e 0e 00 |  04 01 | 32 00 00 00 e8 03 00 00 00 00 00 00  
+       
+       u16: Log count 'this 64kByte block' - ffff if not complete.  
+       u32: Bitmask for logging. (default mask)
+       u16; ?? ??  Overwrite/Stop policy
+       u32:  log period, sec*10
+       u32:  log distance , meters*10
+       u32:  log speed , km/h*10
+    */
+      
+   bLen = 0;
+   j = 0;
+   pos = 0;
+
+   /* get default bitmask, log period/speed/distance */
+   bLen = fread(buf, 1, 20, fl);
+   if ( bLen == 20 ){
+      unsigned int mask, log_period, log_distance, log_speed;
+       
+      mask = le_read32(buf + 2);
+      // log_policy   = le_read16(buf + 6);
+      log_period   = le_read32(buf + 8);
+      log_distance = le_read32(buf + 12);
+      log_speed    = le_read32(buf + 16);
+
+      dbg(1, "Default Bitmask %.8x, Log every %.0f sec, %.0f m, %.0f km/h\n", 
+          mask, log_period/10., log_distance/10., log_speed/10.);
+      bmask = mask;
+      dbg(3, "Using initial bitmask %.8x for parsing the .bin file\n", bmask); 
+
+      mlog_period = log_period;
+      mlog_distance = log_distance;
+      mlog_speed  = log_speed;
+   }
+
+   pos = 0x200; // skip header...first data position 
+   fseek(fl, pos, SEEK_SET);  
+   
+   /* read initial info blocks -- if any */   
+   do {
+      bLen = fread(buf, 1, 16, fl);
+      j = 0;
+      if ( buf[0] == 0xaa ){ // pre-validate to avoid error...
+        j = mtk_parse_info(buf, bLen);
+        pos += j;
+      }   
+   } while ( j == 16 );
+   j = bLen;
+   pos += j;
+
+   /* calculate the length of a binary log item. */
+   logLen = 2; // add '*' + crc
+   for (i=0;i<32;i++){
+      if ( (1<<i) & bmask ){
+         if ( (i == SID || i == ELEVATION || i == AZIMUTH || i == SNR) && (1<<SID) & bmask )
+            logLen += log_type[i].size*32; // worst case, max sat. count..
+         else
+            logLen += log_type[i].size;
+      }
+   }
+   dbg(3, "Log item size %d bytes\n", logLen);
+   if ( csv_file && *csv_file )
+      mtk_csv_init(csv_file, bmask);
+
+   while ( pos < fsize && (bLen = fread(&buf[j], 1, sizeof(buf)-j, fl)) > 0 ){
+      bLen += j;
+      i = 0;
+      while ( (bLen - i) >= logLen ){
+         k = 0;
+         if ( (bLen - i) >= 16 && memcmp(&buf[i], &LOG_RST[0], 6) == 0 
+              && memcmp(&buf[i+12], &LOG_RST[12], 4) == 0 )
+         {     
+            mtk_parse_info(&buf[i], (bLen-i));
+            k = 16;
+         } else if  ( buf[i] == 0xff && buf[i+1] == 0xff  && buf[i+2] == 0xff && buf[i+3] == 0xff
+               /* && (pos + 2*logLen) & 0xffff) < logLen */)
+         {
+            /* End of 64k block segment -- realign to next data area */
+
+            k = ((pos+logLen+1024)/0x10000) *0x10000 + 0x200; 
+            i = sizeof(buf);
+            if ( k <= pos  ) {
+              k += 0x10000;
+            }
+            dbg(3, "Jump %ld -> %d / 0x%.6x  (fsize %ld)   --- \n", pos, k, k, fsize);
+            if ( k > fsize ){
+              dbg(3, "File parse complete !\n");
+              pos = k;
+              break;
+            } else {
+              fseek(fl, k, SEEK_SET);
+            }
+            pos = k;
+            continue; 
+         } else {
+           k = mtk_parse(&buf[i], logLen, bmask);
+         }
+
+         i += k;
+         pos += k;
+      }
+      memmove(buf, &buf[i], sizeof(buf)-i);
+      j = sizeof(buf)-i;
+   } 
+   mtk_csv_deinit();
+
+}
+
+
+/**************************************************************************/
+// GPS logger will only handle tracks - neither waypoints or tracks...
+
+ff_vecs_t mtk_vecs = {
+       ff_type_serial,
+       { 
+               ff_cap_none     /* waypoints */, 
+               ff_cap_read     /* tracks */, 
+               ff_cap_none     /* routes */
+       },
+       mtk_rd_init,    
+       NULL,   
+       mtk_rd_deinit,  
+       NULL,   
+       mtk_read,
+       NULL,
+       NULL,
+       mtk_sargs,
+       CET_CHARSET_ASCII, 0                    /* ascii is the expected character set */
+                                               /* not fixed, can be changed through command line parameter */
+};
+
+/* used for mtk-bin */
+
+static arglist_t mtk_fargs[] = {
+    { "csv",   &csv_file, "MTK compatible CSV output file",
+        NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+    ARG_TERMINATOR
+};
+
+ff_vecs_t mtk_fvecs = {
+    ff_type_file,
+    { ff_cap_none, ff_cap_read, ff_cap_none },
+    file_init,
+    NULL,
+    file_deinit,
+    NULL,
+    file_read,
+    NULL,
+    NULL, 
+    mtk_fargs,
+    CET_CHARSET_UTF8, 1         /* master process: don't convert anything | CET-REVIEW */
+};
+/* End file: mtk_logger.c */
+/**************************************************************************/
diff --git a/navilink.c b/navilink.c
new file mode 100644 (file)
index 0000000..a35ae8d
--- /dev/null
@@ -0,0 +1,970 @@
+/*
+    NaviGPS serial protocol.
+
+    Copyright (C) 2007 Tom Hughes, tom@compton.nu
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+ */
+
+
+/* Based on description at http://wiki.splitbrain.org/navilink */
+#include "defs.h"
+#include "gbser.h"
+#include "jeeps/gpsmath.h"
+
+#define MYNAME "NAVILINK"
+
+static char *nuketrk = NULL;
+static char *nukerte = NULL;
+static char *nukewpt = NULL;
+static char *poweroff = NULL;
+
+static void *serial_handle = NULL;
+static gbfile *file_handle = NULL;
+
+static unsigned char *track_data;
+static unsigned char *track_data_ptr;
+static unsigned char *track_data_end;
+static unsigned track_serial;
+static waypoint **route_waypts;
+static unsigned *route_ids;
+static unsigned route_id_ptr;
+
+#define SERIAL_TIMEOUT 8000
+
+#define MAX_WAYPOINTS         1000
+#define MAX_SUBROUTES         9
+#define MAX_SUBROUTE_LENGTH   14
+#define MAX_ROUTE_LENGTH      (MAX_SUBROUTES * MAX_SUBROUTE_LENGTH - 1)
+#define MAX_READ_TRACKPOINTS  512
+#define MAX_WRITE_TRACKPOINTS 127
+
+#define PID_SYNC              0xd6
+#define PID_ACK               0x0c
+#define PID_NAK               0x00
+#define PID_QRY_INFORMATION   0x20
+#define PID_QRY_FW_VERSION    0xfe
+#define PID_DATA              0x03
+#define PID_ADD_A_WAYPOINT    0x3c
+#define PID_QRY_WAYPOINTS     0x28
+#define PID_QRY_ROUTE         0x24
+#define PID_DEL_WAYPOINT      0x36
+#define PID_DEL_ALL_WAYPOINT  0x37
+#define PID_DEL_ROUTE         0x34
+#define PID_DEL_ALL_ROUTE     0x35
+#define PID_ADD_A_ROUTE       0x3d
+#define PID_ERASE_TRACK       0x11
+#define PID_READ_TRACKPOINTS  0x14
+#define PID_WRITE_TRACKPOINTS 0x16
+#define PID_CMD_OK            0xf3
+#define PID_CMD_FAIL          0xf4
+#define PID_QUIT              0xf2
+
+static
+const char *const icon_table[] = {
+       "Star",
+       "Flag",
+       "House",
+       "Left Sign",
+       "Telegraph Pole",
+       "People",
+       "Fuel",
+       "Phone",
+       "Pole",
+       "Mountain",
+       "Water",
+       "Tree",
+       "Road Narrows",
+       "Crossroads",
+       "Road Fork",
+       "Turn Right",
+       "Turn Left",
+       "Bird",
+       "3D House",
+       "Trig Point",
+       "Tower",
+       "Cable Car",
+       "Church",
+       "Telegraph Pole",
+       "Skier",
+       "Anchor",
+       "Fish",
+       "Fishes",
+       "Rain",
+       "Fisherman",
+       "Tower",
+       "Boats",
+       "Boat",
+       "Bicycle",
+       "Railway Track",
+       "Dollar Sign",
+       "Bus",
+       "Camera",
+       "Fuel Pump",
+       "Cup",
+       "Merging Road",
+       "Plane",
+       "Red Cross",
+       "House",
+       "Parking"
+};
+
+static
+arglist_t navilink_args[] = {
+       { "nuketrk", &nuketrk, "Delete all track points", NULL, ARGTYPE_BOOL,
+               ARG_NOMINMAX },
+       { "nukerte", &nukerte, "Delete all routes", NULL, ARGTYPE_BOOL,
+               ARG_NOMINMAX },
+       { "nukewpt", &nukewpt, "Delete all waypoints", NULL, ARGTYPE_BOOL,
+               ARG_NOMINMAX },
+       { "power_off", &poweroff, "Command unit to power itself down",
+               NULL, ARGTYPE_BOOL, ARG_NOMINMAX },
+       ARG_TERMINATOR
+};
+
+static void (*write_waypoint)(const waypoint *) = NULL;
+static void (*write_track_start)(const route_head *track) = NULL;
+static void (*write_track_point)(const waypoint *waypt) = NULL;
+static void (*write_track_end)(const route_head *track) = NULL;
+static void (*write_route_start)(const route_head *track) = NULL;
+static void (*write_route_point)(const waypoint *waypt) = NULL;
+static void (*write_route_end)(const route_head *track) = NULL;
+
+static int
+find_icon_from_descr(const char *descr)
+{
+       int i;
+
+       for (i = 0; i < sizeof(icon_table) / sizeof(const char *); i++) {
+               if (strcmp(descr, icon_table[i]) == 0)
+                       return i;
+       }
+
+       return 0;
+}
+
+static void
+free_waypoints(waypoint **waypts)
+{
+       waypoint **wayptp;
+
+       for (wayptp = waypts; wayptp < waypts + MAX_WAYPOINTS; wayptp++) {
+               if (*wayptp) {
+                       waypt_free(*wayptp);
+               }
+       }
+
+       xfree(waypts);
+}
+
+static unsigned
+compare_waypoints(const waypoint *waypt1, const waypoint *waypt2)
+{
+       return waypt1->latitude == waypt2->latitude &&
+               waypt1->longitude == waypt2->longitude &&
+               waypt1->altitude == waypt2->altitude &&
+               strcmp(waypt1->shortname, waypt2->shortname) == 0;
+}
+
+static unsigned
+checksum_packet(const unsigned char *packet, unsigned length)
+{
+       unsigned checksum = 0;
+
+       while (length-- > 0) {
+               checksum += *packet++;
+       }
+
+       return checksum & 0x7fff;
+}
+
+#ifdef NAVILINK_DEBUG
+
+static void
+dump_packet(char *prefix, unsigned char *packet, unsigned length)
+{
+       unsigned i;
+
+       for (i = 0; i < length; i++ ) {
+               if ((i % 16) == 0) fprintf(stderr, "%s %08x :", prefix, i);
+               fprintf(stderr, " %02x", packet[i]);
+               if ((i % 16) == 15 || i == length - 1) fprintf(stderr, "\n");
+       }
+
+       fprintf(stderr, "\n");
+}
+
+#endif
+
+static void
+write_packet(unsigned type, const void *payload, unsigned length)
+{
+       unsigned char *packet = xmalloc(length + 9);
+
+       packet[0] = 0xa0;
+       packet[1] = 0xa2;
+       le_write16(packet + 2, length + 1);
+       packet[4] = type;
+       memcpy(packet + 5, payload, length);
+       le_write16(packet + length + 5, checksum_packet(packet + 4, length + 1));
+       packet[length + 7] = 0xb0;
+       packet[length + 8] = 0xb3;
+
+#ifdef NAVILINK_DEBUG
+       dump_packet(">>>", packet + 4, length + 1);
+#endif
+
+       if (gbser_write(serial_handle, packet, length + 9) != gbser_OK) {
+               fatal(MYNAME ": Write error\n");
+       }
+
+       xfree(packet);
+}
+
+static unsigned
+read_word(void)
+{
+       unsigned char buffer[2];
+
+       if (gbser_read_wait(serial_handle, buffer, 2, SERIAL_TIMEOUT) != 2) {
+               fatal(MYNAME ": Read error\n");
+       }
+
+       return (buffer[1] << 8) | buffer[0];
+}
+
+static void
+read_packet(unsigned type, void *payload, unsigned minlength, unsigned maxlength)
+{
+       unsigned      size;
+       unsigned char *data;
+       unsigned      checksum;
+
+       if (read_word() != 0xa2a0) {
+               fatal(MYNAME ": Protocol error: Bad packet header\n");
+       }
+
+       if ((size = read_word()) <= minlength) {
+               fatal(MYNAME ": Protocol error: Packet too short\n");
+       }
+
+       data = xmalloc(size);
+
+       if (gbser_read_wait(serial_handle, data, size, SERIAL_TIMEOUT) != size) {
+               fatal(MYNAME ": Read error reading %d byte payload\n", size);
+       }
+
+#ifdef NAVILINK_DEBUG
+       dump_packet("<<<", data, size);
+#endif
+
+       if (data[0] != type) {
+               fatal(MYNAME ": Protocol error: Bad packet type (expected 0x%02x but got 0x%02x)\n", type, data[0]);
+       }
+
+       if ((checksum = read_word()) != checksum_packet(data, size)) {
+               fatal(MYNAME ": Checksum error - expected %x got %x\n", checksum_packet(data, size), checksum);
+       }
+
+       if (read_word() != 0xb3b0) {
+               fatal(MYNAME ": Protocol error: Bad packet trailer\n");
+       }
+
+       if (size - 1 > maxlength) {
+               memcpy(payload, data + 1, maxlength);
+       } else {
+               memcpy(payload, data + 1, size - 1);
+       }
+
+       xfree(data);
+
+       return;
+}
+
+static time_t
+decode_datetime(const unsigned char *buffer)
+{
+       struct tm tm;
+
+       tm.tm_sec = buffer[5];
+       tm.tm_min = buffer[4];
+       tm.tm_hour = buffer[3];
+       tm.tm_mday = buffer[2];
+       tm.tm_mon = buffer[1] - 1;
+       tm.tm_year = buffer[0] + 100;
+
+       return mkgmtime(&tm);
+}
+
+static void
+encode_datetime(time_t datetime, unsigned char *buffer)
+{
+       struct tm *tm;
+
+       if ((tm = gmtime(&datetime)) != NULL) {
+               buffer[0] = tm->tm_year - 100;
+               buffer[1] = tm->tm_mon + 1;
+               buffer[2] = tm->tm_mday;
+               buffer[3] = tm->tm_hour;
+               buffer[4] = tm->tm_min;
+               buffer[5] = tm->tm_sec;
+       } else {
+               memset(buffer, 0, 6);
+       }
+}
+
+static void
+decode_position(const unsigned char *buffer, waypoint *waypt)
+{
+       waypt->latitude = le_read32(buffer + 0) / 10000000.0;
+       waypt->longitude = le_read32(buffer + 4) / 10000000.0;
+       waypt->altitude = FEET_TO_METERS(le_read16(buffer + 8));
+}
+
+static void
+encode_position(const waypoint *waypt, unsigned char *buffer)
+{
+       le_write32(buffer + 0, (int) (waypt->latitude * 10000000));
+       le_write32(buffer + 4, (int) (waypt->longitude * 10000000));
+       le_write16(buffer + 8, METERS_TO_FEET(waypt->altitude));
+}
+
+static unsigned
+decode_waypoint_id(const unsigned char *buffer)
+{
+       unsigned id = le_read16(buffer + 2);
+
+       if (id >= MAX_WAYPOINTS) {
+               fatal(MYNAME ": Invalid waypoint ID\n");
+       }
+
+       return id;
+}
+
+static waypoint *
+decode_waypoint(const unsigned char *buffer)
+{
+       waypoint *waypt = waypt_new();
+
+       decode_position(buffer + 12, waypt);
+       waypt->shortname = xstrdup((char *)buffer + 4);
+       waypt->icon_descr = icon_table[buffer[28]];
+       waypt->creation_time = decode_datetime(buffer + 22);
+
+       return waypt;
+}
+
+static void
+encode_waypoint(const waypoint *waypt, unsigned char *buffer)
+{
+       buffer[0] = 0x00;
+       buffer[1] = 0x40;
+       le_write16(buffer + 2, 0);
+       strncpy((char *)buffer + 4, waypt->shortname, 6);
+       buffer[10] = 0;
+       buffer[11] = 0;
+       encode_position(waypt, buffer + 12);
+       encode_datetime(waypt->creation_time, buffer + 22);
+       buffer[28] = find_icon_from_descr(waypt->icon_descr);
+       buffer[29] = 0;
+       buffer[30] = 0x00;
+       buffer[31] = 0x7e;
+}
+
+static waypoint *
+decode_trackpoint(const unsigned char *buffer)
+{
+       waypoint *waypt = waypt_new();
+
+       decode_position(buffer + 12, waypt);
+       waypt->creation_time = decode_datetime(buffer + 22);
+       WAYPT_SET(waypt, course, le_read16(buffer + 2));
+       WAYPT_SET(waypt, speed, KPH_TO_MPS(buffer[29] * 2));
+
+       return waypt;
+}
+
+static void
+encode_trackpoint(const waypoint *waypt, unsigned serial, unsigned char *buffer)
+{
+       double x;
+       double y;
+       int32  z;
+       char   zc;
+
+       GPS_Math_WGS84_To_UTM_EN(waypt->latitude, waypt->longitude, &x, &y, &z, &zc);
+
+       le_write16(buffer + 0, serial);
+       le_write16(buffer + 2, WAYPT_GET(waypt, course, 0));
+       le_write32(buffer + 4, x);
+       le_write32(buffer + 8, y);
+       encode_position(waypt, buffer + 12);
+       encode_datetime(waypt->creation_time, buffer + 22);
+       buffer[28] = z;
+       buffer[29] = MPS_TO_KPH(WAYPT_GET(waypt, speed, 0) / 2);
+       buffer[30] = 0x5a;
+       buffer[31] = 0x7e;
+}
+
+static waypoint **
+serial_read_waypoints(void)
+{
+       waypoint       **waypts = NULL;
+       unsigned char  information[32];
+       unsigned short total;
+       unsigned short start;
+
+       if (global_opts.masked_objective & RTEDATAMASK) {
+               waypts = xcalloc(MAX_WAYPOINTS, sizeof(waypoint *));
+       }
+
+       write_packet(PID_QRY_INFORMATION, NULL, 0);
+       read_packet(PID_DATA, information, sizeof(information), sizeof(information));
+
+       total = le_read16(information + 0);
+
+       for (start = 0; start < total; start += 32) {
+               unsigned short count = total - start;
+               unsigned char  payload[7];
+               unsigned char  *waypoints;
+               unsigned char  *w;
+
+               if (count > 32) count = 32;
+
+               le_write32(payload + 0, start);
+               le_write16(payload + 4, count);
+               payload[6] = 1;
+
+               write_packet(PID_QRY_WAYPOINTS, payload, sizeof(payload));
+
+               waypoints = xmalloc(count * 32);
+
+               read_packet(PID_DATA, waypoints, count * 32, count * 32);
+
+               for (w = waypoints; w < waypoints + count * 32; w = w + 32) {
+                       if (global_opts.masked_objective & WPTDATAMASK) {
+                               waypt_add(decode_waypoint(w));
+                       }
+                       if (global_opts.masked_objective & RTEDATAMASK) {
+                               waypts[decode_waypoint_id(w)] = decode_waypoint(w);
+                       }
+               }
+
+               xfree(waypoints);
+
+               if (global_opts.verbose_status) {
+                       waypt_status_disp(total, start + count);
+               }
+       }
+
+       return waypts;
+}
+
+static void
+serial_write_waypoint(const waypoint *waypt)
+{
+       unsigned char data[32];
+       unsigned char id[2];
+
+       encode_waypoint(waypt, data);
+       write_packet(PID_ADD_A_WAYPOINT, data, sizeof(data));
+       read_packet(PID_DATA, id, sizeof(id), sizeof(id));
+}
+
+static void
+serial_read_track(void)
+{
+       unsigned char  information[32];
+       unsigned int   address;
+       unsigned short total;
+       route_head     *track;
+
+       write_packet(PID_QRY_INFORMATION, NULL, 0);
+       read_packet(PID_DATA, information, sizeof(information), sizeof(information));
+
+       address = le_read32(information + 4);
+       total = le_read16(information + 12);
+
+       track = route_head_alloc();
+       track_add_head(track);
+
+       while (total > 0) {
+               unsigned short count = total < MAX_READ_TRACKPOINTS ? total : MAX_READ_TRACKPOINTS;
+               unsigned char  payload[7];
+               unsigned char  *trackpoints;
+               unsigned char  *t;
+
+               le_write32(payload + 0, address);
+               le_write16(payload + 4, count * 32);
+               payload[6] = 0x00;
+
+               write_packet(PID_READ_TRACKPOINTS, payload, sizeof(payload));
+
+               trackpoints = xmalloc(count * 32);
+
+               read_packet(PID_DATA, trackpoints, count * 32, count * 32);
+               write_packet(PID_ACK, NULL, 0);
+
+               for (t = trackpoints; t < trackpoints + count * 32; t = t + 32) {
+                       track_add_wpt(track, decode_trackpoint(t));
+               }
+
+               xfree(trackpoints);
+
+               address = address + count * 32;
+               total = total - count;
+       }
+}
+
+static void
+serial_write_track(void)
+{
+       unsigned char  information[32];
+       unsigned int   address;
+       unsigned short total;
+       unsigned char  data[7];
+
+       write_packet(PID_QRY_INFORMATION, NULL, 0);
+       read_packet(PID_DATA, information, sizeof(information), sizeof(information));
+
+       address = le_read32(information + 4);
+       total = le_read16(information + 12);
+
+       le_write32(data + 0, address + total * 32);
+       le_write16(data + 4, track_data_ptr - track_data);
+       data[6] = 0x00;
+
+       write_packet(PID_WRITE_TRACKPOINTS, data, sizeof(data));
+       gb_sleep(10000);
+       write_packet(PID_DATA, track_data, track_data_ptr - track_data);
+       read_packet(PID_CMD_OK, NULL, 0, 0);
+
+       track_data_ptr = track_data;
+}
+
+static void
+serial_write_track_start(const route_head *track)
+{
+       track_data = xmalloc(MAX_WRITE_TRACKPOINTS * 32);
+       track_data_ptr = track_data;
+       track_data_end = track_data + MAX_WRITE_TRACKPOINTS * 32;
+}
+
+static void
+serial_write_track_point(const waypoint *waypt)
+{
+       if (track_data_ptr >= track_data_end) {
+               serial_write_track();
+       }
+
+       encode_trackpoint(waypt, 0, track_data_ptr);
+
+       track_data_ptr += 32;
+}
+
+static void
+serial_write_track_end(const route_head *track)
+{
+       if (track_data_ptr > track_data) {
+               serial_write_track();
+       }
+
+       xfree(track_data);
+}
+
+static void
+serial_read_routes(waypoint **waypts)
+{
+       unsigned char information[32];
+       unsigned char routec;
+       unsigned char r;
+
+       write_packet(PID_QRY_INFORMATION, NULL, 0);
+       read_packet(PID_DATA, information, sizeof(information), sizeof(information));
+
+       routec = information[2];
+
+       for (r = 0; r < routec; r++) {
+               unsigned char payload[7];
+               unsigned char routedata[320];
+               route_head    *route;
+               int           sr;
+
+               le_write32(payload + 0, r);
+               le_write16(payload + 2, 0);
+               payload[6] = 0x01;
+
+               write_packet(PID_QRY_ROUTE, payload, sizeof(payload));
+               read_packet(PID_DATA, routedata, 64, sizeof(routedata));
+
+               route = route_head_alloc();
+               route->rte_num = routedata[2];
+               route->rte_name = xstrdup((char *)routedata + 4);
+               route_add_head(route);
+
+               for (sr = 0; sr < MAX_SUBROUTES; sr++) {
+                       int w;
+
+                       for (w = 0; w < MAX_SUBROUTE_LENGTH; w++) {
+                               unsigned short id = le_read16(routedata + 34 + 32 * sr + 2 *w);
+
+                               if (id == 0xffffu) {
+                                       w = MAX_SUBROUTE_LENGTH;
+                                       sr = MAX_SUBROUTES;
+                               } else if (id >= MAX_WAYPOINTS) {
+                                       fatal(MYNAME ": Invalid waypoint ID in route\n");
+                               } else if (waypts[id] == NULL) {
+                                       fatal(MYNAME ": Non-existent waypoint in route\n");
+                               } else {
+                                       route_add_wpt(route, waypt_dupe(waypts[id]));
+                               }
+                       }
+               }
+       }
+}
+
+static void
+serial_write_route_start(const route_head *route)
+{
+       route_ids = xmalloc(route->rte_waypt_ct * sizeof(unsigned));
+       route_id_ptr = 0;
+}
+
+static void
+serial_write_route_point(const waypoint *waypt)
+{
+       unsigned w;
+
+       for (w = 0; w < MAX_WAYPOINTS; w++) {
+               if (route_waypts[w] && compare_waypoints(waypt, route_waypts[w])) {
+                       break;
+               }
+       }
+
+       if (w == MAX_WAYPOINTS) {
+               unsigned char data[32];
+               unsigned char id[2];
+
+               encode_waypoint(waypt, data);
+               write_packet(PID_ADD_A_WAYPOINT, data, sizeof(data));
+               read_packet(PID_DATA, id, sizeof(id), sizeof(id));
+
+               w = le_read16(id);
+
+               route_waypts[w] = waypt_dupe(waypt);
+       }
+
+       route_ids[route_id_ptr++] = w;
+}
+
+static void
+serial_write_route_end(const route_head *route)
+{
+       unsigned char *data;
+       unsigned      src;
+       unsigned      sr;
+       unsigned char id[1];
+
+       if (route_id_ptr > MAX_ROUTE_LENGTH) {
+               fatal(MYNAME ": Route %s too long\n", route->rte_name);
+       }
+
+       src = (route_id_ptr + MAX_SUBROUTE_LENGTH) / MAX_SUBROUTE_LENGTH;
+       data = xmalloc(32 + src * 32);
+
+       le_write16(data + 0, 0x2000);
+       data[2] = 0;
+       data[3] = 0x20;
+       strncpy((char *)data + 4, route->rte_name, 6);
+       data[18] = 0;
+       data[19] = 0;
+       le_write32(data + 20, 0);
+       le_write32(data + 24, 0);
+       le_write16(data + 28, 0);
+       data[30] = 0x7b;
+       data[31] = 0x77;
+
+       for (sr = 0; sr < src; sr++) {
+               unsigned char *srdata = data + 32 + 32 * sr;
+               unsigned      pt_offset = MAX_SUBROUTE_LENGTH * sr;
+               unsigned      pt;
+
+               le_write16(srdata + 0, 0x2010);
+
+               for (pt = 0; pt < MAX_SUBROUTE_LENGTH; pt++) {
+                       if (pt_offset + pt < route_id_ptr) {
+                               le_write16(srdata + 2 + 2 * pt, route_ids[pt_offset + pt]);
+                       } else {
+                               le_write16(srdata + 2 + 2 * pt, 0xffffu);
+                       }
+               }
+
+               srdata[30] = 0x7f;
+               srdata[31] = 0x77;
+       }
+
+       write_packet(PID_ADD_A_ROUTE, data, 32 + src * 32);
+       read_packet(PID_DATA, id, sizeof(id), sizeof(id));
+
+       xfree(data);
+       xfree(route_ids);
+}
+
+static void
+file_read(void)
+{
+       unsigned char data[32];
+       route_head    *track = NULL;
+
+       while (gbfread(data, sizeof(data), 1, file_handle) == 1) {
+               switch (le_read16(data)) {
+               case 0x2000:
+                       fatal(MYNAME ": Route objects not supported in file sources\n");
+                       break;
+               case 0x2010:
+                       fatal(MYNAME ": Subroute objects not supported in file sources\n");
+                       break;
+               case 0x4000:
+                       if (global_opts.masked_objective & WPTDATAMASK) {
+                               waypt_add(decode_waypoint(data));
+                       }
+                       break;
+               default:
+                       if (global_opts.masked_objective & TRKDATAMASK) {
+                               if (track == NULL) {
+                                       track = route_head_alloc();
+                                       track_add_head(track);
+                               }
+
+                               track_add_wpt(track, decode_trackpoint(data));
+                       }
+                       break;
+               }
+       }
+}
+
+static void
+file_write_waypoint(const waypoint *waypt)
+{
+       unsigned char data[32];
+
+       encode_waypoint(waypt, data);
+       gbfwrite(data, sizeof(data), 1, file_handle);
+}
+
+static void
+file_write_track_start(const route_head *track)
+{
+       track_serial = 1;
+}
+
+static void
+file_write_track_point(const waypoint *waypt)
+{
+       unsigned char data[32];
+
+       encode_trackpoint(waypt, track_serial++, data);
+       gbfwrite(data, sizeof(data), 1, file_handle);
+}
+
+static void
+file_write_track_end(const route_head *track)
+{
+}
+
+static void
+file_write_route_start(const route_head *track)
+{
+       fatal(MYNAME ": Can't write routes to a file\n");
+}
+
+static void
+file_write_route_point(const waypoint *waypt)
+{
+}
+
+static void
+file_write_route_end(const route_head *track)
+{
+}
+
+static void
+navilink_common_init(const char *name, const char *mode)
+{
+       if (gbser_is_serial(name)) {
+               if ((serial_handle = gbser_init(name)) == NULL) {
+                       fatal(MYNAME ": Could not open serial port %s\n", name);
+               }
+
+               if (gbser_set_port(serial_handle, 115200, 8, 0, 1) != gbser_OK) {
+                       fatal(MYNAME ": Can't configure port\n");
+               }
+
+               write_packet(PID_SYNC, NULL, 0);
+               read_packet(PID_ACK, NULL, 0, 0);
+
+               if (nuketrk) {
+                       unsigned char information[32];
+                       unsigned char data[7];
+
+                       write_packet(PID_QRY_INFORMATION, NULL, 0);
+                       read_packet(PID_DATA, information, sizeof(information), sizeof(information));
+
+                       le_write32(data + 0, le_read32(information + 4));
+                       le_write16(data + 4, 0);
+                       data[6] = 0;
+
+                       write_packet(PID_ERASE_TRACK, data, sizeof(data));
+                       read_packet(PID_CMD_OK, NULL, 0, 0);
+               }
+
+               if (nukerte) {
+                       unsigned char data[4];
+
+                       le_write32(data, 0x00f00000);
+                       write_packet(PID_DEL_ALL_ROUTE, data, sizeof(data));
+                       read_packet(PID_CMD_OK, NULL, 0, 0);
+               }
+
+               if (nukewpt) {
+                       unsigned char data[4];
+
+                       le_write32(data, 0x00f00000);
+                       write_packet(PID_DEL_ALL_WAYPOINT, data, sizeof(data));
+                       read_packet(PID_ACK, NULL, 0, 0);
+               }
+
+               write_waypoint = serial_write_waypoint;
+               write_track_start = serial_write_track_start;
+               write_track_point = serial_write_track_point;
+               write_track_end = serial_write_track_end;
+               write_route_start = serial_write_route_start;
+               write_route_point = serial_write_route_point;
+               write_route_end = serial_write_route_end;
+       } else {
+               file_handle = gbfopen(name, mode, MYNAME);
+
+               write_waypoint = file_write_waypoint;
+               write_track_start = file_write_track_start;
+               write_track_point = file_write_track_point;
+               write_track_end = file_write_track_end;
+               write_route_start = file_write_route_start;
+               write_route_point = file_write_route_point;
+               write_route_end = file_write_route_end;
+       }
+
+       return;
+}
+
+static void
+navilink_rd_init(const char *name)
+{
+       navilink_common_init(name, "r");
+}
+
+static void
+navilink_wr_init(const char *name)
+{
+       navilink_common_init(name, "w+");
+}
+
+static void
+navilink_deinit(void)
+{
+       if (serial_handle) {
+               if (poweroff) {
+                       write_packet(PID_QUIT, NULL, 0);
+               }
+
+               gbser_deinit(serial_handle);
+       }
+
+       if (file_handle) {
+               gbfclose(file_handle);
+       }
+
+       return;
+}
+
+static void
+navilink_read(void)
+{
+       if (serial_handle) {
+               waypoint **waypts = NULL;
+
+               if (global_opts.masked_objective & (WPTDATAMASK|RTEDATAMASK)) {
+                       waypts = serial_read_waypoints();
+               }
+
+               if (global_opts.masked_objective & TRKDATAMASK) {
+                       serial_read_track();
+               }
+
+               if (global_opts.masked_objective & RTEDATAMASK) {
+                       serial_read_routes(waypts);
+               }
+
+               if (waypts) {
+                       free_waypoints(waypts);
+               }
+       } else if (file_handle) {
+               file_read();
+       }
+}
+
+static void
+navilink_write(void)
+{
+       switch (global_opts.objective)
+       {
+               case trkdata:
+                       track_disp_all(write_track_start,
+                                      write_track_end,
+                                      write_track_point);
+                       break;
+               case wptdata:
+                       waypt_disp_all(write_waypoint);
+                       break;
+               case rtedata:
+                       if (serial_handle) {
+                               route_waypts = serial_read_waypoints();
+                       }
+                       route_disp_all(write_route_start,
+                                      write_route_end,
+                                      write_route_point);
+                       if (route_waypts) {
+                               free_waypoints(route_waypts);
+                               route_waypts = NULL;
+                       }
+                       break;
+               default:
+                       fatal(MYNAME ": Unknown objective.\n");
+       }
+}
+
+ff_vecs_t navilink_vecs = {
+       ff_type_serial,
+       FF_CAP_RW_ALL,
+       navilink_rd_init,
+       navilink_wr_init,
+       navilink_deinit,
+       navilink_deinit,
+       navilink_read,
+       navilink_write,
+       NULL,
+       navilink_args,
+       CET_CHARSET_ASCII, 0    /* CET-REVIEW */
+};
diff --git a/nmea.c b/nmea.c
index ee6878052dc854fffd7596a8f37275bd3beac8d0..5324f7fabc3f5db1ef630da974d95f219c257e74 100644 (file)
--- a/nmea.c
+++ b/nmea.c
@@ -173,6 +173,7 @@ static char *getposnarg;
 static char *opt_sleep;
 static char *opt_baud;
 static char *opt_append;
+static char *opt_gisteq;
 
 static long sleepus;
 static int getposn;
@@ -197,6 +198,7 @@ arglist_t nmea_args[] = {
        {"pause", &opt_sleep, "Decimal seconds to pause between groups of strings", NULL, ARGTYPE_INT, ARG_NOMINMAX },
        {"append_positioning", &opt_append, "Append realtime positioning data to the output file instead of truncating", "0", ARGTYPE_BOOL, ARG_NOMINMAX },
        {"baud", &opt_baud, "Speed in bits per second of serial port (baud=4800)", NULL, ARGTYPE_INT, ARG_NOMINMAX },
+       {"gisteq", &opt_gisteq, "Write tracks for Gisteq Phototracker", "0", ARGTYPE_BOOL, ARG_NOMINMAX },
        ARG_TERMINATOR
 };
 
@@ -232,6 +234,17 @@ nmea_add_wpt(waypoint *wpt, route_head *trk)
        else waypt_add(wpt);
 }
 
+static void
+nmea_release_wpt(waypoint *wpt)
+{
+       if (wpt && ((wpt->Q.next == NULL) || (wpt->Q.next == &wpt->Q))) {
+               /* This waypoint isn't queued.
+                  Release it, because we don't have any reference to this
+                  waypoint (! memory leak !) */
+               waypt_free(wpt);
+       }
+}
+
 static void
 nmea_rd_init(const char *fname)
 {
@@ -315,6 +328,12 @@ nmea_wr_init(const char *portname)
 
        mkshort_handle = mkshort_new_handle();
        setshort_length(mkshort_handle, atoi(snlenopt));
+
+       if (opt_gisteq) {
+               opt_gpgga = NULL;
+               opt_gpvtg = NULL;
+               opt_gpgsa = NULL;
+       }
 }
 
 static  void
@@ -325,23 +344,25 @@ nmea_wr_deinit(void)
 }
 
 static void
-nmea_set_waypoint_time(waypoint *wpt, struct tm *time)
+nmea_set_waypoint_time(waypoint *wpt, struct tm *time, int microseconds)
 {
        if (time->tm_year == 0)
        {
                wpt->creation_time = ((((time_t)time->tm_hour * 60) + time->tm_min) * 60) + time->tm_sec;
-               if (wpt->microseconds == 0)
+               wpt->microseconds = microseconds;
+               if (wpt->wpt_flags.fmt_use == 0)
                {
-                        wpt->microseconds++;
+                        wpt->wpt_flags.fmt_use = 1;
                         without_date++;
                }
        }
        else
        {
                wpt->creation_time = mkgmtime(time);
-               if (wpt->microseconds != 0)
+               wpt->microseconds = microseconds;
+               if (wpt->wpt_flags.fmt_use != 0)
                {
-                       wpt->microseconds = 0;
+                       wpt->wpt_flags.fmt_use = 0;
                        without_date--;
                }
        }
@@ -350,8 +371,9 @@ nmea_set_waypoint_time(waypoint *wpt, struct tm *time)
 static void
 gpgll_parse(char *ibuf)
 {
-       double latdeg, lngdeg;
+       double latdeg, lngdeg, microseconds;
        char lngdir, latdir;
+       double hmsd;
        int hms;
        char valid = 0;
        waypoint *waypt;
@@ -361,14 +383,17 @@ gpgll_parse(char *ibuf)
                track_add_head(trk_head);
        }
 
-       sscanf(ibuf,"$GPGLL,%lf,%c,%lf,%c,%d,%c,",
+       sscanf(ibuf,"$GPGLL,%lf,%c,%lf,%c,%lf,%c,",
                &latdeg,&latdir,
                &lngdeg,&lngdir,
-               &hms,&valid);
+               &hmsd,&valid);
 
        if (valid != 'A')
                return;
 
+       hms = (int) hmsd;
+       microseconds = MILLI_TO_MICRO(1000 * (hmsd - hms));
+
        tm.tm_sec = hms % 100;
        hms = hms / 100;
        tm.tm_min = hms % 100;
@@ -379,7 +404,7 @@ gpgll_parse(char *ibuf)
 
        waypt = waypt_new();
 
-       nmea_set_waypoint_time(waypt, &tm);
+       nmea_set_waypoint_time(waypt, &tm, microseconds);
 
        if (latdir == 'S') latdeg = -latdeg;
        waypt->latitude = ddmm2degrees(latdeg);
@@ -387,9 +412,7 @@ gpgll_parse(char *ibuf)
        if (lngdir == 'W') lngdeg = -lngdeg;
        waypt->longitude = ddmm2degrees(lngdeg);
 
-       if (curr_waypt && (read_mode == rm_serial)) {
-               waypt_free(curr_waypt);
-       }
+       nmea_release_wpt(curr_waypt);
        curr_waypt = waypt;
 }
 
@@ -405,6 +428,7 @@ gpgga_parse(char *ibuf)
        double hdop;
        char altunits;
        waypoint *waypt;
+       double microseconds;
 
        if (trk_head == NULL) {
                trk_head = route_head_alloc();
@@ -426,6 +450,7 @@ gpgga_parse(char *ibuf)
        }
 
        last_read_time = hms;
+       microseconds = MILLI_TO_MICRO(1000 * (hms - (int)hms));
 
        tm.tm_sec = (long) hms % 100;
        hms = hms / 100;
@@ -435,7 +460,7 @@ gpgga_parse(char *ibuf)
 
        waypt  = waypt_new();
 
-       nmea_set_waypoint_time(waypt, &tm);
+       nmea_set_waypoint_time(waypt, &tm, microseconds);
 
        if (latdir == 'S') latdeg = -latdeg;
        waypt->latitude = ddmm2degrees(latdeg);
@@ -464,9 +489,7 @@ gpgga_parse(char *ibuf)
                        break;
        }
 
-       if (curr_waypt && (read_mode == rm_serial)) {
-               waypt_free(curr_waypt);
-       }
+       nmea_release_wpt(curr_waypt);
        curr_waypt = waypt;
 }
 
@@ -480,6 +503,7 @@ gprmc_parse(char *ibuf)
        unsigned int dmy;
        double speed,course;
        waypoint *waypt;
+       double microseconds;
 
        if (trk_head == NULL) {
                trk_head = route_head_alloc();
@@ -497,6 +521,7 @@ gprmc_parse(char *ibuf)
        }
 
        last_read_time = hms;
+       microseconds = MILLI_TO_MICRO(1000 * (hms - (int)hms));
        
        tm.tm_sec = (long) hms % 100;
        hms = hms / 100;
@@ -519,7 +544,7 @@ gprmc_parse(char *ibuf)
                                WAYPT_SET(curr_waypt, course, course);
                        /* The change of date wasn't recorded when 
                         * going from 235959 to 000000. */
-                        nmea_set_waypoint_time(curr_waypt, &tm);
+                        nmea_set_waypoint_time(curr_waypt, &tm, microseconds);
                }
                return;
        }
@@ -530,7 +555,7 @@ gprmc_parse(char *ibuf)
 
        WAYPT_SET(waypt, course, course);
        
-       nmea_set_waypoint_time(waypt, &tm);
+       nmea_set_waypoint_time(waypt, &tm, microseconds);
 
        if (latdir == 'S') latdeg = -latdeg;
        waypt->latitude = ddmm2degrees(latdeg);
@@ -538,9 +563,7 @@ gprmc_parse(char *ibuf)
        if (lngdir == 'W') lngdeg = -lngdeg;
        waypt->longitude = ddmm2degrees(lngdeg);
 
-       if (curr_waypt && (read_mode == rm_serial)) {
-               waypt_free(curr_waypt);
-       }
+       nmea_release_wpt(curr_waypt);
        curr_waypt = waypt;
 }
 
@@ -728,7 +751,7 @@ pcmpt_parse(char *ibuf)
                tm.tm_mon  = dmy % 100 - 1;
                dmy = dmy / 100;
                tm.tm_mday = dmy;
-               nmea_set_waypoint_time(curr_waypt, &tm);
+               nmea_set_waypoint_time(curr_waypt, &tm, 0);
                ENQUEUE_HEAD(&pcmpt_head, &curr_waypt->Q);
        } else {
                queue *elem, *tmp;
@@ -802,11 +825,11 @@ nmea_fix_timestamps(route_head *track)
                {
                        waypoint *wpt = (waypoint *)elem;
                        
-                       if (wpt->microseconds != 0)
+                       if (wpt->wpt_flags.fmt_use != 0)
                        {
                                time_t dt;
                                
-                               wpt->microseconds = 0;          /* reset flag */
+                               wpt->wpt_flags.fmt_use = 0;     /* reset flag */
 
                                dt = (prev / SECONDS_PER_DAY) * SECONDS_PER_DAY;
                                wpt->creation_time += dt;
@@ -1198,8 +1221,8 @@ nmea_trackpt_pr(const waypoint *wpt)
        }
 
        if (opt_gprmc) {
-               snprintf(obuf, sizeof(obuf), "GPRMC,%06d,%c,%08.3f,%c,%09.3f,%c,%.2f,%.2f,%06d,,",
-                               (int) hms,
+               snprintf(obuf, sizeof(obuf), "GPRMC,%010.3f,%c,%08.3f,%c,%09.3f,%c,%.2f,%.2f,%06d,,",
+                               (double) hms + (wpt->microseconds / 1000000.0),
                                fix=='0' ? 'V' : 'A',
                                fabs(lat), lat < 0 ? 'S' : 'N',
                                fabs(lon), lon < 0 ? 'W' : 'E',
@@ -1207,11 +1230,15 @@ nmea_trackpt_pr(const waypoint *wpt)
                                WAYPT_HAS(wpt, course) ? (wpt->course):(0),
                                (int) ymd);
                cksum = nmea_cksum(obuf);
+               /* GISTeq doesn't care about the checksum */
+               if (opt_gisteq) {
+                       gbfprintf(file_out, "---,");
+               }
                gbfprintf(file_out, "$%s*%02X\n", obuf, cksum);
        }
        if (opt_gpgga) {
-               snprintf(obuf, sizeof(obuf), "GPGGA,%06d,%08.3f,%c,%09.3f,%c,%c,%02d,%.1f,%.3f,M,0.0,M,,",
-                               (int) hms,
+               snprintf(obuf, sizeof(obuf), "GPGGA,%010.3f,%08.3f,%c,%09.3f,%c,%c,%02d,%.1f,%.3f,M,0.0,M,,",
+                               (double) hms + (wpt->microseconds / 1000000.0),
                                fabs(lat), lat < 0 ? 'S' : 'N',
                                fabs(lon), lon < 0 ? 'W' : 'E',
                                fix,
diff --git a/osm.c b/osm.c
new file mode 100644 (file)
index 0000000..5c9ad77
--- /dev/null
+++ b/osm.c
@@ -0,0 +1,926 @@
+/* 
+
+       Support for "OpenStreetMap" data files (.xml)
+
+       Copyright (C) 2008 Olaf Klein, o.b.klein@gpsbabel.org
+
+       This program is free software; you can redistribute it and/or modify
+       it under the terms of the GNU General Public License as published by
+       the Free Software Foundation; either version 2 of the License, or
+       (at your option) any later version.
+
+       This program is distributed in the hope that it will be useful,
+       but WITHOUT ANY WARRANTY; without even the implied warranty of
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       GNU General Public License for more details.
+
+       You should have received a copy of the GNU General Public License
+       along with this program; if not, write to the Free Software
+       Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+*/
+
+#include "defs.h"
+#include "avltree.h"
+#include "xmlgeneric.h"
+
+static char *opt_tag, *opt_tagnd;
+
+static arglist_t osm_args[] = 
+{
+       { "tag", &opt_tag,      "Write additional way tag key/value pairs", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+       { "tagnd", &opt_tagnd,  "Write additional node tag key/value pairs", NULL, ARGTYPE_STRING, ARG_NOMINMAX },
+       ARG_TERMINATOR
+};
+
+#define MYNAME "osm"
+
+static avltree_t *waypoints;   /* AVL tree */
+
+static avltree_t *keys = NULL;
+static avltree_t *values = NULL;
+static avltree_t *icons = NULL;
+
+static gbfile *fout;
+static int node_id;
+static route_head *rte;
+static int skip_rte;
+
+#if ! HAVE_LIBEXPAT
+
+void
+osm_rd_init(const char *fname)
+{
+       fatal(MYNAME ": This build excluded \" MYNAME \" support because expat was not installed.\n");
+}
+
+void
+osm_read(void)
+{
+}
+
+#else
+
+static waypoint *wpt;
+static int wpt_loaded, rte_loaded;
+
+static xg_callback     osm_node, osm_node_tag, osm_node_end;
+static xg_callback     osm_way, osm_way_nd, osm_way_tag, osm_way_end;
+
+static 
+xg_tag_mapping osm_map[] = {
+       { osm_node,     cb_start,       "/osm/node" },
+       { osm_node_tag, cb_start,       "/osm/node/tag" },
+       { osm_node_end, cb_end,         "/osm/node" },
+       { osm_way,      cb_start,       "/osm/way" },
+       { osm_way_nd,   cb_start,       "/osm/way/nd" },
+       { osm_way_tag,  cb_start,       "/osm/way/tag" },
+       { osm_way_end,  cb_end,         "/osm/way" },
+       { NULL,         0,              NULL }
+};
+
+static char *osm_features[] = {
+       "- dummy -",    /*  0 */
+       "aeroway",      /*  1 */
+       "amenity",      /*  2 */
+       "building",     /*  3 */
+       "cycleway",     /*  4 */
+       "railway",      /*  5 */
+       "highway",      /*  6 */
+       "historic",     /*  7 */
+       "landuse",      /*  8 */
+       "leisure",      /*  9 */
+       "man_made",     /* 10 */
+       "military",     /* 11 */
+       "natural",      /* 12 */
+       "place",        /* 13 */
+       "power",        /* 14 */
+       "shop",         /* 15 */
+       "sport",        /* 16 */
+       "tourism",      /* 17 */
+       "waterway",     /* 18 */
+       "aerialway",    /* 19 */
+       NULL
+};
+
+typedef struct osm_icon_mapping_s {
+       const int key;
+       const char *value;
+       const char *icon;
+} osm_icon_mapping_t;
+
+
+/* based on <http://wiki.openstreetmap.org/index.php/Map_Features> */
+
+static osm_icon_mapping_t osm_icon_mappings[] = {
+
+       /* cycleway ...*/
+
+       /* highway ...*/
+
+//     { 6, "mini_roundabout",         "?" },
+//     { 6, "stop",                    "?" },
+//     { 6, "traffic_signals",         "?" },
+//     { 6, "crossing",                "?" },
+//     { 6, "gate",                    "?" },
+//     { 6, "stile",                   "?" },
+//     { 6, "cattle_grid",             "?" },
+//     { 6, "toll_booth",              "?" },
+//     { 6, "incline",                 "?" },
+//     { 6, "incline_steep",           "?" },
+//     { 6, "viaduct",                 "?" },
+//     { 6, "motorway_junction",       "?" },
+//     { 6, "services",                "?" },
+//     { 6, "ford",                    "?" },
+//     { 6, "bus_stop",                "?" },
+//     { 6, "turning_circle",          "?" },
+//     { 6, "User Defined",            "?" },
+
+       /* waterway ... */
+
+       { 18, "dock",                   "Dock" },
+//     { 18, "lock_gate",              "?" },
+//     { 18, "turning_point",          "?" },
+//     { 18, "aqueduct",               "?" },
+//     { 18, "boatyard",               "?" },
+//     { 18, "water_point",            "?" },
+//     { 18, "waste_disposal",         "?" },
+//     { 18, "mooring",                "?" },
+//     { 18, "weir",                   "?" },
+//     { 18, "User Defined",           "?" },
+
+       /* railway ... */
+
+//     { 5, "station",                 "?" },
+//     { 5, "halt",                    "?" },
+//     { 5, "tram_stop",               "?" },
+//     { 5, "viaduct",                 "?" },
+       { 5, "crossing",                "Crossing" },
+//     { 5, "level_crossing",          "?" },
+//     { 5, "subway_entrance",         "?" },
+//     { 5, "turntable",               "?" },
+//     { 5, "User Defined",            "?" },
+
+       /* aeroway ... */
+
+       { 1, "aerodrome",               "Airport" },
+       { 1, "terminal",                "Airport" },
+       { 1, "helipad",                 "Heliport" },
+//     { 1, "User Defined",            "?" },
+
+       /* aerialway ... */
+
+//     { 19, "User Defined",           "?" },
+
+       /* power ... */
+
+//     { 14, "tower",                  "?" },
+//     { 14, "sub_station",            "?" },
+//     { 14, "generator",              "?" },
+
+       /* man_made ... */
+
+//     { 10, "works",                  "?" },
+//     { 10, "beacon",                 "?" },
+//     { 10, "survey_point",           "?" },
+//     { 10, "power_wind",             "?" },
+//     { 10, "power_hydro",            "?" },
+//     { 10, "power_fossil",           "?" },
+//     { 10, "power_nuclear",          "?" },
+//     { 10, "tower",                  "?" },
+//     { 10, "water_tower",            "?" },
+//     { 10, "gasometer",              "?" },
+//     { 10, "reservoir_covered",      "?" },
+//     { 10, "lighthouse",             "?" },
+//     { 10, "windmill",               "?" },
+//     { 10, "wastewater_plant",       "?" },
+//     { 10, "crane",                  "?" },
+//     { 10, "User Defined",           "?" },
+
+       /* building ... */
+
+       { 3, "yes",                     "Building" },
+//     { 3, "User Defined",            "?" },
+
+       /* leisure ... */
+
+//     { 9, "sports_centre",           "?" },
+       { 9, "golf_course",             "Golf Course" },
+       { 9, "stadium",                 "Stadium" },
+//     { 9, "track",                   "?" },
+//     { 9, "pitch",                   "?" },
+//     { 9, "water_park",              "?" },
+       { 9, "marina",                  "Marina" },
+//     { 9, "slipway",                 "?" },
+       { 9, "fishing",                 "Fishing Area" },
+//     { 9, "nature_reserve",          "?" },
+       { 9, "park",                    "Park" },
+//     { 9, "playground",              "?" },
+//     { 9, "garden",                  "?" },
+//     { 9, "common",                  "?" },
+//     { 9, "User Defined",            "?" },
+
+       /* amenity ... */
+
+       { 2, "pub",                     "Bar" },
+//     { 2, "biergarten",              "?" },
+       { 2, "nightclub",               "Bar" },
+//     { 2, "cafe",                    "?" },
+       { 2, "restaurant",              "Restaurant" },
+       { 2, "fast_food",               "Fast Food" },
+       { 2, "parking",                 "Parking Area" },
+//     { 2, "bicycle_parking",         "?" },
+//     { 2, "bicycle_rental",          "?" },
+       { 2, "car_rental",              "Car Rental" },
+//     { 2, "car_sharing",             "?" },
+//     { 2, "taxi",                    "?" },
+       { 2, "fuel",                    "Gas Station" },
+       { 2, "telephone",               "Telephone" },
+       { 2, "toilets",                 "Restroom" },
+//     { 2, "recycling",               "?" },
+//     { 2, "public_building",         "?" },
+       { 2, "townhall",                "City Hall" },
+//     { 2, "place_of_worship",        "?" },
+//     { 2, "grave_yard",              "?" },
+       { 2, "post_office",             "Post Office" },
+//     { 2, "post_box",                "?" },
+       { 2, "school",                  "School" },
+//     { 2, "university",              "?" },
+//     { 2, "college",                 "?" },
+       { 2, "pharmacy",                "Pharmacy" },
+       { 2, "hospital",                "Medical Facility" },
+//     { 2, "library",                 "?" },
+       { 2, "police",                  "Police Station" },
+//     { 2, "fire_station",            "?" },
+//     { 2, "bus_station",             "?" },
+//     { 2, "theatre",                 "?" },
+//     { 2, "cinema",                  "?" },
+//     { 2, "arts_centre",             "?" },
+//     { 2, "courthouse",              "?" },
+//     { 2, "prison",                  "?" },
+       { 2, "bank",                    "Bank" },
+//     { 2, "bureau_de_change",        "?" },
+//     { 2, "atm",                     "?" },
+//     { 2, "fountain",                "?" },
+//     { 2, "User Defined",            "?" },
+
+       /* shop ... */
+
+//     { 15, "supermarket",            "?" },
+       { 15, "convenience",            "Convenience Store" },
+//     { 15, "butcher",                "?" },
+//     { 15, "bicycle",                "?" },
+//     { 15, "doityourself",           "?" },
+//     { 15, "dry_cleaning",           "?" },
+//     { 15, "laundry",                "?" },
+//     { 15, "outdoor",                "?" },
+//     { 15, "kiosk",                  "?" },
+//     { 15, "User Defined",           "?" },
+
+       /* tourism ... */
+
+       { 17, "information",            "Information" },
+       { 17, "hotel",                  "Hotel" },
+       { 17, "motel",                  "Lodging" },
+       { 17, "guest_house",            "Lodging" },
+       { 17, "hostel",                 "Lodging" },
+       { 17, "camp_site",              "Campground" },
+       { 17, "caravan_site",           "RV Park" },
+       { 17, "picnic_site",            "Picnic Area" },
+       { 17, "viewpoint",              "Scenic Area" },
+//     { 17, "theme_park",             "?" },
+//     { 17, "attraction",             "?" },
+       { 17, "zoo",                    "Zoo" },
+//     { 17, "artwork",                "?" },
+       { 17, "museum",                 "Museum" },
+//     { 17, "User Defined",           "?" },
+
+       /* historic ... */
+
+//     { 7, "castle",                  "?" },
+//     { 7, "monument",                "?" },
+//     { 7, "memorial",                "?" },
+//     { 7, "archaeological_site",     "?" },
+//     { 7, "ruins",                   "?" },
+//     { 7, "battlefield",             "?" },
+//     { 7, "User Defined",            "?" },
+
+       /* landuse ... */
+
+//     { 8, "farm",                    "?" },
+//     { 8, "quarry",                  "?" },
+//     { 8, "landfill",                "?" },
+//     { 8, "basin",                   "?" },
+//     { 8, "reservoir",               "?" },
+       { 8, "forest",                  "Forest" },
+//     { 8, "allotments",              "?" },
+//     { 8, "residential",             "?" },
+//     { 8, "retail",                  "?" },
+//     { 8, "commercial",              "?" },
+//     { 8, "industrial",              "?" },
+//     { 8, "brownfield",              "?" },
+//     { 8, "greenfield",              "?" },
+//     { 8, "railway",                 "?" },
+//     { 8, "construction",            "?" },
+       { 8, "military",                "Military" },
+       { 8, "cemetery",                "Cemetery" },
+//     { 8, "village_green",           "?" },
+//     { 8, "recreation_ground",       "?" },
+//     { 8, "User Defined",            "?" },
+
+       /* military ... */
+
+//     { 11, "airfield",               "?" },
+//     { 11, "bunker",                 "?" },
+//     { 11, "barracks",               "?" },
+//     { 11, "danger_area",            "?" },
+//     { 11, "range",                  "?" },
+//     { 11, "naval_base",             "?" },
+//     { 11, "User Defined",           "?" },
+
+       /* natural ... */
+
+//     { 12, "spring",                 "?" },
+//     { 12, "peak",                   "?" },
+//     { 12, "glacier",                "?" },
+//     { 12, "volcano",                "?" },
+//     { 12, "cliff",                  "?" },
+//     { 12, "scree",                  "?" },
+//     { 12, "scrub",                  "?" },
+//     { 12, "fell",                   "?" },
+//     { 12, "heath",                  "?" },
+//     { 12, "wood",                   "?" },
+//     { 12, "marsh",                  "?" },
+//     { 12, "water",                  "?" },
+//     { 12, "coastline",              "?" },
+//     { 12, "mud",                    "?" },
+       { 12, "beach",                  "Beach" },
+//     { 12, "bay",                    "?" },
+//     { 12, "land",                   "?" },
+//     { 12, "cave_entrance",          "?" },
+//     { 12, "User Defined",           "?" },
+
+       /* sport ... */
+
+//     { 16, "10pin",                  "?" },
+//     { 16, "athletics",              "?" },
+//     { 16, "australian_football",    "?" },
+//     { 16, "baseball",               "?" },
+//     { 16, "basketball",             "?" },
+//     { 16, "boules",                 "?" },
+//     { 16, "bowls",                  "?" },
+//     { 16, "climbing",               "?" },
+//     { 16, "cricket",                "?" },
+//     { 16, "cricket_nets",           "?" },
+//     { 16, "croquet",                "?" },
+//     { 16, "cycling",                "?" },
+//     { 16, "dog_racing",             "?" },
+//     { 16, "equestrian",             "?" },
+//     { 16, "football",               "?" },
+//     { 16, "golf",                   "?" },
+//     { 16, "gymnastics",             "?" },
+//     { 16, "hockey",                 "?" },
+//     { 16, "horse_racing",           "?" },
+//     { 16, "motor",                  "?" },
+//     { 16, "multi",                  "?" },
+//     { 16, "pelota",                 "?" },
+//     { 16, "racquet",                "?" },
+//     { 16, "rugby",                  "?" },
+//     { 16, "skating",                "?" },
+//     { 16, "skateboard",             "?" },
+//     { 16, "soccer",                 "?" },
+       { 16, "swimming",               "Swimming Area" },
+       { 16, "skiing",                 "Skiing Area" },
+//     { 16, "table_tennis",           "?" },
+//     { 16, "tennis",                 "?" },
+//     { 16, "orienteering",           "?" },
+//     { 16, "User Defined",           "?" },
+
+       /* place ... */
+
+//     { 13, "continent",              "?" },
+//     { 13, "country",                "?" },
+//     { 13, "state",                  "?" },
+//     { 13, "region",                 "?" },
+//     { 13, "county",                 "?" },
+       { 13, "city",                   "City (Large)" },
+       { 13, "town",                   "City (Medium)" },
+       { 13, "village",                "City (Small)" },
+//     { 13, "hamlet",                 "?" },
+//     { 13, "suburb",                 "?" },
+//     { 13, "locality",               "?" },
+//     { 13, "island",                 "?" },
+//     { 13, "User Defined",           "?" },
+
+       { -1, NULL, NULL }
+};
+
+/*******************************************************************************/
+/*                                   READER                                    */
+/*-----------------------------------------------------------------------------*/
+
+static void
+osm_features_init(void)
+{
+       /* here we take a union because of warnings
+          "cast to pointer from integer of different size" 
+          on 64-bit systems */
+       union {
+               const void *p;
+               int i;
+       } x;
+
+       keys = avltree_init(AVLTREE_STATIC_KEYS, MYNAME);
+       values = avltree_init(0, MYNAME);
+       
+       x.p = NULL;
+       
+       /* the first of osm_features is a place holder */
+       for (x.i = 1; osm_features[x.i]; x.i++)
+               avltree_insert(keys, osm_features[x.i], x.p);
+       
+       for (x.i = 0; osm_icon_mappings[x.i].value; x.i++) {
+               char buff[128];
+
+               buff[0] = osm_icon_mappings[x.i].key;
+               strncpy(&buff[1], osm_icon_mappings[x.i].value, sizeof(buff) - 1);
+               avltree_insert(values, buff, (const void *)&osm_icon_mappings[x.i]);
+       }
+}
+
+
+static char
+osm_feature_ikey(const char *key)
+{
+       int result;
+       union {
+               const void *p;
+               int i;
+       } x;
+       
+       if (avltree_find(keys, key, &x.p))
+               result = x.i;
+       else
+               result = -1;
+
+       return result;
+}
+
+
+static char *
+osm_feature_symbol(const int ikey, const char *value)
+{
+       char *result;
+       char buff[128];
+       osm_icon_mapping_t *data;
+
+       buff[0] = ikey;
+       strncpy(&buff[1], value, sizeof(buff) - 1);
+
+       if (avltree_find(values, buff, (void *)&data))
+               result = xstrdup(data->icon);
+       else
+               xasprintf(&result, "%s:%s", osm_features[ikey], value);
+
+       return result;
+}
+
+
+static char *
+osm_strip_html(const char *str)
+{
+       utf_string utf;
+       utf.is_html = 1;
+       utf.utfstring = (char *)str;
+
+       return strip_html(&utf);        // util.c
+}
+
+
+static void 
+osm_node_end(const char *args, const char **unused)
+{
+       if (wpt) {
+               if (wpt->wpt_flags.fmt_use)
+                       waypt_add(wpt);
+               else
+                       waypt_free(wpt);
+               wpt = NULL;
+       }
+}
+
+
+static void 
+osm_node(const char *args, const char **attrv)
+{
+       const char **avp = &attrv[0];
+
+       wpt = waypt_new();
+
+        while (*avp) {
+               if (strcmp(avp[0], "id") == 0) {
+                       xasprintf(&wpt->description, "osm-id %s", avp[1]);
+                       if (! avltree_insert(waypoints, avp[1], (void *)wpt))
+                               warning(MYNAME ": Duplicate osm-id %s!\n", avp[1]);
+                       else
+                               wpt->wpt_flags.fmt_use = 1;
+               }
+               else if (strcmp(avp[0], "user") == 0) ;
+               else if (strcmp(avp[0], "lat") == 0)
+                       wpt->latitude = atof(avp[1]);
+               else if (strcmp(avp[0], "lon") == 0)
+                       wpt->longitude = atof(avp[1]);
+               else if (strcmp(avp[0], "timestamp") == 0)
+                       wpt->creation_time = xml_parse_time(avp[1], &wpt->microseconds);
+
+               avp += 2;
+       }
+}
+
+
+static void 
+osm_node_tag(const char *args, const char **attrv)
+{
+       const char **avp = &attrv[0];
+       const char *key = "", *value = "";
+       char *str;
+       char ikey;
+       
+        while (*avp) {
+               if (strcmp(avp[0], "k") == 0)
+                       key = avp[1];
+               else if (strcmp(avp[0], "v") == 0)
+                       value = avp[1];
+               avp+=2;
+       }
+       
+       str = osm_strip_html(value);
+       
+       if (strcmp(key, "name") == 0) {
+               if (! wpt->shortname)
+                       wpt->shortname = xstrdup(str);
+       }
+       else if (strcmp(key, "name:en") == 0) {
+               if (wpt->shortname)
+                       xfree(wpt->shortname);
+               wpt->shortname = xstrdup(str);
+       }
+       else if ((ikey = osm_feature_ikey(key)) >= 0) {
+               wpt->icon_descr = osm_feature_symbol(ikey, value);
+               wpt->wpt_flags.icon_descr_is_dynamic = 1;
+       }
+       else if (strcmp(key, "note") == 0) {
+               if (wpt->notes) {
+                       char *tmp;
+                       xasprintf(&tmp, "%s; %s", wpt->notes, str);
+                       xfree(wpt->notes);
+                       wpt->notes = tmp;
+               }
+               else
+                       wpt->notes = xstrdup(str);
+       }
+       
+       xfree(str);
+}
+
+
+static void 
+osm_way(const char *args, const char **attrv)
+{
+       const char **avp = &attrv[0];
+
+       rte = route_head_alloc();
+
+        while (*avp) {
+               if (strcmp(avp[0], "id") == 0) {
+                       xasprintf(&rte->rte_desc, "osm-id %s", avp[1]);
+               }
+               avp += 2;
+       }
+}
+
+static void 
+osm_way_nd(const char *args, const char **attrv)
+{
+       const char **avp = &attrv[0];
+
+        while (*avp) {
+               if (strcmp(avp[0], "ref") == 0) {
+                       waypoint *tmp;
+                       if (avltree_find(waypoints, avp[1], (void *)&tmp)) {
+                               tmp = waypt_dupe(tmp);
+                               route_add_wpt(rte, tmp);
+                       }
+                       else
+                               warning(MYNAME ": Way reference id \"%s\" wasn't listed under nodes!\n", avp[1]);
+               }
+               avp += 2;
+       }
+}
+
+static void 
+osm_way_tag(const char *args, const char **attrv)
+{
+       const char **avp = &attrv[0];
+       const char *key = "", *value = "";
+       char *str;
+       
+        while (*avp) {
+               if (strcmp(avp[0], "k") == 0)
+                       key = avp[1];
+               else if (strcmp(avp[0], "v") == 0)
+                       value = avp[1];
+               avp += 2;
+       }
+       
+       str = osm_strip_html(value);
+       
+       if (strcmp(key, "name") == 0) {
+               if (! rte->rte_name)
+                       rte->rte_name = xstrdup(str);
+       }
+       else if (strcmp(key, "name:en") == 0) {
+               if (rte->rte_name)
+                       xfree(rte->rte_name);
+               rte->rte_name = xstrdup(str);
+       }
+       
+       xfree(str);
+}
+
+static void 
+osm_way_end(const char *args, const char **unused)
+{
+       if (rte) {
+               route_add_head(rte);
+               rte = NULL;
+       }
+}
+
+static void 
+osm_rd_init(const char *fname)
+{
+       wpt = NULL;
+       rte = NULL;
+       wpt_loaded = 0;
+       rte_loaded = 0;
+
+       waypoints = avltree_init(0, MYNAME);
+       if (! keys)
+               osm_features_init();
+
+       xml_init(fname, osm_map, NULL);
+}
+
+static void 
+osm_read(void)
+{
+       xml_read();
+}
+
+#endif
+
+static void 
+osm_rd_deinit(void)
+{
+       xml_deinit();
+       avltree_done(waypoints);
+}
+
+/*******************************************************************************/
+/*                                   WRITER                                    */
+/*-----------------------------------------------------------------------------*/
+
+static void
+osm_init_icons(void)
+{
+       union {
+               const void *p;
+               int i;
+       } x;
+
+       if (icons) return;
+
+       icons = avltree_init(AVLTREE_STATIC_KEYS, MYNAME);
+
+       x.p = NULL;
+       for (x.i = 0; osm_icon_mappings[x.i].value; x.i++)
+               avltree_insert(icons, osm_icon_mappings[x.i].icon, (const void *)&osm_icon_mappings[x.i]);
+}
+
+static void
+osm_write_tag(const char *key, const char *value)
+{
+       if (value && *value) {
+               char *str = xml_entitize(value);
+               gbfprintf(fout, "    <tag k='%s' v='%s'/>\n", key, str);
+               xfree(str);
+       }
+}
+
+static void
+osm_disp_feature(const waypoint *wpt)
+{
+       osm_icon_mapping_t *map;
+       
+       if (avltree_find(icons, wpt->icon_descr, (void *) &map))
+               osm_write_tag(osm_features[map->key], map->value);
+}
+
+static void
+osm_write_opt_tag(const char *atag)
+{
+       char *tag, *cin, *ce;
+       
+       if (!atag) return;
+       
+       tag = cin = xstrdup(atag);
+       ce = cin + strlen(cin);
+       
+       while (cin < ce) {
+               char *sc, *dp;
+               
+               if ((sc = strchr(cin, ';'))) *sc = '\0';
+               
+               if ((dp = strchr(cin, ':'))) {
+                       *dp++ = '\0';
+                       osm_write_tag(cin, dp);
+               }
+               cin += strlen(cin) + 1;
+       }
+
+       xfree(tag);
+}
+
+static void
+osm_release_ids(const waypoint *wpt)
+{
+       if (wpt && wpt->extra_data) {
+               waypoint *tmp = (waypoint *)wpt;
+               xfree(tmp->extra_data);
+               tmp->extra_data = NULL;
+       }
+}
+
+static void
+osm_waypt_disp(const waypoint *wpt)
+{
+       char *buff;
+       
+       xasprintf(&buff, "%s\01%f\01%f", (wpt->shortname) ? wpt->shortname : "",
+               wpt->latitude, wpt->longitude);
+
+       if (avltree_insert(waypoints, buff, (const void *) wpt)) {
+               int *id;
+               
+               id = xmalloc(sizeof(*id));
+               *id = --node_id;
+               ((waypoint *)(wpt))->extra_data = id;
+       
+               gbfprintf(fout, "  <node id='%d' visible='true' lat='%f' lon='%f'", *id, wpt->latitude, wpt->longitude);
+               if (wpt->creation_time) {
+                       char time_string[64];
+                       xml_fill_in_time(time_string, wpt->creation_time, wpt->microseconds, XML_LONG_TIME);
+                       gbfprintf(fout, " timestamp='%s'", time_string);
+               }
+               gbfprintf(fout, ">\n");
+
+               gbfprintf(fout, "    <tag k='created_by' v='GPSBabel");
+               if (gpsbabel_time != 0)
+                       gbfprintf(fout, "-%s", gpsbabel_version);
+               gbfprintf(fout, "'/>\n");
+
+               osm_write_tag("name", wpt->shortname);
+               osm_write_tag("note", (wpt->notes) ? wpt->notes : wpt->description);
+               if (wpt->icon_descr)
+                       osm_disp_feature(wpt);
+
+               osm_write_opt_tag(opt_tagnd);
+
+               gbfprintf(fout, "  </node>\n");
+       }
+
+       xfree(buff);
+}
+
+static void
+osm_rte_disp_head(const route_head *rte)
+{
+       skip_rte = (rte->rte_waypt_ct <= 0);
+       
+       if (skip_rte) return;
+
+       gbfprintf(fout, "  <way id='%d' visible='true'>\n", --node_id);
+}
+
+static void
+osm_rtept_disp(const waypoint *wpt_ref)
+{
+       char *buff;
+       waypoint *wpt;
+       
+       if (skip_rte) return;
+       
+       xasprintf(&buff, "%s\01%f\01%f", (wpt_ref->shortname) ? wpt_ref->shortname : "",
+               wpt_ref->latitude, wpt_ref->longitude);
+
+       if (avltree_find(waypoints, buff, (void *) &wpt)) {
+               int *id = wpt->extra_data;
+               gbfprintf(fout, "    <nd ref='%d'/>\n", *id);
+       }
+       
+       xfree(buff);
+}
+
+static void
+osm_rte_disp_trail(const route_head *rte)
+{
+       if (skip_rte) return;
+
+       gbfprintf(fout, "    <tag k='created_by' v='GPSBabel");
+       if (gpsbabel_time != 0)
+               gbfprintf(fout, "-%s", gpsbabel_version);
+       gbfprintf(fout, "'/>\n");
+
+       osm_write_tag("name", rte->rte_name);
+       osm_write_tag("note", rte->rte_desc);
+
+       if (opt_tag && (case_ignore_strncmp(opt_tag, "tagnd", 5) != 0))
+               osm_write_opt_tag(opt_tag);
+
+       gbfprintf(fout, "  </way>\n");
+}
+
+/*-----------------------------------------------------------------------------*/
+
+static void 
+osm_wr_init(const char *fname)
+{
+       fout = gbfopen(fname, "w", MYNAME);
+
+       osm_init_icons();
+       waypoints = avltree_init(0, MYNAME);
+       node_id = 0;
+}
+
+static void 
+osm_write(void)
+{
+       gbfprintf(fout, "<?xml version='1.0' encoding='UTF-8'?>\n");
+       gbfprintf(fout, "<osm version='0.5' generator='GPSBabel");
+       if (gpsbabel_time != 0)
+               gbfprintf(fout, "-%s", gpsbabel_version);
+       gbfprintf(fout, "'>\n");
+       
+       waypt_disp_all(osm_waypt_disp);
+       route_disp_all(NULL, NULL, osm_waypt_disp);
+       track_disp_all(NULL, NULL, osm_waypt_disp);
+
+       route_disp_all(osm_rte_disp_head, osm_rte_disp_trail, osm_rtept_disp);
+       track_disp_all(osm_rte_disp_head, osm_rte_disp_trail, osm_rtept_disp);
+
+       gbfprintf(fout, "</osm>\n");
+}
+
+static void 
+osm_wr_deinit(void)
+{
+       gbfclose(fout);
+       
+       waypt_disp_all(osm_release_ids);
+       route_disp_all(NULL, NULL, osm_release_ids);
+       track_disp_all(NULL, NULL, osm_release_ids);
+
+       avltree_done(waypoints);
+}
+
+static void
+osm_exit(void)
+{
+       if (keys)
+               avltree_done(keys);
+       if (values)
+               avltree_done(values);
+       if (icons)
+               avltree_done(icons);
+}
+
+/*-----------------------------------------------------------------------------*/
+
+ff_vecs_t osm_vecs = {
+       ff_type_file,
+       { 
+               ff_cap_read | ff_cap_write      /* waypoints */, 
+               ff_cap_write                    /* tracks */, 
+               ff_cap_read | ff_cap_write      /* routes */, 
+       },
+       osm_rd_init,    
+       osm_wr_init,
+       osm_rd_deinit,
+       osm_wr_deinit,
+       osm_read,
+       osm_write,
+       osm_exit,
+       osm_args,
+       CET_CHARSET_UTF8, 0
+};
index fdf3a0f687ac37f19d430bc29dc778fd83f1693f..b0da23e9e77e5a0b3df0f894399dbcdd5369f5f7 100644 (file)
--- a/overlay.c
+++ b/overlay.c
@@ -38,8 +38,8 @@ static short_handle mkshort_handle;
 #undef  MAPNAME
 #define MAPNAME "Top. Karte 1:50.000 Nieders."
 
-static FILE *fpout;
-static FILE *fpin;
+static gbfile *fpout;
+static gbfile *fpin;
 static int govl_cnt;
 static double govl_sum_e=0.0;
 static double govl_sum_n=0.0;
@@ -152,7 +152,7 @@ static int isKeyword(char *str,char **keys)
 static
 void ovl_rd_init(char const *fname)
 {
-  fpin = xfopen(fname, "rt", MYNAME);
+  fpin = gbfopen(fname, "r", MYNAME);
 }
 
 #define SECTION_NONE    0
@@ -214,7 +214,7 @@ static void route_add_name(const route_head *hd)
 
 static void ovl_read(void)
 {
-  char    line[MAXLINE];
+  char    *line;
   int     isSection;
   int     aktTyp,aktCol,aktSize,aktArt,aktGroup;
   int     aktArea,aktWidth,aktHeight,aktTrans,aktTransByte,aktDir;
@@ -237,8 +237,9 @@ static void ovl_read(void)
   aktPath = NULL;
   sym_cnt = 0;
   isSection = SECTION_NONE;
-  while (fgets(line,MAXLINE-1,fpin)!=NULL)
+  while ((line = gbfgetstr(fpin)))
   {
+    line = lrtrim(line);
     if( (pstr = strstr(line,"[Symbol "))!= NULL)
     {
       sym_cnt++;
@@ -394,27 +395,27 @@ static void ovl_read(void)
 
 static void ovl_rd_deinit(void)
 {
-  fclose(fpin);
+  gbfclose(fpin);
 }
 
 /*------------------------------------------*/
 void ovl_read_parameter(char *fname)
 {
-  FILE      *fpin;
+  gbfile    *fpin;
   arglist_t *p;
-  char       line[MAXLINE],str[MAXLINE];
+  char      *str;
   char      *pstr;
 
-  fpin = fopen(fname,"rt");
+  fpin = gbfopen(fname, "r", MYNAME);
   if (fpin!=NULL)
   {
-    while (fgets(line,MAXLINE-1,fpin)!=NULL)
+    while ((str = gbfgetstr(fpin)))
     {
-      sscanf(line,"%s",str); // trim
+      str = lrtrim(str); // trim
       if (str[0]!=';')
       {
         p = ovl_args;
-        pstr = strtok(line,"=");
+        pstr = strtok(str,"=");
         if (pstr!=NULL)
         {
           while(p->argstring!=NULL)
@@ -437,13 +438,13 @@ void ovl_read_parameter(char *fname)
         }
       }
     }
-    fclose(fpin);
+    gbfclose(fpin);
   }
 }
 
 static void ovl_wr_init(const char *fname)
 {
-  fpout = xfopen(fname, "wt", MYNAME);
+  fpout = gbfopen(fname, "w", MYNAME);
   govl_sum_n = 0.0;
   govl_sum_e = 0.0;
   govl_sumcnt = 0.0;
@@ -492,37 +493,37 @@ static void ovl_wr_init(const char *fname)
 
 static void ovl_wr_deinit(void)
 {
-  fprintf(fpout,"[Overlay]\n");
-  fprintf(fpout,"Symbols=%d\n",govl_symbol_cnt);
-  fprintf(fpout,"[MapLage]\n");
-  fprintf(fpout,"MapName=%s\n",govl_mapname);
-  fprintf(fpout,"DimmFc=%d\n",govl_dimmfc);
-  fprintf(fpout,"ZoomFc=%d\n",govl_zoomfc);
+  gbfprintf(fpout,"[Overlay]\n");
+  gbfprintf(fpout,"Symbols=%d\n",govl_symbol_cnt);
+  gbfprintf(fpout,"[MapLage]\n");
+  gbfprintf(fpout,"MapName=%s\n",govl_mapname);
+  gbfprintf(fpout,"DimmFc=%d\n",govl_dimmfc);
+  gbfprintf(fpout,"ZoomFc=%d\n",govl_zoomfc);
   if (govl_symbol_cnt)
   {
-    fprintf(fpout,"CenterLat=%.8lf\n",govl_sum_n/govl_sumcnt); // precision 8 = better than 1mm
-    fprintf(fpout,"CenterLong=%.8lf\n",govl_sum_e/govl_sumcnt);
+    gbfprintf(fpout,"CenterLat=%.8lf\n",govl_sum_n/govl_sumcnt); // precision 8 = better than 1mm
+    gbfprintf(fpout,"CenterLong=%.8lf\n",govl_sum_e/govl_sumcnt);
   }
   else
   {
-    fprintf(fpout,"CenterLong=10.52374295\n"); // Braunschweiger Löwe, Mittelpunkt der Welt :-)
-    fprintf(fpout,"CenterLat=52.26474445\n");
+    gbfprintf(fpout,"CenterLong=10.52374295\n"); // Braunschweiger Löwe, Mittelpunkt der Welt :-)
+    gbfprintf(fpout,"CenterLat=52.26474445\n");
   }
-  fprintf(fpout,"RefOn=0\n");
+  gbfprintf(fpout,"RefOn=0\n");
 
-  fclose(fpout);
+  gbfclose(fpout);
 }
 
 static void symbol_init(const route_head *hd)
 {
-  fprintf(fpout,"[Symbol %d]\n",govl_symbol_cnt+1);
-  fprintf(fpout,"Typ=3\n");                            // Linie
-  fprintf(fpout,"Group=%d\n"   ,govl_group_cnt+1+1);   // group==1 : not a group
-  fprintf(fpout,"Col=%d\n"     ,govl_col);
-  fprintf(fpout,"Zoom=2\n");
-  fprintf(fpout,"Size=%d\n"    ,govl_size);
-  fprintf(fpout,"Art=1\n");
-  fprintf(fpout,"Punkte=%d\n"  ,hd->rte_waypt_ct);
+  gbfprintf(fpout,"[Symbol %d]\n",govl_symbol_cnt+1);
+  gbfprintf(fpout,"Typ=3\n");                            // Linie
+  gbfprintf(fpout,"Group=%d\n"   ,govl_group_cnt+1+1);   // group==1 : not a group
+  gbfprintf(fpout,"Col=%d\n"     ,govl_col);
+  gbfprintf(fpout,"Zoom=2\n");
+  gbfprintf(fpout,"Size=%d\n"    ,govl_size);
+  gbfprintf(fpout,"Art=1\n");
+  gbfprintf(fpout,"Punkte=%d\n"  ,hd->rte_waypt_ct);
   govl_cnt = 0;
   govl_symbol_cnt++;
   govl_group_cnt++;
@@ -530,18 +531,18 @@ static void symbol_init(const route_head *hd)
 
 static void symbol_text(double east,double north,char *text,int group)
 {
-  fprintf(fpout,"[Symbol %d]\n",govl_symbol_cnt+1);
-  fprintf(fpout,"Typ=2\n");                           // Text
-  fprintf(fpout,"Group=%d\n",group+1);  // group==1 : not a group
-  fprintf(fpout,"Col=%d\n",govl_txtcol);
-  fprintf(fpout,"Area=%d\n",govl_txttrans ? 1 : 2); // =2 opak =1 transparent
-  fprintf(fpout,"Zoom=%d\n",2);
-  fprintf(fpout,"Size=%d\n",govl_txtsize);
-  fprintf(fpout,"Font=%d\n",govl_font);
-  fprintf(fpout,"Dir=%d\n",100+((int) govl_dir));
-  fprintf(fpout,"XKoord=%.8lf\n",east);  // precision 8 = better than 1mm
-  fprintf(fpout,"YKoord=%.8lf\n",north);
-  fprintf(fpout,"Text=%s\n",text);
+  gbfprintf(fpout,"[Symbol %d]\n",govl_symbol_cnt+1);
+  gbfprintf(fpout,"Typ=2\n");                           // Text
+  gbfprintf(fpout,"Group=%d\n",group+1);  // group==1 : not a group
+  gbfprintf(fpout,"Col=%d\n",govl_txtcol);
+  gbfprintf(fpout,"Area=%d\n",govl_txttrans ? 1 : 2); // =2 opak =1 transparent
+  gbfprintf(fpout,"Zoom=%d\n",2);
+  gbfprintf(fpout,"Size=%d\n",govl_txtsize);
+  gbfprintf(fpout,"Font=%d\n",govl_font);
+  gbfprintf(fpout,"Dir=%d\n",100+((int) govl_dir));
+  gbfprintf(fpout,"XKoord=%.8lf\n",east);  // precision 8 = better than 1mm
+  gbfprintf(fpout,"YKoord=%.8lf\n",north);
+  gbfprintf(fpout,"Text=%s\n",text);
   govl_symbol_cnt++;
 }
 
@@ -551,8 +552,8 @@ static void symbol_point(const waypoint *wpt)
 
   east  = wpt->longitude;
   north = wpt->latitude;
-  fprintf(fpout,"XKoord%d=%.8lf\n",govl_cnt,east);    // precision 8 = better than 1mm
-  fprintf(fpout,"YKoord%d=%.8lf\n",govl_cnt,north);
+  gbfprintf(fpout,"XKoord%d=%.8lf\n",govl_cnt,east);    // precision 8 = better than 1mm
+  gbfprintf(fpout,"YKoord%d=%.8lf\n",govl_cnt,north);
   govl_cnt++;
   govl_sum_e += east;
   govl_sum_n += north;
@@ -652,18 +653,18 @@ static void overlay_waypt_pr(const waypoint *waypointp)
               mkshort(mkshort_handle, odesc) :
               waypointp->shortname;
 
-  fprintf(fpout,"[Symbol %d]\n",govl_symbol_cnt+1);
-  fprintf(fpout,"Typ=1\n");
-  fprintf(fpout,"Group=1\n");
-  fprintf(fpout,"Width=100\n");
-  fprintf(fpout,"Height=100\n");
-  fprintf(fpout,"Dir=%d\n",100+((int) govl_dir));
-  fprintf(fpout,"Zoom=2\n");
-  fprintf(fpout,"Trans=2\n");
-  fprintf(fpout,"TransByte=5\n");
-  fprintf(fpout,"Path=%s\n","waypoint.bmp");
-  fprintf(fpout,"XKoord=%.8lf\n",waypointp->longitude);
-  fprintf(fpout,"YKoord=%.8lf\n",waypointp->latitude);
+  gbfprintf(fpout,"[Symbol %d]\n",govl_symbol_cnt+1);
+  gbfprintf(fpout,"Typ=1\n");
+  gbfprintf(fpout,"Group=1\n");
+  gbfprintf(fpout,"Width=100\n");
+  gbfprintf(fpout,"Height=100\n");
+  gbfprintf(fpout,"Dir=%d\n",100+((int) govl_dir));
+  gbfprintf(fpout,"Zoom=2\n");
+  gbfprintf(fpout,"Trans=2\n");
+  gbfprintf(fpout,"TransByte=5\n");
+  gbfprintf(fpout,"Path=%s\n","waypoint.bmp");
+  gbfprintf(fpout,"XKoord=%.8lf\n",waypointp->longitude);
+  gbfprintf(fpout,"YKoord=%.8lf\n",waypointp->latitude);
   govl_symbol_cnt++;
   govl_sum_e += waypointp->longitude;
   govl_sum_n += waypointp->latitude;
diff --git a/ozi.c b/ozi.c
index 514cdcfc73530643d1744bde0d6d8c2dd32f0220..589822893e9d87554dc9ff7ade6fb55d3b88ced5 100644 (file)
--- a/ozi.c
+++ b/ozi.c
 
 #include "defs.h"
 #include "csv_util.h"
+#include "jeeps/gpsmath.h"
 #include <ctype.h>
 #include <math.h>                /* for floor */
 
 #define MYNAME        "OZI"
-#define BADCHARS       ",\n"
+#define BADCHARS       ",\r\n"
+#define DAYS_SINCE_1990        25569
 
 typedef struct {
        format_specific_data fs;
@@ -54,8 +56,9 @@ static char *snuniqueopt = NULL;
 static char *wptfgcolor = NULL;
 static char *wptbgcolor = NULL;
 static char *pack_opt = NULL;
-
-
+static int datum;
+static char *proximityarg = NULL;
+static int proximity;
 
 static
 arglist_t ozi_args[] = {
@@ -73,6 +76,8 @@ arglist_t ozi_args[] = {
                "black", ARGTYPE_STRING, ARG_NOMINMAX},
        {"wptbgcolor", &wptbgcolor, "Waypoint background color",
                "yellow", ARGTYPE_STRING, ARG_NOMINMAX},
+       {"proximity", &proximityarg, "Proximity distance",
+               "0", ARGTYPE_INT, ARG_NOMINMAX},
        ARG_TERMINATOR
 };
 
@@ -112,6 +117,54 @@ ozi_alloc_fsdata(void)
        return fsdata;
 }
 
+void
+ozi_get_time_str(const waypoint *waypointp, char *buff, gbsize_t buffsz)
+{
+       if (waypointp->creation_time) {
+           double time = (waypt_time(waypointp) / SECONDS_PER_DAY) + DAYS_SINCE_1990;
+           snprintf(buff, buffsz, "%.7f", time);
+       }
+       else *buff = '\0';
+}
+
+void
+ozi_set_time_str(const char *str, waypoint *waypointp)
+{
+       double ozi_time;
+       char *dot;
+       int len;
+
+       ozi_time = atof(str);
+       waypointp->creation_time = (ozi_time - DAYS_SINCE_1990) * SECONDS_PER_DAY;
+
+       dot = strchr(str, '.');
+       /* get number of characters after dot */
+       len = (dot) ? strlen(str) - (dot - str) - 1 : 0;
+       if (len >= 7) {
+           /* with default ozi time precision (%.7f) we can only handle tenths of second */
+           ozi_time -= ((double)waypointp->creation_time / SECONDS_PER_DAY ) + DAYS_SINCE_1990;
+           ozi_time *= SECONDS_PER_DAY;
+           waypointp->microseconds = (ozi_time * 10) + 0.5;
+           if (waypointp->microseconds == 10) {
+               waypointp->creation_time++;
+               waypointp->microseconds = 0;
+           }
+           waypointp->microseconds *= 100000;
+       }
+}
+
+static void
+ozi_convert_datum(waypoint *wpt)
+{
+    if (datum != DATUM_WGS84) {
+       double lat, lon, alt;
+       GPS_Math_Known_Datum_To_WGS84_M(wpt->latitude, wpt->longitude, 0.0, 
+           &lat, &lon, &alt, datum);
+       wpt->latitude = lat;
+       wpt->longitude = lon;
+    }
+}
+
 static void
 ozi_openfile(char *fname) {
     char *c, *cx, *tmpname;
@@ -180,9 +233,9 @@ static void
 ozi_track_disp(const waypoint * waypointp)
 {
     double alt_feet;
-    double ozi_time;
+    char ozi_time[16];
 
-    ozi_time = (waypointp->creation_time / 86400.0) + 25569.0;
+    ozi_get_time_str(waypointp, ozi_time, sizeof(ozi_time));
 
     if (waypointp->altitude == unknown_alt) {
         alt_feet = -777;
@@ -190,7 +243,7 @@ ozi_track_disp(const waypoint * waypointp)
         alt_feet = METERS_TO_FEET(waypointp->altitude);
     }
 
-    gbfprintf(file_out, "%.6f,%.6f,%d,%.0f,%.5f,,\r\n",
+    gbfprintf(file_out, "%.6f,%.6f,%d,%.0f,%s,,\r\n",
                waypointp->latitude, waypointp->longitude, new_track, 
        alt_feet, ozi_time);
 
@@ -248,11 +301,11 @@ static void
 ozi_route_disp(const waypoint * waypointp)
 {
     double alt_feet;
-    double ozi_time;
+    char ozi_time[16];
 
     route_wpt_count++;
 
-    ozi_time = (waypointp->creation_time / 86400.0) + 25569.0;
+    ozi_get_time_str(waypointp, ozi_time, sizeof(ozi_time));
 
     if (waypointp->altitude == unknown_alt) {
         alt_feet = -777;
@@ -281,7 +334,7 @@ ozi_route_disp(const waypoint * waypointp)
  * W,1,7,7,007,-25.581670,-48.316660,36564.54196,10,1,4,0,65535,TR ILHA GALHETA,0,0 
  */
 
-    gbfprintf(file_out, "W,%d,%d,,%s,%.6f,%.6f,%.5f,0,1,3,0,65535,%s,0,0\r\n", 
+    gbfprintf(file_out, "W,%d,%d,,%s,%.6f,%.6f,%s,0,1,3,0,65535,%s,0,0\r\n", 
             route_out_count,
             route_wpt_count,
             waypointp->shortname ? waypointp->shortname : "",
@@ -348,6 +401,9 @@ wr_init(const char *fname)
 
         setshort_badchars(mkshort_handle, "\",");
     }
+
+    proximity = atoi(proximityarg);
+
     file_out = NULL;
 }
 
@@ -369,6 +425,8 @@ ozi_parse_waypt(int field, char *str, waypoint * wpt_tmp, ozi_fsdata *fsdata)
 {
     double alt;
 
+    if (*str == '\0') return;
+
     switch (field) {
     case 0:
         /* sequence # */
@@ -387,7 +445,7 @@ ozi_parse_waypt(int field, char *str, waypoint * wpt_tmp, ozi_fsdata *fsdata)
         break;
     case 4:
         /* DAYS since 1900 00:00:00 in days.days (5.5) */
-        wpt_tmp->creation_time = (atof(str) - 25569.0) * 86400.0;
+       ozi_set_time_str(str, wpt_tmp);
         break;
     case 5:
         /* icons 0-xx */
@@ -453,6 +511,8 @@ ozi_parse_track(int field, char *str, waypoint * wpt_tmp)
 {
     double alt;
 
+    if (*str == '\0') return;
+    
     switch (field) {
     case 0:
         /* latitude */
@@ -463,7 +523,11 @@ ozi_parse_track(int field, char *str, waypoint * wpt_tmp)
         wpt_tmp->longitude = atof(str);
         break;
     case 2:
-        /* ignore */
+        /* new track flag */
+       if ((atoi(str) == 1) && (trk_head->rte_waypt_ct > 0)) {
+           trk_head = route_head_alloc();
+           track_add_head(trk_head);
+       }
         break;
     case 3:
         /* altitude in feet */
@@ -476,7 +540,7 @@ ozi_parse_track(int field, char *str, waypoint * wpt_tmp)
         break;
     case 4:
         /* DAYS since 1900 00:00:00 in days.days (5.5) */
-        wpt_tmp->creation_time = (atof(str) - 25569.0) * 86400.0;
+       ozi_set_time_str(str, wpt_tmp);
         break;
     default:
         break;
@@ -486,6 +550,7 @@ ozi_parse_track(int field, char *str, waypoint * wpt_tmp)
 static void
 ozi_parse_routepoint(int field, char *str, waypoint * wpt_tmp)
 {
+    if (*str == '\0') return;
 
     switch (field) {
     case 0:
@@ -514,7 +579,7 @@ ozi_parse_routepoint(int field, char *str, waypoint * wpt_tmp)
         break;
     case 7:
         /* DAYS since 1900 00:00:00 in days.days (5.5) */
-        wpt_tmp->creation_time = (atof(str) - 25569.0) * 86400.0;
+       ozi_set_time_str(str, wpt_tmp);
         break;
     case 8:
         /* symbol */
@@ -598,10 +663,10 @@ data_read(void)
                 ozi_objective = wptdata;
             }
         }
-
-        if (linecount == 2) {
-           if (case_ignore_strncmp(buff, "WGS 84", 6)) {
-               warning(MYNAME "Only supports reading WGS 84 datum, not '%s'\n", buff);
+       else if (linecount == 2) {
+           datum = GPS_Lookup_Datum_Index(buff);
+           if (datum < 0) {
+               fatal(MYNAME ": Unsupported datum '%s'.\n", buff);
            }
        }
 
@@ -640,14 +705,18 @@ data_read(void)
 
             switch (ozi_objective) {
             case trkdata:
-                if (linecount > 6) /* skipping over file header */
-                    track_add_wpt(trk_head, wpt_tmp);
+                if (linecount > 6) {/* skipping over file header */
+                   ozi_convert_datum(wpt_tmp);
+                   track_add_wpt(trk_head, wpt_tmp);
+               }
                 else
                     waypt_free(wpt_tmp);
                 break;
             case rtedata:
-                if (linecount > 5) /* skipping over file header */
+                if (linecount > 5) {/* skipping over file header */
+                   ozi_convert_datum(wpt_tmp);
                     route_add_wpt(rte_head, wpt_tmp);
+               }
                 else
                     waypt_free(wpt_tmp);
                 break;
@@ -655,6 +724,7 @@ data_read(void)
                 if (linecount > 4) {  /* skipping over file header */ 
                    fs_chain_add(&(wpt_tmp->fs), 
                        (format_specific_data *) fsdata);
+                   ozi_convert_datum(wpt_tmp);
                     waypt_add(wpt_tmp);
                 } else {
                     waypt_free(wpt_tmp);
@@ -677,7 +747,7 @@ ozi_waypt_pr(const waypoint * wpt)
 {
     static int index = 0;
     double alt_feet;
-    double ozi_time;
+    char ozi_time[16];
     char *description;
     char *shortname;
     int faked_fsdata = 0;
@@ -690,7 +760,7 @@ ozi_waypt_pr(const waypoint * wpt)
        faked_fsdata = 1;
     }
 
-    ozi_time = (wpt->creation_time / 86400.0) + 25569.0;
+    ozi_get_time_str(wpt, ozi_time, sizeof(ozi_time));
 
     if (wpt->altitude == unknown_alt) {
         alt_feet = -777;
@@ -725,13 +795,13 @@ ozi_waypt_pr(const waypoint * wpt)
     index++;
 
     gbfprintf(file_out,
-            "%d,%s,%.6f,%.6f,%.5f,%d,%d,%d,%d,%d,%s,%d,%d,",
+            "%d,%s,%.6f,%.6f,%s,%d,%d,%d,%d,%d,%s,%d,%d,",
             index, shortname, wpt->latitude, wpt->longitude, ozi_time, 0,
             1, 3, fs->fgcolor, fs->bgcolor, description, 0, 0);
     if (WAYPT_HAS(wpt, proximity) && (wpt->proximity > 0))
        gbfprintf(file_out, "%.1f,", wpt->proximity);
     else
-       gbfprintf(file_out,"0,");
+       gbfprintf(file_out,"%d,", proximity);
     gbfprintf(file_out, "%.0f,%d,%d,%d\r\n", alt_feet, 6, 0, 17);
 
     xfree(description);
diff --git a/parse.c b/parse.c
new file mode 100644 (file)
index 0000000..e6ee8b4
--- /dev/null
+++ b/parse.c
@@ -0,0 +1,237 @@
+/*
+
+    Misc GPS (text to data) parsers.
+
+    Copyright (C) 2007 Olaf Klein, o.b.klein@gpsbabel.org
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+ */
+
+#include "defs.h"
+#include "jeeps/gpsmath.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <errno.h>
+#include <time.h>
+
+/*
+ * parse_distance:
+ *
+ *  str:     input string, i.e. "128.2 km" or "22mi"
+ *  val:     pointer to resulting value
+ *  scale:   scaling parameter for unit-less values
+ *  module:  calling module, i.e. "garmin_txt"
+ */
+
+int
+parse_distance(const char *str, double *val, double scale, const char *module)
+{
+       char *unit;
+       
+       if ((str == NULL) || (*str == '\0')) return 0;
+       
+       *val = strtod(str, &unit);
+       if (unit == NULL)
+               fatal("%s: Unconvertable numeric value (%s)!\n", module, str);
+
+       if (fabs(*val) + 1 >= 1.0e25) {
+               return 0; /* not only Garmin uses this as 'unknown value' */
+       }
+       
+       while (isspace(*unit)) unit++;
+       
+       if (*unit == '\0') {
+               *val *= scale;
+               return 1;
+       }
+       
+       if (case_ignore_strcmp(unit, "m") == 0) /* do nothing, that's our standard */;
+       else if (case_ignore_strcmp(unit, "ft") == 0) *val = FEET_TO_METERS(*val);
+       else if (case_ignore_strcmp(unit, "feet") == 0) *val = FEET_TO_METERS(*val);
+       else if (case_ignore_strcmp(unit, "km") == 0) *val *= 1000.0;
+       else if (case_ignore_strcmp(unit, "nm") == 0) *val = NMILES_TO_METERS(*val);
+       else if (case_ignore_strcmp(unit, "mi") == 0) *val = MILES_TO_METERS(*val);
+       else if (case_ignore_strcmp(unit, "fa") == 0) *val = FATHOMS_TO_METERS(*val);
+       else
+               fatal("%s: Unsupported distance unit in item '%s'!\n", module, str);
+       return 2;
+}
+
+/*
+ * parse_speed:
+ *
+ *  str:     input string, i.e. "22.3 km/h" or "40mph"
+ *  val:     pointer to resulting value
+ *  scale:   scaling parameter for unit-less values
+ *  module:  calling module, i.e. "garmin_txt"
+ */
+int
+parse_speed(const char *str, double *val, const double scale, const char *module)
+{
+       char *unit;
+       
+       if ((str == NULL) || (*str == '\0')) return 0;
+       
+       *val = strtod(str, &unit);
+       if (unit == NULL)
+               fatal("%s: Unconvertable numeric value (%s)!\n", module, str);
+       
+       while (isspace(*unit)) unit++;
+       
+       if (*unit == '\0') {
+               *val *= scale;
+               return 1;
+       }
+       
+       if (case_ignore_strcmp(unit, "m/s") == 0) ;
+       else if (case_ignore_strcmp(unit, "mps") == 0) ;
+       else if (case_ignore_strcmp(unit, "kph") == 0) *val = KPH_TO_MPS(*val);
+       else if (case_ignore_strcmp(unit, "km/h") == 0) *val = KPH_TO_MPS(*val);
+       else if (case_ignore_strcmp(unit, "kmh") == 0) *val = KPH_TO_MPS(*val);
+       else if (case_ignore_strcmp(unit, "kt") == 0) *val = KNOTS_TO_MPS(*val);
+       else if (case_ignore_strcmp(unit, "knot") == 0) *val = KNOTS_TO_MPS(*val);
+       else if (case_ignore_strcmp(unit, "mph") == 0) *val = MPH_TO_MPS(*val);
+       else if (case_ignore_strcmp(unit, "mi/h") == 0) *val = MPH_TO_MPS(*val);
+       else if (case_ignore_strcmp(unit, "mih") == 0) *val = MPH_TO_MPS(*val);
+       else
+               fatal("%s: Unsupported speed unit '%s' in item '%s'!\n", module, unit, str);
+
+       return 2;
+}
+
+/* 
+ * Convert string 'str' into geodetic latitide & longitude values. The format
+ * will be interpreted depending on 'grid' parameter.
+ *
+ * return value: number of characters efective parsed
+ */
+
+int
+parse_coordinates(const char *str, int datum, const grid_type grid, 
+       double *latitude, double *longitude, const char *module)
+{
+       double lat, lon;
+       unsigned char lathemi, lonhemi;
+       int deg_lat, deg_lon, min_lat, min_lon;
+       char map[3];
+       int utmz;
+       double utme, utmn;
+       char utmc;
+       int valid, result, ct;
+       double lx, ly;
+       const char *format;
+       
+       valid = 1;
+       
+       switch(grid) {
+
+               case grid_lat_lon_ddd:
+                       format = "%c%lf %c%lf%n";
+                       ct = sscanf(str, format,
+                               &lathemi, &lat, &lonhemi, &lon, &result);
+                       valid = (ct == 4);
+                       break;
+
+               case grid_lat_lon_dmm:
+                       format = "%c%d %lf %c%d %lf%n";
+                       ct = sscanf(str, format,
+                               &lathemi, &deg_lat, &lat, &lonhemi, &deg_lon, &lon, &result);
+                       valid = (ct == 6);
+                       if (valid) {
+                               lat = (double)deg_lat + (lat / (double)60);
+                               lon = (double)deg_lon + (lon / (double)60);
+                       }
+                       break;
+               
+               case grid_lat_lon_dms:
+                       format = "%c%d %d %lf %c%d %d %lf%n";
+                       ct = sscanf(str, format,
+                               &lathemi, &deg_lat, &min_lat, &lat, &lonhemi, &deg_lon, &min_lon, &lon,
+                               &result);
+                       valid = (ct == 8);
+                       if (valid) {
+                               lat = (double)deg_lat + ((double)min_lat / (double)60) + (lat / (double)3600.0);
+                               lon = (double)deg_lon + ((double)min_lon / (double)60) + (lon / (double)3600.0);
+                       }
+                       break;
+               
+               case grid_bng:
+                       datum = DATUM_WGS84;    /* fix */
+                       format = "%2s %lf %lf%n";
+                       ct = sscanf(str, format,
+                               map, &lx, &ly,
+                               &result);
+                       valid = (ct == 3);
+                       if (valid) {
+                               if (! GPS_Math_UKOSMap_To_WGS84_M(map, lx, ly, &lat, &lon))
+                                       fatal("%s: Unable to convert BNG coordinates (%s)!\n",
+                                               module, str);
+                       }
+                       lathemi = lonhemi = '\0';
+                       break;
+                       
+               case grid_utm:
+                       format = "%d %c %lf %lf%n";
+                       ct = sscanf(str, format,
+                               &utmz, &utmc, &utme, &utmn,
+                               &result);
+                       valid = (ct == 4);
+                       if (valid) {
+                               if (! GPS_Math_UTM_EN_To_Known_Datum(&lat, &lon, utme, utmn, utmz, utmc, datum))
+                                       fatal("%s: Unable to convert UTM coordinates (%s)!\n",
+                                               module, str);
+                       }
+                       lathemi = lonhemi = '\0';
+                       break;
+                       
+               case grid_swiss: {
+                       double east, north;
+               
+                       datum = DATUM_WGS84;    /* fix */
+                       format = "%lf %lf%n";
+                       ct = sscanf(str, format,
+                               &east, &north, &result);
+                       valid = (ct == 2);
+                       GPS_Math_CH1903_NGEN_To_WGS84(east, north, &lat, &lon);
+                       break;
+               }
+               default:
+                       /* this should never happen in a release version */
+                       fatal("%s/util: Unknown grid in parse_coordinates (%d)!\n",
+                               module, (int)grid);
+       }
+       
+       if (! valid) {
+               warning("%s: sscanf error using format \"%s\"!\n", module, format);
+               warning("%s: parsing has stopped at parameter number %d.\n", module, ct);
+               fatal("%s: could not convert coordinates \"%s\"!\n", module, str);
+       }
+       
+       if (lathemi == 'S') lat = -lat;
+       if (lonhemi == 'W') lon = -lon;
+
+       if (datum != DATUM_WGS84) {
+               double alt;
+               GPS_Math_Known_Datum_To_WGS84_M(lat, lon, (double) 0.0,
+                       &lat, &lon, &alt, datum);
+       }
+
+       if (latitude) *latitude = lat;
+       if (longitude) *longitude = lon;
+               
+       return result;
+}
diff --git a/pcx.c b/pcx.c
index 5c479282f47532fbe4653513b4fe5cb4e1c4bf0a..d447ec76f885990c27897c610cbbdf5f6eb673de 100644 (file)
--- a/pcx.c
+++ b/pcx.c
@@ -82,7 +82,7 @@ static void
 data_read(void)
 {
        char name[7], desc[41];
-       double lat,lon;
+       double lat = 0, lon = 0;
        long alt; 
        int symnum;
        char date[10];
@@ -319,7 +319,7 @@ gpsutil_disp(const waypoint *wpt)
        }
 
 
-       gbfprintf(file_out, "W  %-6.6s %c%08.5f %c%011.5f %s %5d %-40.40s %5e  %d\n",
+       gbfprintf(file_out, "W  %-6.6s %c%08.5f %c%011.5f %s %5.f %-40.40s %5e  %d\n",
                 global_opts.synthesize_shortnames ?
                         mkshort_from_wpt(mkshort_handle, wpt) : 
                        wpt->shortname,
@@ -328,7 +328,7 @@ gpsutil_disp(const waypoint *wpt)
                lon < 0.0 ? 'W' : 'E',
                fabs(lon),
                tbuf, 
-               -9999,
+               (wpt->altitude == unknown_alt) ? -9999 : wpt->altitude,
                (wpt->description != NULL) ? wpt->description : "",
                0.0,
                icon_token);
index bade3d5671537e89dd04f9dad20f295ee8a63020..2f9c1638ffff12a43c555ac68b16bc51cd52a05a 100644 (file)
--- a/pdbfile.c
+++ b/pdbfile.c
@@ -50,7 +50,7 @@ pdb_invalid_file(const pdbfile *pdb_in, const char *fmt, ...)
 /* try to read to EOF (avoid determining file-size) */
 
 static void *
-pdb_read_tail(gbfile *fin, gbint32 *size)
+pdb_read_tail(gbfile *fin, gbuint32 *size)
 {
        int count;
        char buff[256];
@@ -82,7 +82,7 @@ pdb_load_data(pdbfile *fin)
 {
        gbuint16 i, ct;
        pdbrec_t *last_rec;
-       gbint32 offs;
+       gbuint32 offs;
        pdbrec_t *rec;
        
        /* load the header */
@@ -157,7 +157,7 @@ pdb_load_data(pdbfile *fin)
        last_rec = fin->rec_list;
 
        if (fin->appinfo_offs != 0) {
-               gbint32 top;
+               gbuint32 top;
 
                /* seek to application info offset */
                while (offs < fin->appinfo_offs) {
@@ -176,7 +176,7 @@ pdb_load_data(pdbfile *fin)
                        offs += fin->appinfo_len;
                }
                else {
-                       gbint32 size;
+                       gbuint32 size;
                        fin->appinfo = pdb_read_tail(fin->file, &size);
                        fin->appinfo_len = size;
                        offs += size;
index 0ad8237cd53402b096b8fea4ca6d81fef3fd0204..b1c652f047d66f71c00f74c12c14b2a6681b1d4a 100644 (file)
--- a/pdbfile.h
+++ b/pdbfile.h
@@ -39,8 +39,8 @@
 #define EPOCH_1904             2082844800L
 
 typedef struct pdbrec_s {
-       gbint32  offs;
-       gbint32  size;
+       gbuint32  offs;
+       gbuint32  size;
        gbuint32 id;
        gbuint8  category;
        gbuint8  flags;
@@ -58,8 +58,8 @@ typedef struct {
        time_t mtime;           /* modification time */
        time_t btime;           /* backup time */
        gbuint32 revision;
-       gbint32 appinfo_offs;   /* offset to application info */
-       gbint32 index_offs;     /* offset to sort-index info */
+       gbuint32 appinfo_offs;  /* offset to application info */
+       gbuint32 index_offs;    /* offset to sort-index info */
        gbuint32 creator;
        gbuint32 type;
        gbuint32 uid;
diff --git a/psp.c b/psp.c
index 3970faaafb50bffb6459cca8ac733487f36d2b2b..387536b862807340692801ddf793461586ac8c42 100644 (file)
--- a/psp.c
+++ b/psp.c
@@ -21,6 +21,7 @@
  */
 
 #include "defs.h"
+#include "cet.h"
 #include "cet_util.h"
 #include <ctype.h>
 #include "grtcirc.h"
 #define MAXPSPSTRINGSIZE       256
 #define MAXPSPOUTPUTPINS       8192   /* Any more points than this is ludicrous */
 
-static FILE *psp_file_in;
-static FILE *psp_file_out;
+static gbfile *psp_file_in;
+static gbfile *psp_file_out;
 static short_handle mkshort_handle;
 
-static int
-psp_fread(void *buff, size_t size, size_t members, FILE * fp) 
-{
-    size_t br;
-
-    br = fread(buff, size, members, fp);
+#define psp_fread(b,s,m,f) gbfread((b),(s),(m),f)
+#define psp_fread_double(f) gbfgetdbl(f)
+#define psp_fwrite_double(v,f) gbfputdbl((v),f)
 
-    if (br != members) {
-        fatal(MYNAME ": requested to read %ld bytes, read %ld bytes.\n", 
-                            (unsigned long) members, (unsigned long) br);
-    }
-
-    return (br);
-}
-
-static double
-psp_fread_double(FILE *fp)
+/* ToDo: move the code inside to CET library */
+static void
+psp_write_str(const char *str)
 {
-       unsigned char buf[8];
-       psp_fread(buf, 1, 8, fp);
-       return le_read_double(buf);
+       if (str && *str) {
+               const char *cin = str;
+               gbint16 *tmp, *res;
+               int len = 0;
+               
+               /* convert UTF-8 string into a unicode sequence */
+               /* not perfect, but enough for us */
+
+               res = tmp = xmalloc(strlen(str) << 1);
+               while (*cin) {
+                       int bytes, value;
+
+                       if (cet_utf8_to_ucs4(cin, &bytes, &value) != CET_SUCCESS)
+                               value = CET_NOT_CONVERTABLE_DEFAULT;
+                       *tmp++ = value;
+                       cin += bytes;
+                       len++;
+                       if (len == (MAXPSPSTRINGSIZE >> 1)) break;
+               }
+               gbfputc(len, psp_file_out);
+               tmp = res;
+               while (len--)
+                       /* ! we need LE values, don't use gbfwrite ! */
+                       gbfputint16(*tmp++, psp_file_out);
+               xfree(res);
+       }
+       else
+               gbfputc(0, psp_file_out);
 }
 
-static void
-psp_fwrite_double(double x, FILE *fp)
+/* ToDo: move the code inside to CET library */
+static char *
+psp_read_str(gbfile *fin)
 {
-       unsigned char cbuf[8];
-       le_write_double(cbuf,x);
-       fwrite(cbuf, 8, 1, fp);
+       int i, len;
+       gbint16 *buff;
+       char *res;
+       
+       len = (unsigned char)gbfgetc(fin);
+       if (len == 0) return NULL;
+       
+       buff = xmalloc(len * 2);
+       for (i = 0; i < len; i++)
+               buff[i] = gbfgetint16(fin);
+       res = cet_str_uni_to_utf8(buff, len);
+       xfree(buff);
+       return res;
 }
 
 /* Implement the grid in ascii art... This makes a bit of sense if you stand
@@ -149,44 +176,22 @@ valid_psp_header(char * header)
     
 }
 
-static char *
-buffer_washer(char * buff, int buffer_len)
-{
-/* original code
-    int i;
-
-    for (i = 0 ; i < buffer_len - 1; i++) {
-       if (buff[i] == '\0') {
-           memmove(&buff[i], &buff[i+1], buffer_len - i);
-           buffer_len--;
-           buff[buffer_len] = '\0';
-       }
-    }
-
-    return (buff);
-*/
-    char *c = cet_str_uni_to_any((const short *)buff, buffer_len >> 1, global_opts.charset);
-    strncpy(buff, c, buffer_len);
-    xfree(c);
-    return (buff);
-}
-
 static void
 psp_rd_init(const char *fname)
 {
-       psp_file_in = xfopen(fname, "rb", MYNAME);
+       psp_file_in = gbfopen_le(fname, "rb", MYNAME);
 }
 
 static void
 psp_rd_deinit(void)
 {
-       fclose(psp_file_in);
+       gbfclose(psp_file_in);
 }
 
 static void
 psp_wr_init(const char *fname)
 {
-       psp_file_out = xfopen(fname, "wb", MYNAME);
+       psp_file_out = gbfopen_le(fname, "wb", MYNAME);
        mkshort_handle = mkshort_new_handle();
 }
 
@@ -194,7 +199,7 @@ static void
 psp_wr_deinit(void)
 {
        mkshort_del_handle(&mkshort_handle);
-       fclose(psp_file_out);
+       gbfclose(psp_file_out);
 }
 
 static void
@@ -204,10 +209,10 @@ psp_read(void)
        double radians;
        double lat, lon;
        waypoint *wpt_tmp;
-       int stringsize;
        short int pincount;
        short int pindex;
         char gridbyte = 0x00;
+       char *tmp;
 
         /* 32 bytes - file header */
         psp_fread(&buff[0], 1, 32, psp_file_in);
@@ -264,54 +269,10 @@ psp_read(void)
            /* 3 bytes - unknown */
            psp_fread(&buff[0], 1, 3, psp_file_in);
 
-            /* 1 byte - string size */
-           psp_fread(&buff[0], 1, 1, psp_file_in);
-
-           stringsize = buff[0];
-           stringsize *= 2;
-
-           if (stringsize > MAXPSPSTRINGSIZE) {
-               fatal(MYNAME ": variable string size (%d) in PSP file exceeds MAX (%d).\n", stringsize, MAXPSPSTRINGSIZE);
-           }
-
-            /* stringsize bytes - string data */
-           psp_fread(&buff[0], 1, stringsize, psp_file_in);
-
-           buffer_washer(buff, stringsize);
-
-           wpt_tmp->shortname = xstrdup(buff);
-
-            /* 1 bytes string size */
-           psp_fread(&buff[0], 1, 1, psp_file_in);
-
-           stringsize = buff[0];
-           stringsize *= 2;
-
-           if (stringsize > MAXPSPSTRINGSIZE) {
-               fatal(MYNAME ": variable string size (%d) in PSP file exceeds MAX (%d).\n", stringsize, MAXPSPSTRINGSIZE);
-           }
-
-            /* stringsize bytes - string data */
-           psp_fread(&buff[0], 1, stringsize, psp_file_in);
-
-           buffer_washer(buff, stringsize);
-
-           wpt_tmp->description = xstrdup(buff);
-
-            /* 1 bytes - string size */
-           psp_fread(&buff[0], 1, 1, psp_file_in);
-
-           stringsize = buff[0];
-           stringsize *= 2;
-
-           if (stringsize > MAXPSPSTRINGSIZE) {
-               fatal(MYNAME ": variable string size (%d) in PSP file exceeds MAX (%d).\n", stringsize, MAXPSPSTRINGSIZE);
-           }
-
-            /* stringsize bytes - string data (address?) */
-           psp_fread(&buff[0], 1, stringsize, psp_file_in);
-
-           buffer_washer(buff, stringsize);
+           wpt_tmp->shortname = psp_read_str(psp_file_in);
+           wpt_tmp->description = psp_read_str(psp_file_in);
+           tmp = psp_read_str(psp_file_in); /* (address?) */
+           if (tmp) xfree(tmp);
 
            waypt_add(wpt_tmp);
        }
@@ -323,7 +284,6 @@ psp_waypt_pr(const waypoint *wpt)
        double lon, lat;
        char tbuf[64];
        char c;
-       int i;
        static short int pindex = 0;
        char *shortname;
        char *description;
@@ -357,13 +317,11 @@ psp_waypt_pr(const waypoint *wpt)
         lon = RAD(wpt->longitude);
         
        pindex++;
-       le_write16(tbuf, pindex);
         /* 2 bytes - pin index */
-        fwrite(tbuf, 1, 2, psp_file_out);
+        gbfputint16(pindex, psp_file_out);
         
         /* 2 bytes - null bytes */
-        memset(tbuf, '\0', sizeof(tbuf));
-        fwrite(tbuf, 1, 2, psp_file_out);
+        gbfputint16(0, psp_file_out);
         
 
         /* set the grid byte */
@@ -377,7 +335,7 @@ psp_waypt_pr(const waypoint *wpt)
         /* comes straight from S&T.                                      */
        
         /* the grid byte */
-        fwrite(&c, 1, 1, psp_file_out);
+        gbfwrite(&c, 1, 1, psp_file_out);
 
         /* 8 bytes - latitude/radians */
         psp_fwrite_double(lat, psp_file_out);
@@ -387,47 +345,25 @@ psp_waypt_pr(const waypoint *wpt)
 
         /* 1 byte - pin properties */
         c = 0x14; /* display pin name on, display notes on. 0x04 = no notes */
-        fwrite(&c, 1, 1, psp_file_out);
+        gbfwrite(&c, 1, 1, psp_file_out);
 
         memset(tbuf, '\0', sizeof(tbuf));
 
         /* 3 unknown bytes */
-        fwrite(tbuf, 1, 3, psp_file_out);
+        gbfwrite(tbuf, 1, 3, psp_file_out);
 
         /* 1 icon byte 0x00 = PIN */
-        fwrite(tbuf, 1, 1, psp_file_out);
+        gbfwrite(tbuf, 1, 1, psp_file_out);
 
         /* 3 unknown bytes */
-        fwrite(tbuf, 1, 3, psp_file_out); /* 3 junk */
-
-        c = strlen(shortname);
-        /* 1 string size */
-        fwrite(&c, 1, 1, psp_file_out);
+        gbfwrite(tbuf, 1, 3, psp_file_out); /* 3 junk */
 
-        for (i = 0 ; shortname[i] ; i++) {
-             fwrite(&shortname[i], 1, 1, psp_file_out);    /* char */
-             fwrite(&tbuf[0], 1, 1, psp_file_out);              /* null */
-        }
-
-        c = strlen(description);
-        /*  1 byte string size */
-        fwrite(&c, 1, 1, psp_file_out);
-
-        for (i = 0 ; description[i] ; i++) {
-             fwrite(&description[i], 1, 1, psp_file_out);  /* char */
-             fwrite(&tbuf[0], 1, 1, psp_file_out);              /* null */
-        }
+       psp_write_str(shortname);
+       psp_write_str(description);
 
         /* just for the hell of it, we'll scrap the third string. */
-        c = strlen(tbuf);
-        /* 1 byte string size */
-        fwrite(&c, 1, 1, psp_file_out);
+       psp_write_str("");
 
-        for (i = 0 ; tbuf[i] ; i++) {
-             fwrite(&tbuf[i], 1, 1, psp_file_out);              /* char */
-             fwrite(&tbuf[0], 1, 1, psp_file_out);              /* null */
-        }
-        
         xfree(shortname);
         xfree(description);
 }
@@ -456,7 +392,7 @@ psp_write(void)
         /* insert waypoint count into header */
        le_write16(&header_bytes[12], s);
 
-        fwrite(header_bytes, 1,  32, psp_file_out);
+        gbfwrite(header_bytes, 1,  32, psp_file_out);
 
         waypt_disp_all(psp_waypt_pr);
 }
@@ -472,5 +408,5 @@ ff_vecs_t psp_vecs = {
        psp_write,
        NULL,
        NULL,
-       CET_CHARSET_ASCII, 0    /* CET-REVIEW */
+       CET_CHARSET_UTF8, 1     /* Fixed because of unicode strings in psp files (see psp_read_str / psp_write_str) */
 };
diff --git a/random.c b/random.c
new file mode 100644 (file)
index 0000000..199aa5b
--- /dev/null
+++ b/random.c
@@ -0,0 +1,208 @@
+/*
+    random - GPS data generator
+    
+    Copyright (C) 2007 Olaf Klein, o.b.klein@gpsbabel.org
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+*/
+
+#include "defs.h"
+#include "garmin_fs.h"
+#include "jeeps/gpsmath.h"
+#include <time.h>
+
+#define MYNAME "random"
+
+static char *opt_points, *opt_seed;
+
+static arglist_t random_args[] = { 
+       { "points", &opt_points, "Generate # points", NULL, 
+               ARGTYPE_INT, "1", NULL },
+       { "seed", &opt_seed, "Starting seed of the internal number generator", NULL, 
+               ARGTYPE_INT, "1", NULL },
+       ARG_TERMINATOR
+};
+
+
+static double
+rand_dbl(const double max)
+{
+       return max * rand() / (((double)RAND_MAX) + 1);
+}
+
+static int
+rand_int(const int max)
+{
+       return (int)((double)max * rand() / (((double)RAND_MAX) + 1));
+}
+
+/* rand_str always returns a valid string with len >= 0 */
+
+static char *
+rand_str(const int maxlen, const char *fmt)
+{
+       char *res;
+       int i, len;
+       
+       len = rand_int(maxlen) + 1;
+       
+       res = xmalloc(len + 1);
+       res[len] = '\0';
+       
+       for (i = 0; i < len; i++) {
+               int c = rand_int(26 + 26 + 10);
+               if ( c < 26 )
+                       c += 'a';
+               else if (c < 52)
+                       c = (c - 26) + 'A';
+               else
+                       c = (c - 52) + '0';
+               res[i] = c;
+       }
+       if (fmt) {
+               char *tmp;
+               xasprintf(&tmp, fmt, res);
+               xfree(res);
+               return tmp;
+       }
+       else
+               return res;
+}
+
+static void
+random_rd_init(const char *fname)
+{
+}
+
+static void
+random_rd_deinit(void)
+{
+}
+
+static void 
+random_read(void)
+{
+#define RND(a) (rand_int(a) > 0)
+
+       int i, points;
+       route_head *head;
+       waypoint *prev = NULL;
+       time_t time = gpsbabel_time;
+       
+       if (opt_seed)
+               srand(atoi(opt_seed));
+       else
+               srand(gpsbabel_now);
+       
+
+       points = (opt_points) ? atoi(opt_points) : rand_int(128) + 1;
+       if (doing_trks || doing_rtes) {
+               head = route_head_alloc();
+               if (doing_trks) {
+                       head->rte_name = rand_str(8, "Trk_%s");
+                       track_add_head(head);
+               }
+               else {
+                       head->rte_name = rand_str(8, "Rte_%s");
+                       route_add_head(head);
+               }
+               head->rte_desc = rand_str(16, NULL);
+       }
+       else head = NULL;
+       
+       for (i = 0; i < points; i++) {
+       
+               waypoint *wpt;
+               garmin_fs_t *gmsd;
+               
+               wpt = waypt_new();
+               gmsd = garmin_fs_alloc(-1);
+               fs_chain_add(&wpt->fs, (format_specific_data *) gmsd);
+               
+               do {
+                       wpt->shortname = rand_str(8, "Wpt_%s");
+               } while (wpt->shortname == NULL);
+               
+               wpt->latitude = rand_dbl(180) - 90;
+               wpt->longitude = rand_dbl(360) - 180;
+               
+               /* !!! "if RND(3) ..." produces some leaks in generated data !!! */
+               
+               if RND(3) wpt->altitude = rand_int(1000) / 10;
+               if RND(3) WAYPT_SET(wpt, temperature, rand_int(320) / 10.0);
+               if RND(3) WAYPT_SET(wpt, proximity, rand_int(10000) / 10.0);
+               if RND(3) WAYPT_SET(wpt, depth, rand_int(10000) / 10.0);
+
+               wpt->creation_time = time;
+               if RND(3) wpt->microseconds = rand_int(1000) * 1000;
+               time += rand_int(10) + 1;
+
+               if (doing_trks) {
+                       if (i > 0) {
+                               wpt->latitude = prev->latitude + (rand_dbl(1) / 1000);
+                               wpt->longitude = prev->longitude + (rand_dbl(1) / 1000);
+                               WAYPT_SET(wpt, course, waypt_course(prev, wpt));
+                               WAYPT_SET(wpt, speed, waypt_speed(prev, wpt));
+                       }
+                       wpt->sat = rand_int(12 + 1);
+                       wpt->hdop = (rand_int(500)) / 10.0;
+                       wpt->vdop = (rand_int(500)) / 10.0;
+                       wpt->pdop = (rand_int(500)) / 10.0;
+                       wpt->fix = rand_int(6) - 1;
+                       if RND(3) wpt->cadence = rand_int(255);
+                       if RND(3) wpt->heartrate = rand_int(255);
+               }
+               else {
+                       if (doing_rtes && (i > 0)) {
+                               wpt->latitude = prev->latitude + (rand_dbl(1) / 100);
+                               wpt->longitude = prev->longitude + (rand_dbl(1) / 100);
+                       }
+                       if RND(3) wpt->description = rand_str(16, "Des_%s");
+                       if RND(3) wpt->notes = rand_str(16, "Nts_%s");
+                       if RND(3) GMSD_SET(addr, rand_str(8, "Adr_%s"));
+                       if RND(3) GMSD_SET(city, rand_str(8, "Cty_%s"));
+                       if RND(3) GMSD_SET(facility, rand_str(8, "Fac_%s"));
+                       if RND(3) GMSD_SET(country, rand_str(8, "Ctr_%s"));
+                       if RND(3) GMSD_SET(state, rand_str(8, "Sta_%s"));
+                       if RND(3) GMSD_SET(phone_nr, rand_str(8, "Pnr_%s"));
+                       if RND(3) GMSD_SET(postal_code, rand_str(8, "Pcd_%s"));
+               }
+
+               if (doing_trks) track_add_wpt(head, wpt);
+               else if (doing_rtes) route_add_wpt(head, wpt);
+               else waypt_add(wpt);
+
+               prev = wpt;
+       }
+}
+
+
+ff_vecs_t random_vecs = {
+       ff_type_internal,
+       { 
+               ff_cap_read /* waypoints */, 
+               ff_cap_read /* tracks */, 
+               ff_cap_read /* routes */
+       },
+       random_rd_init, 
+       NULL,   /* wr_init */
+       random_rd_deinit,       
+       NULL,   /* wr_deinit */
+       random_read,
+       NULL,   /* write */
+       NULL,   /* exit */
+       random_args,
+       CET_CHARSET_ASCII, 1                    /* fixed */
+};
diff --git a/reference/IMG_2065.JPG b/reference/IMG_2065.JPG
new file mode 100644 (file)
index 0000000..0578f1f
Binary files /dev/null and b/reference/IMG_2065.JPG differ
diff --git a/reference/destinator_poi.dat b/reference/destinator_poi.dat
new file mode 100644 (file)
index 0000000..cd49276
Binary files /dev/null and b/reference/destinator_poi.dat differ
diff --git a/reference/destinator_poi.txt b/reference/destinator_poi.txt
new file mode 100644 (file)
index 0000000..1c12781
--- /dev/null
@@ -0,0 +1,87 @@
+No,Latitude,Longitude,Name,Description\r
+1,42.438878,-71.119277,"5066","5066"\r
+2,42.439227,-71.119689,"5067","5067"\r
+3,42.438917,-71.116146,"5096","5096"\r
+4,42.443904,-71.122044,"5142","5142"\r
+5,42.447298,-71.121447,"5156","5156"\r
+6,42.454873,-71.125094,"5224","5224"\r
+7,42.459079,-71.124988,"5229","5229"\r
+8,42.456979,-71.124474,"5237","5237"\r
+9,42.454401,-71.120990,"5254","5254"\r
+10,42.451442,-71.121746,"5258","5258"\r
+11,42.454404,-71.120660,"5264","5264"\r
+12,42.457761,-71.121045,"526708","526708"\r
+13,42.457089,-71.120313,"526750","526750"\r
+14,42.456592,-71.119676,"527614","527614"\r
+15,42.456252,-71.119356,"527631","527631"\r
+16,42.458148,-71.119135,"5278","5278"\r
+17,42.459377,-71.117693,"5289","5289"\r
+18,42.464183,-71.119828,"5374FIRE","5374FIRE"\r
+19,42.465650,-71.119399,"5376","5376"\r
+20,42.439018,-71.114456,"6006","600698"\r
+21,42.438594,-71.114803,"6006BLUE","6006BLUE"\r
+22,42.436757,-71.113223,"6014MEADOW","6014MEADOW"\r
+23,42.441754,-71.113220,"6029","6029"\r
+24,42.436243,-71.109075,"6053","6053"\r
+25,42.439250,-71.107500,"6066","6066"\r
+26,42.439764,-71.107582,"6067","6067"\r
+27,42.434766,-71.105874,"6071","6071"\r
+28,42.433304,-71.106599,"6073","6073"\r
+29,42.437338,-71.104772,"6084","6084"\r
+30,42.442196,-71.110975,"6130","6130"\r
+31,42.442981,-71.111441,"6131","6131"\r
+32,42.444773,-71.108882,"6153","6153"\r
+33,42.443592,-71.106301,"6171","6171"\r
+34,42.447804,-71.106624,"6176","6176"\r
+35,42.448448,-71.106158,"6177","6177"\r
+36,42.453415,-71.106783,"6272","6272"\r
+37,42.453434,-71.107253,"6272","6272"\r
+38,42.458298,-71.106771,"6278","6278"\r
+39,42.451430,-71.105413,"6280","6280"\r
+40,42.453845,-71.105206,"6283","6283"\r
+41,42.459986,-71.106170,"6289","6289"\r
+42,42.457616,-71.105116,"6297","6297"\r
+43,42.467110,-71.113574,"6328","6328"\r
+44,42.464202,-71.109863,"6354","6354"\r
+45,42.466459,-71.110067,"635722","635722"\r
+46,42.466557,-71.109410,"635783","635783"\r
+47,42.463495,-71.107117,"6373","6373"\r
+48,42.401051,-71.110241,"6634","6634"\r
+49,42.432621,-71.106532,"6979","6979"\r
+50,42.431033,-71.107883,"6997","6997"\r
+51,42.465687,-71.107360,"BEAR HILL","Bear Hill Tower"\r
+52,42.430950,-71.107628,"BELLEVUE","Bellevue Parking Lot"\r
+53,42.438666,-71.114079,"6016","Bike Loop Connector"\r
+54,42.456469,-71.124651,"5236BRIDGE","Bridge"\r
+55,42.465759,-71.119815,"5376BRIDGE","Bridge"\r
+56,42.442993,-71.105878,"6181CROSS","Crossing"\r
+57,42.435472,-71.109664,"6042CROSS","Crossing"\r
+58,42.458516,-71.103646,"DARKHOLLPO","Dark Hollow Pond"\r
+59,42.443109,-71.112675,"6121DEAD","Dead End"\r
+60,42.449866,-71.119298,"5179DEAD","Dead End"\r
+61,42.459629,-71.116524,"5299DEAD","Dead End"\r
+62,42.465485,-71.119148,"5376DEAD","Dead End"\r
+63,42.462776,-71.109986,"6353DEAD","Dead End"\r
+64,42.446793,-71.108784,"6155DEAD","Dead End"\r
+65,42.451204,-71.126602,"GATE14","Gate 14"\r
+66,42.458499,-71.122078,"GATE16","Gate 16"\r
+67,42.459376,-71.119238,"GATE17","Gate 17"\r
+68,42.466353,-71.119240,"GATE19","Gate 19"\r
+69,42.468655,-71.107697,"GATE21","Gate 21"\r
+70,42.456718,-71.102973,"GATE24","Gate 24"\r
+71,42.430847,-71.107690,"GATE5","Gate 5"\r
+72,42.431240,-71.109236,"GATE6","Gate 6"\r
+73,42.439502,-71.106556,"6077LOGS","Log Crossing"\r
+74,42.449765,-71.122320,"5148NANEPA","Nanepashemet Road Crossing"\r
+75,42.457388,-71.119845,"5267OBSTAC","Obstacle"\r
+76,42.434980,-71.109942,"PANTHRCAVE","Panther Cave"\r
+77,42.453256,-71.121211,"5252PURPLE","Purple Rock Hill"\r
+78,42.457734,-71.117481,"5287WATER","Reservoir"\r
+79,42.459278,-71.124574,"5239ROAD","Road"\r
+80,42.458782,-71.118991,"5278ROAD","Road"\r
+81,42.439993,-71.120925,"5058ROAD","Road Crossing"\r
+82,42.453415,-71.106782,"SHEEPFOLD","Sheepfold Parking Lot"\r
+83,42.455956,-71.107483,"SOAPBOX","Soap Box Derby Track"\r
+84,42.465913,-71.119328,"5376STREAM","Stream Crossing"\r
+85,42.445359,-71.122845,"5144SUMMIT","Summit"\r
+86,42.441727,-71.121676,"5150TANK","Water Tank"\r
index 57a2548a6cf6a6185f10fa7311966648524c0e5b..456a26b194c993847ec31b1bc6f237b8aa10e980 100644 (file)
@@ -1,15 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <kml xmlns="http://earth.google.com/kml/2.1"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://earth.google.com/kml/2.1 
-       http://code.google.com/apis/kml/schema/kml21.xsd">
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Document>
     <name>GPS device</name>
 <!-- Normal route style -->
     <Style id="route_n">
       <IconStyle>
         <Icon>
-          <href>http://maps.google.com/mapfiles/kml/pal4/icon61.png</href>
+          <href>http://earth.google.com/images/kml-icons/track-directional/track-none.png</href>
         </Icon>
       </IconStyle>
     </Style>
@@ -18,7 +16,7 @@
       <IconStyle>
         <scale>1.2</scale>
         <Icon>
-          <href>http://maps.google.com/mapfiles/kml/pal4/icon61.png</href>
+          <href>http://earth.google.com/images/kml-icons/track-directional/track-none.png</href>
         </Icon>
       </IconStyle>
     </Style>
@@ -36,7 +34,7 @@
     <Style id="track_n">
       <IconStyle>
         <Icon>
-          <href>http://maps.google.com/mapfiles/kml/pal4/icon60.png</href>
+          <href>http://earth.google.com/images/kml-icons/track-directional/track-none.png</href>
         </Icon>
       </IconStyle>
     </Style>
@@ -45,7 +43,7 @@
       <IconStyle>
         <scale>1.2</scale>
         <Icon>
-          <href>http://maps.google.com/mapfiles/kml/pal4/icon60.png</href>
+          <href>http://earth.google.com/images/kml-icons/track-directional/track-none.png</href>
         </Icon>
       </IconStyle>
     </Style>
@@ -88,7 +86,7 @@
     </StyleMap>
     <Style id="lineStyle">
       <LineStyle>
-        <color>64eeee17</color>
+        <color>99ffac59</color>
         <width>6</width>
       </LineStyle>
     </Style>
         <description>
 <![CDATA[<table>
             <tr><td><b>Distance</b> 4.8 mi </td></tr>
-            <tr><td><b>Min Alt</b> 3.3 ft </td></tr>
-            <tr><td><b>Max Alt</b> 23.0 ft </td></tr>
+            <tr><td><b>Min Alt</b> 3.281 ft </td></tr>
+            <tr><td><b>Max Alt</b> 22.966 ft </td></tr>
             <tr><td><b>Max Speed</b> 25.5 mph </td></tr>
-            <tr><td><b>Start Time:</b> 2002-05-25T17:06:21Z  </td></tr>
-            <tr><td><b>End Time:</b> 2002-05-25T19:05:57Z  </td></tr>
+            <tr><td><b>Avg Speed</b> 2.4 mph </td></tr>
+            <tr><td><b>Start Time</b> 2002-05-25T17:06:21Z  </td></tr>
+            <tr><td><b>End Time</b> 2002-05-25T19:05:57Z  </td></tr>
           </table>]]>
         </description>
         <TimeSpan>
               <table>
                 <tr><td>Longitude: -91.610350 </td></tr>
                 <tr><td>Latitude: 30.062183 </td></tr>
-                <tr><td>Altitude: 3.3 ft </td></tr>
+                <tr><td>Altitude: 3.281 ft </td></tr>
                 <tr><td>Speed: 0.0 mph </td></tr>
                 <tr><td>Heading: 300.1 </td></tr>
                 <tr><td>Time: 2002-05-25T17:06:21Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.599633 </td></tr>
                 <tr><td>Latitude: 30.047000 </td></tr>
-                <tr><td>Altitude: 6.6 ft </td></tr>
+                <tr><td>Altitude: 6.562 ft </td></tr>
                 <tr><td>Speed: 1.5 mph </td></tr>
                 <tr><td>Heading: 118.7 </td></tr>
                 <tr><td>Time: 2002-05-25T18:06:04Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.598950 </td></tr>
                 <tr><td>Latitude: 30.046200 </td></tr>
-                <tr><td>Altitude: 3.3 ft </td></tr>
+                <tr><td>Altitude: 3.281 ft </td></tr>
                 <tr><td>Speed: 1.7 mph </td></tr>
                 <tr><td>Heading: 117.5 </td></tr>
                 <tr><td>Time: 2002-05-25T18:08:18Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.594767 </td></tr>
                 <tr><td>Latitude: 30.047800 </td></tr>
-                <tr><td>Altitude: 6.6 ft </td></tr>
+                <tr><td>Altitude: 6.562 ft </td></tr>
                 <tr><td>Speed: 3.0 mph </td></tr>
                 <tr><td>Heading: 47.0 </td></tr>
                 <tr><td>Time: 2002-05-25T18:15:04Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.594083 </td></tr>
                 <tr><td>Latitude: 30.048250 </td></tr>
-                <tr><td>Altitude: 3.3 ft </td></tr>
+                <tr><td>Altitude: 3.281 ft </td></tr>
                 <tr><td>Speed: 2.6 mph </td></tr>
                 <tr><td>Heading: 52.8 </td></tr>
                 <tr><td>Time: 2002-05-25T18:16:14Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.593800 </td></tr>
                 <tr><td>Latitude: 30.048683 </td></tr>
-                <tr><td>Altitude: 3.3 ft </td></tr>
+                <tr><td>Altitude: 3.281 ft </td></tr>
                 <tr><td>Speed: 2.6 mph </td></tr>
                 <tr><td>Heading: 29.5 </td></tr>
                 <tr><td>Time: 2002-05-25T18:17:01Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.593983 </td></tr>
                 <tr><td>Latitude: 30.050317 </td></tr>
-                <tr><td>Altitude: 6.6 ft </td></tr>
+                <tr><td>Altitude: 6.562 ft </td></tr>
                 <tr><td>Speed: 2.3 mph </td></tr>
                 <tr><td>Heading: 353.2 </td></tr>
                 <tr><td>Time: 2002-05-25T18:19:51Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.595200 </td></tr>
                 <tr><td>Latitude: 30.054867 </td></tr>
-                <tr><td>Altitude: 19.7 ft </td></tr>
+                <tr><td>Altitude: 19.685 ft </td></tr>
                 <tr><td>Speed: 2.2 mph </td></tr>
                 <tr><td>Heading: 346.4 </td></tr>
                 <tr><td>Time: 2002-05-25T18:28:13Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.594933 </td></tr>
                 <tr><td>Latitude: 30.053733 </td></tr>
-                <tr><td>Altitude: 6.6 ft </td></tr>
+                <tr><td>Altitude: 6.562 ft </td></tr>
                 <tr><td>Speed: 1.4 mph </td></tr>
                 <tr><td>Heading: 168.5 </td></tr>
                 <tr><td>Time: 2002-05-25T18:31:36Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.596783 </td></tr>
                 <tr><td>Latitude: 30.052650 </td></tr>
-                <tr><td>Altitude: 3.3 ft </td></tr>
+                <tr><td>Altitude: 3.281 ft </td></tr>
                 <tr><td>Speed: 2.8 mph </td></tr>
                 <tr><td>Heading: 283.3 </td></tr>
                 <tr><td>Time: 2002-05-25T18:37:52Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.597767 </td></tr>
                 <tr><td>Latitude: 30.053967 </td></tr>
-                <tr><td>Altitude: 19.7 ft </td></tr>
+                <tr><td>Altitude: 19.685 ft </td></tr>
                 <tr><td>Speed: 1.4 mph </td></tr>
                 <tr><td>Heading: 26.3 </td></tr>
                 <tr><td>Time: 2002-05-25T18:41:25Z </td></tr>
               <table>
                 <tr><td>Longitude: -91.595450 </td></tr>
                 <tr><td>Latitude: 30.047500 </td></tr>
-                <tr><td>Altitude: 23.0 ft </td></tr>
+                <tr><td>Altitude: 22.966 ft </td></tr>
                 <tr><td>Speed: 2.8 mph </td></tr>
                 <tr><td>Heading: 226.1 </td></tr>
                 <tr><td>Time: 2002-05-25T18:58:40Z </td></tr>
               <table>
                 <tr><td>Longitude: -71.107628 </td></tr>
                 <tr><td>Latitude: 42.430950 </td></tr>
-                <tr><td>Altitude: 77.0 ft </td></tr>
+                <tr><td>Altitude: 77.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T00:18:15Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.109236 </td></tr>
                 <tr><td>Latitude: 42.431240 </td></tr>
-                <tr><td>Altitude: 87.1 ft </td></tr>
+                <tr><td>Altitude: 87.145 ft </td></tr>
                 <tr><td>Time: 2001-11-07T23:53:41Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.109942 </td></tr>
                 <tr><td>Latitude: 42.434980 </td></tr>
-                <tr><td>Altitude: 148.6 ft </td></tr>
+                <tr><td>Altitude: 148.647 ft </td></tr>
                 <tr><td>Time: 2001-11-07T23:53:41Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.113223 </td></tr>
                 <tr><td>Latitude: 42.436757 </td></tr>
-                <tr><td>Altitude: 123.4 ft </td></tr>
+                <tr><td>Altitude: 123.415 ft </td></tr>
                 <tr><td>Time: 2001-11-28T21:05:28Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.114456 </td></tr>
                 <tr><td>Latitude: 42.439018 </td></tr>
-                <tr><td>Altitude: 185.0 ft </td></tr>
+                <tr><td>Altitude: 185.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:26:55Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.114803 </td></tr>
                 <tr><td>Latitude: 42.438594 </td></tr>
-                <tr><td>Altitude: 151.0 ft </td></tr>
+                <tr><td>Altitude: 151.012 ft </td></tr>
                 <tr><td>Time: 2001-11-28T21:05:28Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.116146 </td></tr>
                 <tr><td>Latitude: 42.438917 </td></tr>
-                <tr><td>Altitude: 147.1 ft </td></tr>
+                <tr><td>Altitude: 147.070 ft </td></tr>
                 <tr><td>Time: 2001-11-16T23:03:38Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.119277 </td></tr>
                 <tr><td>Latitude: 42.438878 </td></tr>
-                <tr><td>Altitude: 146.3 ft </td></tr>
+                <tr><td>Altitude: 146.281 ft </td></tr>
                 <tr><td>Time: 2001-11-28T21:05:28Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.119689 </td></tr>
                 <tr><td>Latitude: 42.439227 </td></tr>
-                <tr><td>Altitude: 189.0 ft </td></tr>
+                <tr><td>Altitude: 189.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:26:55Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.120925 </td></tr>
                 <tr><td>Latitude: 42.439993 </td></tr>
-                <tr><td>Altitude: 177.0 ft </td></tr>
+                <tr><td>Altitude: 177.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T00:18:14Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.121676 </td></tr>
                 <tr><td>Latitude: 42.441727 </td></tr>
-                <tr><td>Altitude: 221.0 ft </td></tr>
+                <tr><td>Altitude: 221.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T00:18:16Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.122044 </td></tr>
                 <tr><td>Latitude: 42.443904 </td></tr>
-                <tr><td>Altitude: 166.0 ft </td></tr>
+                <tr><td>Altitude: 165.993 ft </td></tr>
                 <tr><td>Time: 2001-11-28T21:05:28Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.122845 </td></tr>
                 <tr><td>Latitude: 42.445359 </td></tr>
-                <tr><td>Altitude: 202.3 ft </td></tr>
+                <tr><td>Altitude: 202.263 ft </td></tr>
                 <tr><td>Time: 2001-11-28T21:05:28Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.121447 </td></tr>
                 <tr><td>Latitude: 42.447298 </td></tr>
-                <tr><td>Altitude: 419.0 ft </td></tr>
+                <tr><td>Altitude: 419.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:26:58Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.122320 </td></tr>
                 <tr><td>Latitude: 42.449765 </td></tr>
-                <tr><td>Altitude: 393.1 ft </td></tr>
+                <tr><td>Altitude: 393.074 ft </td></tr>
                 <tr><td>Time: 2001-11-07T23:53:41Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.121746 </td></tr>
                 <tr><td>Latitude: 42.451442 </td></tr>
-                <tr><td>Altitude: 244.8 ft </td></tr>
+                <tr><td>Altitude: 244.841 ft </td></tr>
                 <tr><td>Time: 2001-11-07T23:53:41Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.121211 </td></tr>
                 <tr><td>Latitude: 42.453256 </td></tr>
-                <tr><td>Altitude: 255.9 ft </td></tr>
+                <tr><td>Altitude: 255.879 ft </td></tr>
                 <tr><td>Time: 2001-11-07T23:53:41Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.119356 </td></tr>
                 <tr><td>Latitude: 42.456252 </td></tr>
-                <tr><td>Altitude: 258.2 ft </td></tr>
+                <tr><td>Altitude: 258.245 ft </td></tr>
                 <tr><td>Time: 2001-11-07T23:53:41Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.119676 </td></tr>
                 <tr><td>Latitude: 42.456592 </td></tr>
-                <tr><td>Altitude: 258.2 ft </td></tr>
+                <tr><td>Altitude: 258.245 ft </td></tr>
                 <tr><td>Time: 2001-11-07T23:53:41Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.119845 </td></tr>
                 <tr><td>Latitude: 42.457388 </td></tr>
-                <tr><td>Altitude: 242.0 ft </td></tr>
+                <tr><td>Altitude: 242.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:00Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.119135 </td></tr>
                 <tr><td>Latitude: 42.458148 </td></tr>
-                <tr><td>Altitude: 224.0 ft </td></tr>
+                <tr><td>Altitude: 224.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:00Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.117693 </td></tr>
                 <tr><td>Latitude: 42.459377 </td></tr>
-                <tr><td>Altitude: 210.0 ft </td></tr>
+                <tr><td>Altitude: 210.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:01Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.119828 </td></tr>
                 <tr><td>Latitude: 42.464183 </td></tr>
-                <tr><td>Altitude: 173.9 ft </td></tr>
+                <tr><td>Altitude: 173.878 ft </td></tr>
                 <tr><td>Time: 2001-11-28T21:05:28Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.119399 </td></tr>
                 <tr><td>Latitude: 42.465650 </td></tr>
-                <tr><td>Altitude: 185.0 ft </td></tr>
+                <tr><td>Altitude: 185.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:02Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.119328 </td></tr>
                 <tr><td>Latitude: 42.465913 </td></tr>
-                <tr><td>Altitude: 211.7 ft </td></tr>
+                <tr><td>Altitude: 211.725 ft </td></tr>
                 <tr><td>Time: 2001-11-07T23:53:41Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.113574 </td></tr>
                 <tr><td>Latitude: 42.467110 </td></tr>
-                <tr><td>Altitude: 176.0 ft </td></tr>
+                <tr><td>Altitude: 176.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:02Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.110067 </td></tr>
                 <tr><td>Latitude: 42.466459 </td></tr>
-                <tr><td>Altitude: 160.0 ft </td></tr>
+                <tr><td>Altitude: 160.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:02Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.109410 </td></tr>
                 <tr><td>Latitude: 42.466557 </td></tr>
-                <tr><td>Altitude: 161.0 ft </td></tr>
+                <tr><td>Altitude: 161.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:02Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.107117 </td></tr>
                 <tr><td>Latitude: 42.463495 </td></tr>
-                <tr><td>Altitude: 205.0 ft </td></tr>
+                <tr><td>Altitude: 205.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:03Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.107360 </td></tr>
                 <tr><td>Latitude: 42.465687 </td></tr>
-                <tr><td>Altitude: 288.0 ft </td></tr>
+                <tr><td>Altitude: 288.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:03Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.106170 </td></tr>
                 <tr><td>Latitude: 42.459986 </td></tr>
-                <tr><td>Altitude: 239.3 ft </td></tr>
+                <tr><td>Altitude: 239.321 ft </td></tr>
                 <tr><td>Time: 2001-11-16T23:03:38Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.105116 </td></tr>
                 <tr><td>Latitude: 42.457616 </td></tr>
-                <tr><td>Altitude: 239.0 ft </td></tr>
+                <tr><td>Altitude: 239.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:04Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.105206 </td></tr>
                 <tr><td>Latitude: 42.453845 </td></tr>
-                <tr><td>Altitude: 218.8 ft </td></tr>
+                <tr><td>Altitude: 218.821 ft </td></tr>
                 <tr><td>Time: 2001-11-16T23:03:38Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.105413 </td></tr>
                 <tr><td>Latitude: 42.451430 </td></tr>
-                <tr><td>Altitude: 188.9 ft </td></tr>
+                <tr><td>Altitude: 188.859 ft </td></tr>
                 <tr><td>Time: 2001-11-16T23:03:38Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.106158 </td></tr>
                 <tr><td>Latitude: 42.448448 </td></tr>
-                <tr><td>Altitude: 204.0 ft </td></tr>
+                <tr><td>Altitude: 204.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:04Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.106624 </td></tr>
                 <tr><td>Latitude: 42.447804 </td></tr>
-                <tr><td>Altitude: 205.0 ft </td></tr>
+                <tr><td>Altitude: 205.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:04Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.108882 </td></tr>
                 <tr><td>Latitude: 42.444773 </td></tr>
-                <tr><td>Altitude: 206.0 ft </td></tr>
+                <tr><td>Altitude: 206.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:05Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.106301 </td></tr>
                 <tr><td>Latitude: 42.443592 </td></tr>
-                <tr><td>Altitude: 182.0 ft </td></tr>
+                <tr><td>Altitude: 182.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:27:05Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.111441 </td></tr>
                 <tr><td>Latitude: 42.442981 </td></tr>
-                <tr><td>Altitude: 210.0 ft </td></tr>
+                <tr><td>Altitude: 210.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:26:58Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.110975 </td></tr>
                 <tr><td>Latitude: 42.442196 </td></tr>
-                <tr><td>Altitude: 210.0 ft </td></tr>
+                <tr><td>Altitude: 210.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:26:55Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.113220 </td></tr>
                 <tr><td>Latitude: 42.441754 </td></tr>
-                <tr><td>Altitude: 185.0 ft </td></tr>
+                <tr><td>Altitude: 185.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:26:55Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.114456 </td></tr>
                 <tr><td>Latitude: 42.439018 </td></tr>
-                <tr><td>Altitude: 185.0 ft </td></tr>
+                <tr><td>Altitude: 185.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T03:26:55Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.113223 </td></tr>
                 <tr><td>Latitude: 42.436757 </td></tr>
-                <tr><td>Altitude: 123.4 ft </td></tr>
+                <tr><td>Altitude: 123.415 ft </td></tr>
                 <tr><td>Time: 2001-11-28T21:05:28Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.109942 </td></tr>
                 <tr><td>Latitude: 42.434980 </td></tr>
-                <tr><td>Altitude: 148.6 ft </td></tr>
+                <tr><td>Altitude: 148.647 ft </td></tr>
                 <tr><td>Time: 2001-11-07T23:53:41Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.109236 </td></tr>
                 <tr><td>Latitude: 42.431240 </td></tr>
-                <tr><td>Altitude: 87.1 ft </td></tr>
+                <tr><td>Altitude: 87.145 ft </td></tr>
                 <tr><td>Time: 2001-11-07T23:53:41Z </td></tr>
               </table>
             ]]></description>
               <table>
                 <tr><td>Longitude: -71.107628 </td></tr>
                 <tr><td>Latitude: 42.430950 </td></tr>
-                <tr><td>Altitude: 77.0 ft </td></tr>
+                <tr><td>Altitude: 77.000 ft </td></tr>
                 <tr><td>Time: 2001-06-02T00:18:15Z </td></tr>
               </table>
             ]]></description>
index 2f3a41c8de06467d2f2f87055c1d1c38e7811176..8b1d8a2c2f51142e9ad410abef6bcba2468f81a5 100644 (file)
@@ -1,64 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<kml xmlns="http://earth.google.com/kml/2.1"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="http://earth.google.com/kml/2.1 
-       http://code.google.com/apis/kml/schema/kml21.xsd">
+<kml xmlns="http://earth.google.com/kml/2.2"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Document>
     <name>GPS device</name>
-<!-- Normal route style -->
-    <Style id="route_n">
-      <IconStyle>
-        <Icon>
-          <href>http://maps.google.com/mapfiles/kml/pal4/icon61.png</href>
-        </Icon>
-      </IconStyle>
-    </Style>
-<!-- Highlighted route style -->
-    <Style id="route_h">
-      <IconStyle>
-        <scale>1.2</scale>
-        <Icon>
-          <href>http://maps.google.com/mapfiles/kml/pal4/icon61.png</href>
-        </Icon>
-      </IconStyle>
-    </Style>
-    <StyleMap id="route">
-      <Pair>
-        <key>normal</key>
-        <styleUrl>#route_n</styleUrl>
-      </Pair>
-      <Pair>
-        <key>highlight</key>
-        <styleUrl>#route_h</styleUrl>
-      </Pair>
-    </StyleMap>
-<!-- Normal track style -->
-    <Style id="track_n">
-      <IconStyle>
-        <Icon>
-          <href>http://maps.google.com/mapfiles/kml/pal4/icon60.png</href>
-        </Icon>
-      </IconStyle>
-    </Style>
-<!-- Highlighted track style -->
-    <Style id="track_h">
-      <IconStyle>
-        <scale>1.2</scale>
-        <Icon>
-          <href>http://maps.google.com/mapfiles/kml/pal4/icon60.png</href>
-        </Icon>
-      </IconStyle>
-    </Style>
-    <StyleMap id="track">
-      <Pair>
-        <key>normal</key>
-        <styleUrl>#track_n</styleUrl>
-      </Pair>
-      <Pair>
-        <key>highlight</key>
-        <styleUrl>#track_h</styleUrl>
-      </Pair>
-    </StyleMap>
 <!-- Normal waypoint style -->
     <Style id="waypoint_n">
       <IconStyle>
         <styleUrl>#waypoint_h</styleUrl>
       </Pair>
     </StyleMap>
-    <Style id="lineStyle">
-      <LineStyle>
-        <color>64eeee17</color>
-        <width>6</width>
-      </LineStyle>
-    </Style>
+    <Style id="geocache"><BalloonStyle><text><![CDATA[
+      <a href="http://www.geocaching.com"><img src="http://www.geocaching.com/images/nav/logo_sub.gif"> </a>
+      <p><a href="http://www.geocaching.com/seek/cache_details.aspx?wp=$[gc_num]"><b>$[gc_num]</b></a> <b>$[gc_name]</b> 
+      a $[gc_type], by <b>$[gc_placer]</b> [<a href="http://www.geocaching.com/profile?id=$[gc_placer_id]">profile</a>]<br/>
+      (ratings out of 5 stars. 1 is easiest, 5 is hardest)<br/>
+      Difficulty: <img src="http://www.geocaching.com/images/stars/$[gc_diff_stars].gif" alt="$[gc_diff]" width="61" height="13">
+      &nbsp;Terrain: <img src="http://www.geocaching.com/images/stars/$[gc_terr_stars].gif" alt="$[gc_terr]" width="61" height="13"><br />
+      Size: <img src="http://www.geocaching.com/images/icons/container/$[gc_cont_icon].gif" width="45" height="12">&nbsp;($[gc_cont_icon])<br />
+      $[gc_issues]
+      $[gc_short_desc]
+      $[gc_long_desc]
+    ]]></text></BalloonStyle></Style>
     <Folder>
       <name>Waypoints</name>
       <Placemark>
-        <name>GC7FA4</name>
-        <Snippet/>
-        <description>
-<![CDATA[<a href="http://www.geocaching.com/seek/cache_details.aspx?guid=727f9d2c-f080-41f1-a2c9-a326ead462ed">Points géodésiques du Québec</a>]]><![CDATA[<i> by Sverdrup2</i>]]> Virtual (1.0/1.0)<![CDATA[<p>LES COORDONÉES PUBLIÉES NE REPRÉSENTENT PAS LA LOCALISATION D'UNE CACHE
-PUBLISHED COORDINATES DO NOT REPRESENT THE LOCALIZATION OF A CACHE</p>]]>
-        </description>
+        <name>
+<![CDATA[Points géodésiques du Québec]]>
+        </name>
         <TimeStamp><when>2002-08-15T07:00:00Z</when></TimeStamp>
+        <styleUrl>#geocache</styleUrl>
         <Style>
           <IconStyle>
             <Icon>
@@ -109,17 +57,64 @@ PUBLISHED COORDINATES DO NOT REPRESENT THE LOCALIZATION OF A CACHE</p>]]>
             </Icon>
           </IconStyle>
         </Style>
+        <ExtendedData>
+          <Data name="gc_num"><value>GC7FA4</value></Data>
+          <Data name="gc_name"><value>Points géodésiques du Québec</value></Data>
+          <Data name="gc_placer"><value>Sverdrup2</value></Data>
+          <Data name="gc_placer_id"><value>6293</value></Data>
+          <Data name="gc_diff_stars"><value>stars1</value></Data>
+          <Data name="gc_terr_stars"><value>stars1</value></Data>
+          <Data name="gc_cont_icon"><value>virtual</value></Data>
+          <Data name="gc_issues"><value>          </value></Data>
+          <Data name="gc_type"><value>Locationless (Reverse) Cache</value></Data>
+          <Data name="gc_short_desc"><value><![CDATA[LES COORDONÉES PUBLIÉES NE REPRÉSENTENT PAS LA LOCALISATION D'UNE CACHE
+PUBLISHED COORDINATES DO NOT REPRESENT THE LOCALIZATION OF A CACHE]]></value></Data>
+          <Data name="gc_long_desc"><value><![CDATA[Le but de cette cache virtuelle est de trouver les points géodésiques du territoire québécois. Les points géodésiques sont faciles à identifier (capuchons de laiton au niveau du sol). Généralement, il y a un panneau de couleur orange sur un poteau à proximité du point. Sur ce panneau, le numéro du point est identifié. Aussi, la distance relative du panneau au point est indiquée. 
+<P>
+Pour inscrire votre découverte, vous devez prendre en note le NUMÉRO DU POINT(inscrit sur le point même ou au centre du panneau)LA COORDONNÉE(en format HDDD MM.MM WGS84 datum ET UTM NAD83 indiquer la zone SVP)et L'ALTITUDE RELATIVE. Si le points n'est pas visible (il se peut qu'il soit sous quelques centimètres de terre) vous pouvez prendre la coordonnée à l'emplacement du panneau SI LA PRÉCISION DE VOTRE GPS EST SUPÉRIEUR À LA DISTANCE INSCRITE SUR LE PANNEAU (ex : Précison du GPS de 5m et distance au point inscrite sur le panneau de 3m).
+<P>
+Une photo du point ou du panneau et une description générale des lieux serait aussi des informations importantes.
+<P>
+Enfin, il faudrait aussi prendre en note l'organisme propriétaire du point géodésique. Au Québec il en existe plusieurs:
+<P>
+Le Service de la géodésie du Québec, Ministère des Ressources naturelles, Québec
+<P>
+La Division des levés géodésiques, Géomatique Canada, Secteur des sciences de la terre Ressources naturelles Canada 
+<P>
+Le Service hydrographique du Canada, Direction des sciences, Pêches et Océans Canada et la Garde côtière canadienne, Pêches et Océans Canada 
+<P>
+Et tout les anciens noms de ministères et/ou organisme
+<P>
+Des photos de points de même que des panneaux suivront bientôt.
+VOUS NE POUVEZ INSCRIRE QU'UN SEUL POINT GÉODÉSIQUE (UN POINT PAR GÉOCACHEUR)
+Bonne chance!
+
+<P>
+
+The goal of this virtual cache is to find the geodetic points of Québec’s territory. The geodetic points are easy to identify (Brass cap at ground level) Generally, there is an orange panel of on a post near the point. On this panel, the number of the point is identified. Also, the distance relating from the panel to the point is also indicated. In order to log your find, you must take in note THE NUMBER OF THE POINT(registered on the point or in the center of the panel) and THE COORDINATES(in format HDDD MM.MM WGS84 datum AND UTM NAD83 indicate the zone please)and THE ALTITUDE. If the point is not visible (it may be buried under few centimetres) you can take the coordinate at the panel IF THE ACCURACY OF YOUR GPS IS HIGHER Than the DISTANCE REGISTERED ON the PANEL. (Ex: accuracy of the GPS is 5m and the distance to the point registered on the panel is 3m). 
+ <P>
+A picture of the point or panel and a general description of the places would be also significant information. Finally, it would also be important to take in note the organization owner of the geodetic point. 
+In Quebec there are several: 
+<P>
+The "Service de la géodésie du Québec, Ministère des Ressources naturelles Québec"
+The Geodetic Survey Division, Geomatics Canada, Earth Sciences Sector, Natural Resources Canada 
+The Canadian Hydrographic Service, Sciences Directorate, Fisheries and Oceans Canada and the Canadian Coast Guard, Fisheries and Oceans Canada
+And all old names of ministries and/or organization
+<P>
+
+PICTURES of points and of the panels will follow soon. YOU CAN ONLY LOG ONE POINT (ONE POINT PER GEOCACHER)
+Good luck!]]></value></Data>
+        </ExtendedData>
         <Point>
           <coordinates>-73.000000,46.133333,0.000000</coordinates>
         </Point>
       </Placemark>
       <Placemark>
-        <name>GCGCA8</name>
-        <Snippet/>
-        <description>
-<![CDATA[<a href="http://www.geocaching.com/seek/cache_details.aspx?guid=cda94cd6-d657-49bd-8e7e-0031ef1b2613">Oozy rat in a sanitary zoo</a>]]><![CDATA[<i> by robertlipe</i>]]> Unknown (3.0/2.0)<![CDATA[<p>The cache is not at the coordinates above.   These coords will get you to the correct park and within 1/2 mile of the cache.  The cache is within 35 feet of the trail.   It is not handicapped accessible.   It is a nice walk in the woods that is practical for all ages.  There is no space in the container for trading items.   You should bring a writing stick and bug spray is recommended.</p>]]>
-        </description>
+        <name>
+<![CDATA[Oozy rat in a sanitary zoo]]>
+        </name>
         <TimeStamp><when>2003-06-29T07:00:00Z</when></TimeStamp>
+        <styleUrl>#geocache</styleUrl>
         <Style>
           <IconStyle>
             <Icon>
@@ -127,6 +122,34 @@ PUBLISHED COORDINATES DO NOT REPRESENT THE LOCALIZATION OF A CACHE</p>]]>
             </Icon>
           </IconStyle>
         </Style>
+        <ExtendedData>
+          <Data name="gc_num"><value>GCGCA8</value></Data>
+          <Data name="gc_name"><value>Oozy rat in a sanitary zoo</value></Data>
+          <Data name="gc_placer"><value>robertlipe</value></Data>
+          <Data name="gc_placer_id"><value>32733</value></Data>
+          <Data name="gc_diff_stars"><value>stars3</value></Data>
+          <Data name="gc_terr_stars"><value>stars2</value></Data>
+          <Data name="gc_cont_icon"><value>not_chosen</value></Data>
+          <Data name="gc_issues"><value>          </value></Data>
+          <Data name="gc_type"><value>Unknown Cache</value></Data>
+          <Data name="gc_short_desc"><value><![CDATA[The cache is not at the coordinates above.   These coords will get you to the correct park and within 1/2 mile of the cache.  The cache is within 35 feet of the trail.   It is not handicapped accessible.   It is a nice walk in the woods that is practical for all ages.  There is no space in the container for trading items.   You should bring a writing stick and bug spray is recommended.]]></value></Data>
+          <Data name="gc_long_desc"><value><![CDATA[So if the cache isn't at the above coordinates, where is it?  
+
+<ul>
+
+<li>Too bad I hid a boot
+<li>Too hot to hoot
+<li>Never odd or even
+<li>Do geese see God?
+<li>"Do nine men interpret?" "Nine men," I nod
+<li>Rats live on no evil star
+<li>Go hang a salami, I'm a lasagna hog
+</ul>
+
+Now that it's intuitively obvious to even the most casual observer where the cache is, turn on your geo-mojo and go find it.
+<br>
+<img SRC="http://www.mtgc.org/mtgc_member-banner.gif" WIDTH="500" HEIGHT="40" ALT="Member of Middle Tennessee GeoCachers Club [www.mtgc.org]" BORDER="0"></a></p>]]></value></Data>
+        </ExtendedData>
         <Point>
           <coordinates>-86.861667,35.921667,0.000000</coordinates>
         </Point>
diff --git a/reference/exif-dat.csv b/reference/exif-dat.csv
new file mode 100644 (file)
index 0000000..47edcdb
--- /dev/null
@@ -0,0 +1,2 @@
+No,Latitude,Longitude,Name,Speed,Satellites,Date,Time\r
+1,44.315150,15.265690,"IMG_2065",0.0,4,2006/05/21,20:46:58\r
index 2b1591ddf3d771960db65db44e6e56a8438cb6dd..67f49e0a50954240244fbbc5d4aa528e3f956a57 100644 (file)
@@ -148,69 +148,69 @@ Header    Name    Start Time      Elapsed Time    Length  Average Speed   Link
 \r
 Track  - Trk from .gpx file    25/05/2002 17:06:21     1:59:36 7.7 km  4 kph   \r
 \r
-Header Position        Time    Altitude        Depth   Leg Length      Leg Time        Leg Speed       Leg Course\r
+Header Position        Time    Altitude        Depth   Temperature     Leg Length      Leg Time        Leg Speed       Leg Course\r
 \r
-Trackpoint     N30 03.731 W91 36.620   25/05/2002 17:06:21     1 m     0.0 m\r
-Trackpoint     N30 03.767 W91 36.633   25/05/2002 17:09:55             0.0 m   70 m    0:03:34 1.2 kph 343° true\r
-Trackpoint     N30 03.762 W91 36.495   25/05/2002 17:12:00             0.0 m   222 m   0:02:05 6 kph   92° true\r
-Trackpoint     N30 03.740 W91 36.442   25/05/2002 17:12:48             0.0 m   94 m    0:00:48 7 kph   116° true\r
-Trackpoint     N30 03.692 W91 36.316   25/05/2002 17:14:41             0.0 m   221 m   0:01:53 7 kph   114° true\r
-Trackpoint     N30 03.587 W91 35.963   25/05/2002 17:17:16             0.0 m   599 m   0:02:35 14 kph  109° true\r
-Trackpoint     N30 03.468 W91 35.800   25/05/2002 17:17:46             0.0 m   342 m   0:00:30 41 kph  130° true\r
-Trackpoint     N30 03.323 W91 35.693   25/05/2002 17:18:20             0.0 m   319 m   0:00:34 34 kph  147° true\r
-Trackpoint     N30 03.233 W91 35.556   25/05/2002 17:19:01             0.0 m   276 m   0:00:41 24 kph  127° true\r
-Trackpoint     N30 02.984 W91 35.384   25/05/2002 17:20:46             0.0 m   538 m   0:01:45 18 kph  149° true\r
-Trackpoint     N30 02.941 W91 35.392   25/05/2002 17:21:10             0.0 m   81 m    0:00:24 12 kph  189° true\r
-Trackpoint     N30 02.928 W91 35.575   25/05/2002 17:21:51             0.0 m   295 m   0:00:41 26 kph  265° true\r
-Trackpoint     N30 02.774 W91 35.786   25/05/2002 17:22:35             0.0 m   443 m   0:00:44 36 kph  230° true\r
-Trackpoint     N30 02.731 W91 35.922   25/05/2002 17:23:08             0.0 m   233 m   0:00:33 25 kph  250° true\r
-Trackpoint     N30 02.838 W91 36.015   25/05/2002 18:04:23             0.0 m   248 m   0:41:15 0.4 kph 323° true\r
-Trackpoint     N30 02.820 W91 35.977   25/05/2002 18:06:04     2 m     0.0 m   70 m    0:01:41 2 kph   119° true\r
-Trackpoint     N30 02.786 W91 35.967   25/05/2002 18:07:06             0.0 m   65 m    0:01:02 4 kph   166° true\r
-Trackpoint     N30 02.772 W91 35.936   25/05/2002 18:08:18     1 m     0.0 m   56 m    0:01:12 3 kph   117° true\r
-Trackpoint     N30 02.782 W91 35.863   25/05/2002 18:10:20             0.0 m   119 m   0:02:02 4 kph   81° true\r
-Trackpoint     N30 02.781 W91 35.829   25/05/2002 18:11:09             0.0 m   55 m    0:00:49 4 kph   92° true\r
-Trackpoint     N30 02.807 W91 35.779   25/05/2002 18:12:18             0.0 m   94 m    0:01:09 5 kph   59° true\r
-Trackpoint     N30 02.847 W91 35.711   25/05/2002 18:14:22             0.0 m   132 m   0:02:04 4 kph   56° true\r
-Trackpoint     N30 02.868 W91 35.685   25/05/2002 18:15:04     2 m     0.0 m   57 m    0:00:42 5 kph   47° true\r
-Trackpoint     N30 02.895 W91 35.644   25/05/2002 18:16:14     1 m     0.0 m   83 m    0:01:10 4 kph   53° true\r
-Trackpoint     N30 02.921 W91 35.627   25/05/2002 18:17:01     1 m     0.0 m   55 m    0:00:47 4 kph   30° true\r
-Trackpoint     N30 02.961 W91 35.630   25/05/2002 18:18:07             0.0 m   74 m    0:01:06 4 kph   356° true\r
-Trackpoint     N30 03.019 W91 35.638   25/05/2002 18:19:51     2 m     0.0 m   108 m   0:01:44 4 kph   353° true\r
-Trackpoint     N30 03.047 W91 35.646   25/05/2002 18:20:39             0.0 m   53 m    0:00:48 4 kph   346° true\r
-Trackpoint     N30 03.074 W91 35.661   25/05/2002 18:21:24             0.0 m   56 m    0:00:45 4 kph   334° true\r
-Trackpoint     N30 03.108 W91 35.661   25/05/2002 18:22:17             0.0 m   63 m    0:00:53 4 kph   0° true\r
-Trackpoint     N30 03.133 W91 35.679   25/05/2002 18:23:18             0.0 m   55 m    0:01:01 3 kph   328° true\r
-Trackpoint     N30 03.181 W91 35.680   25/05/2002 18:24:37             0.0 m   89 m    0:01:19 4 kph   359° true\r
-Trackpoint     N30 03.292 W91 35.711   25/05/2002 18:28:13     6 m     0.0 m   212 m   0:03:36 4 kph   346° true\r
-Trackpoint     N30 03.224 W91 35.695   25/05/2002 18:31:36     2 m     0.0 m   129 m   0:03:23 2 kph   168° true\r
-Trackpoint     N30 03.191 W91 35.686   25/05/2002 18:32:56             0.0 m   63 m    0:01:20 3 kph   167° true\r
-Trackpoint     N30 03.158 W91 35.689   25/05/2002 18:34:02             0.0 m   61 m    0:01:06 3 kph   184° true\r
-Trackpoint     N30 03.147 W91 35.725   25/05/2002 18:36:03             0.0 m   61 m    0:02:01 2 kph   251° true\r
-Trackpoint     N30 03.149 W91 35.757   25/05/2002 18:36:48             0.0 m   52 m    0:00:45 4 kph   274° true\r
-Trackpoint     N30 03.159 W91 35.806   25/05/2002 18:37:52     1 m     0.0 m   81 m    0:01:04 5 kph   283° true\r
-Trackpoint     N30 03.188 W91 35.870   25/05/2002 18:39:18             0.0 m   116 m   0:01:26 5 kph   298° true\r
-Trackpoint     N30 03.217 W91 35.877   25/05/2002 18:40:15             0.0 m   55 m    0:00:57 3 kph   348° true\r
-Trackpoint     N30 03.238 W91 35.865   25/05/2002 18:41:25     6 m     0.0 m   43 m    0:01:10 2 kph   26° true\r
-Trackpoint     N30 03.217 W91 35.884   25/05/2002 18:42:37             0.0 m   49 m    0:01:12 2 kph   218° true\r
-Trackpoint     N30 03.192 W91 35.874   25/05/2002 18:44:01             0.0 m   49 m    0:01:24 2 kph   161° true\r
-Trackpoint     N30 03.169 W91 35.850   25/05/2002 18:45:53             0.0 m   57 m    0:01:52 2 kph   138° true\r
-Trackpoint     N30 03.154 W91 35.815   25/05/2002 18:46:54             0.0 m   63 m    0:01:01 4 kph   116° true\r
-Trackpoint     N30 03.140 W91 35.785   25/05/2002 18:47:42             0.0 m   55 m    0:00:48 4 kph   118° true\r
-Trackpoint     N30 03.135 W91 35.740   25/05/2002 18:48:41             0.0 m   73 m    0:00:59 4 kph   97° true\r
-Trackpoint     N30 03.133 W91 35.700   25/05/2002 18:49:52             0.0 m   64 m    0:01:11 3 kph   93° true\r
-Trackpoint     N30 03.113 W91 35.681   25/05/2002 18:50:49             0.0 m   48 m    0:00:57 3 kph   141° true\r
-Trackpoint     N30 03.063 W91 35.663   25/05/2002 18:52:14             0.0 m   97 m    0:01:25 4 kph   163° true\r
-Trackpoint     N30 03.034 W91 35.653   25/05/2002 18:52:56             0.0 m   56 m    0:00:42 5 kph   163° true\r
-Trackpoint     N30 03.011 W91 35.645   25/05/2002 18:53:38             0.0 m   45 m    0:00:42 4 kph   163° true\r
-Trackpoint     N30 02.946 W91 35.622   25/05/2002 18:55:11             0.0 m   126 m   0:01:33 5 kph   163° true\r
-Trackpoint     N30 02.907 W91 35.654   25/05/2002 18:56:32             0.0 m   89 m    0:01:21 4 kph   215° true\r
-Trackpoint     N30 02.885 W91 35.684   25/05/2002 18:57:24             0.0 m   63 m    0:00:52 4 kph   230° true\r
-Trackpoint     N30 02.850 W91 35.726   25/05/2002 18:58:40     7 m     0.0 m   94 m    0:01:16 4 kph   226° true\r
-Trackpoint     N30 02.824 W91 35.759   25/05/2002 18:59:28             0.0 m   72 m    0:00:48 5 kph   228° true\r
-Trackpoint     N30 02.798 W91 35.795   25/05/2002 19:00:22             0.0 m   75 m    0:00:54 5 kph   230° true\r
-Trackpoint     N30 02.784 W91 35.858   25/05/2002 19:01:41             0.0 m   105 m   0:01:19 5 kph   256° true\r
-Trackpoint     N30 02.774 W91 35.907   25/05/2002 19:02:48             0.0 m   81 m    0:01:07 4 kph   257° true\r
-Trackpoint     N30 02.779 W91 35.937   25/05/2002 19:03:43             0.0 m   49 m    0:00:55 3 kph   281° true\r
-Trackpoint     N30 02.807 W91 35.956   25/05/2002 19:04:49             0.0 m   60 m    0:01:06 3 kph   330° true\r
-Trackpoint     N30 02.828 W91 35.979   25/05/2002 19:05:57             0.0 m   54 m    0:01:08 3 kph   317° true\r
+Trackpoint     N30 03.731 W91 36.620   25/05/2002 17:06:21     1 m     \r
+Trackpoint     N30 03.767 W91 36.633   25/05/2002 17:09:55                             70 m    0:03:34 1.2 kph 343° true\r
+Trackpoint     N30 03.762 W91 36.495   25/05/2002 17:12:00                             222 m   0:02:05 6 kph   92° true\r
+Trackpoint     N30 03.740 W91 36.442   25/05/2002 17:12:48                             94 m    0:00:48 7 kph   116° true\r
+Trackpoint     N30 03.692 W91 36.316   25/05/2002 17:14:41                             221 m   0:01:53 7 kph   114° true\r
+Trackpoint     N30 03.587 W91 35.963   25/05/2002 17:17:16                             599 m   0:02:35 14 kph  109° true\r
+Trackpoint     N30 03.468 W91 35.800   25/05/2002 17:17:46                             342 m   0:00:30 41 kph  130° true\r
+Trackpoint     N30 03.323 W91 35.693   25/05/2002 17:18:20                             319 m   0:00:34 34 kph  147° true\r
+Trackpoint     N30 03.233 W91 35.556   25/05/2002 17:19:01                             276 m   0:00:41 24 kph  127° true\r
+Trackpoint     N30 02.984 W91 35.384   25/05/2002 17:20:46                             538 m   0:01:45 18 kph  149° true\r
+Trackpoint     N30 02.941 W91 35.392   25/05/2002 17:21:10                             81 m    0:00:24 12 kph  189° true\r
+Trackpoint     N30 02.928 W91 35.575   25/05/2002 17:21:51                             295 m   0:00:41 26 kph  265° true\r
+Trackpoint     N30 02.774 W91 35.786   25/05/2002 17:22:35                             443 m   0:00:44 36 kph  230° true\r
+Trackpoint     N30 02.731 W91 35.922   25/05/2002 17:23:08                             233 m   0:00:33 25 kph  250° true\r
+Trackpoint     N30 02.838 W91 36.015   25/05/2002 18:04:23                             248 m   0:41:15 0.4 kph 323° true\r
+Trackpoint     N30 02.820 W91 35.977   25/05/2002 18:06:04     2 m                     70 m    0:01:41 2 kph   119° true\r
+Trackpoint     N30 02.786 W91 35.967   25/05/2002 18:07:06                             65 m    0:01:02 4 kph   166° true\r
+Trackpoint     N30 02.772 W91 35.936   25/05/2002 18:08:18     1 m                     56 m    0:01:12 3 kph   117° true\r
+Trackpoint     N30 02.782 W91 35.863   25/05/2002 18:10:20                             119 m   0:02:02 4 kph   81° true\r
+Trackpoint     N30 02.781 W91 35.829   25/05/2002 18:11:09                             55 m    0:00:49 4 kph   92° true\r
+Trackpoint     N30 02.807 W91 35.779   25/05/2002 18:12:18                             94 m    0:01:09 5 kph   59° true\r
+Trackpoint     N30 02.847 W91 35.711   25/05/2002 18:14:22                             132 m   0:02:04 4 kph   56° true\r
+Trackpoint     N30 02.868 W91 35.685   25/05/2002 18:15:04     2 m                     57 m    0:00:42 5 kph   47° true\r
+Trackpoint     N30 02.895 W91 35.644   25/05/2002 18:16:14     1 m                     83 m    0:01:10 4 kph   53° true\r
+Trackpoint     N30 02.921 W91 35.627   25/05/2002 18:17:01     1 m                     55 m    0:00:47 4 kph   30° true\r
+Trackpoint     N30 02.961 W91 35.630   25/05/2002 18:18:07                             74 m    0:01:06 4 kph   356° true\r
+Trackpoint     N30 03.019 W91 35.638   25/05/2002 18:19:51     2 m                     108 m   0:01:44 4 kph   353° true\r
+Trackpoint     N30 03.047 W91 35.646   25/05/2002 18:20:39                             53 m    0:00:48 4 kph   346° true\r
+Trackpoint     N30 03.074 W91 35.661   25/05/2002 18:21:24                             56 m    0:00:45 4 kph   334° true\r
+Trackpoint     N30 03.108 W91 35.661   25/05/2002 18:22:17                             63 m    0:00:53 4 kph   360° true\r
+Trackpoint     N30 03.133 W91 35.679   25/05/2002 18:23:18                             55 m    0:01:01 3 kph   328° true\r
+Trackpoint     N30 03.181 W91 35.680   25/05/2002 18:24:37                             89 m    0:01:19 4 kph   359° true\r
+Trackpoint     N30 03.292 W91 35.711   25/05/2002 18:28:13     6 m                     212 m   0:03:36 4 kph   346° true\r
+Trackpoint     N30 03.224 W91 35.695   25/05/2002 18:31:36     2 m                     129 m   0:03:23 2 kph   168° true\r
+Trackpoint     N30 03.191 W91 35.686   25/05/2002 18:32:56                             63 m    0:01:20 3 kph   167° true\r
+Trackpoint     N30 03.158 W91 35.689   25/05/2002 18:34:02                             61 m    0:01:06 3 kph   184° true\r
+Trackpoint     N30 03.147 W91 35.725   25/05/2002 18:36:03                             61 m    0:02:01 2 kph   251° true\r
+Trackpoint     N30 03.149 W91 35.757   25/05/2002 18:36:48                             52 m    0:00:45 4 kph   274° true\r
+Trackpoint     N30 03.159 W91 35.806   25/05/2002 18:37:52     1 m                     81 m    0:01:04 5 kph   283° true\r
+Trackpoint     N30 03.188 W91 35.870   25/05/2002 18:39:18                             116 m   0:01:26 5 kph   298° true\r
+Trackpoint     N30 03.217 W91 35.877   25/05/2002 18:40:15                             55 m    0:00:57 3 kph   348° true\r
+Trackpoint     N30 03.238 W91 35.865   25/05/2002 18:41:25     6 m                     43 m    0:01:10 2 kph   26° true\r
+Trackpoint     N30 03.217 W91 35.884   25/05/2002 18:42:37                             49 m    0:01:12 2 kph   218° true\r
+Trackpoint     N30 03.192 W91 35.874   25/05/2002 18:44:01                             49 m    0:01:24 2 kph   161° true\r
+Trackpoint     N30 03.169 W91 35.850   25/05/2002 18:45:53                             57 m    0:01:52 2 kph   138° true\r
+Trackpoint     N30 03.154 W91 35.815   25/05/2002 18:46:54                             63 m    0:01:01 4 kph   116° true\r
+Trackpoint     N30 03.140 W91 35.785   25/05/2002 18:47:42                             55 m    0:00:48 4 kph   118° true\r
+Trackpoint     N30 03.135 W91 35.740   25/05/2002 18:48:41                             73 m    0:00:59 4 kph   97° true\r
+Trackpoint     N30 03.133 W91 35.700   25/05/2002 18:49:52                             64 m    0:01:11 3 kph   93° true\r
+Trackpoint     N30 03.113 W91 35.681   25/05/2002 18:50:49                             48 m    0:00:57 3 kph   141° true\r
+Trackpoint     N30 03.063 W91 35.663   25/05/2002 18:52:14                             97 m    0:01:25 4 kph   163° true\r
+Trackpoint     N30 03.034 W91 35.653   25/05/2002 18:52:56                             56 m    0:00:42 5 kph   163° true\r
+Trackpoint     N30 03.011 W91 35.645   25/05/2002 18:53:38                             45 m    0:00:42 4 kph   163° true\r
+Trackpoint     N30 02.946 W91 35.622   25/05/2002 18:55:11                             126 m   0:01:33 5 kph   163° true\r
+Trackpoint     N30 02.907 W91 35.654   25/05/2002 18:56:32                             89 m    0:01:21 4 kph   215° true\r
+Trackpoint     N30 02.885 W91 35.684   25/05/2002 18:57:24                             63 m    0:00:52 4 kph   230° true\r
+Trackpoint     N30 02.850 W91 35.726   25/05/2002 18:58:40     7 m                     94 m    0:01:16 4 kph   226° true\r
+Trackpoint     N30 02.824 W91 35.759   25/05/2002 18:59:28                             72 m    0:00:48 5 kph   228° true\r
+Trackpoint     N30 02.798 W91 35.795   25/05/2002 19:00:22                             75 m    0:00:54 5 kph   230° true\r
+Trackpoint     N30 02.784 W91 35.858   25/05/2002 19:01:41                             105 m   0:01:19 5 kph   256° true\r
+Trackpoint     N30 02.774 W91 35.907   25/05/2002 19:02:48                             81 m    0:01:07 4 kph   257° true\r
+Trackpoint     N30 02.779 W91 35.937   25/05/2002 19:03:43                             49 m    0:00:55 3 kph   281° true\r
+Trackpoint     N30 02.807 W91 35.956   25/05/2002 19:04:49                             60 m    0:01:06 3 kph   330° true\r
+Trackpoint     N30 02.828 W91 35.979   25/05/2002 19:05:57                             54 m    0:01:08 3 kph   317° true\r
index 405581524442c58ec76eac89aca1e06db96726da..dae88c25be40f0fb9f12ed52ea036fbeda4eb0d6 100644 (file)
@@ -50,47 +50,47 @@ Header      Name    Start Time      Elapsed Time    Length  Average Speed   Link
 \r
 Track  ACTIVE LOG 006  01/05/2005 15:02:47     0:33:09 653 m   1.2 kph \r
 \r
-Header Position        Time    Altitude        Depth   Leg Length      Leg Time        Leg Speed       Leg Course\r
+Header Position        Time    Altitude        Depth   Temperature     Leg Length      Leg Time        Leg Speed       Leg Course\r
 \r
 Trackpoint     N51 18.776294924 E12 24.789910130       01/05/2005 15:02:47     161 m   0.0 m\r
-Trackpoint     N51 18.772960603 E12 24.794909097       01/05/2005 15:03:25     154 m   0.0 m   8 m     0:00:38 0.8 kph 137° true\r
-Trackpoint     N51 18.771295957 E12 24.794909097       01/05/2005 15:03:39     148 m   0.0 m   3 m     0:00:14 0.8 kph 180° true\r
-Trackpoint     N51 18.769626282 E12 24.798243418       01/05/2005 15:04:16     139 m   0.0 m   5 m     0:00:37 0.5 kph 129° true\r
-Trackpoint     N51 18.769626282 E12 24.796573743       01/05/2005 15:05:02     145 m   0.0 m   2 m     0:00:46 0.2 kph 270° true\r
-Trackpoint     N51 18.769626282 E12 24.798243418       01/05/2005 15:05:45     134 m   0.0 m   2 m     0:00:43 0.2 kph 90° true\r
-Trackpoint     N51 18.766296990 E12 24.799908064       01/05/2005 15:06:44     131 m   0.0 m   6 m     0:00:59 0.4 kph 163° true\r
-Trackpoint     N51 18.766296990 E12 24.799908064       01/05/2005 15:07:50     130 m   0.0 m   0 m     0:01:06 0 kph   0° true\r
-Trackpoint     N51 18.764627315 E12 24.799908064       01/05/2005 15:08:19     132 m   0.0 m   3 m     0:00:29 0.4 kph 180° true\r
-Trackpoint     N51 18.767961636 E12 24.798243418       01/05/2005 15:11:16     144 m   0.0 m   6 m     0:02:57 0.1 kph 343° true\r
-Trackpoint     N51 18.774630278 E12 24.806576706       01/05/2005 15:12:34     147 m   0.0 m   16 m    0:01:18 0.7 kph 38° true\r
-Trackpoint     N51 18.779629245 E12 24.828242250       01/05/2005 15:13:18     145 m   0.0 m   27 m    0:00:44 2 kph   70° true\r
-Trackpoint     N51 18.782963566 E12 24.828242250       01/05/2005 15:13:27     145 m   0.0 m   6 m     0:00:09 2 kph   0° true\r
-Trackpoint     N51 18.782963566 E12 24.829906896       01/05/2005 15:13:37     135 m   0.0 m   2 m     0:00:10 0.7 kph 90° true\r
-Trackpoint     N51 18.786292858 E12 24.829906896       01/05/2005 15:13:46     135 m   0.0 m   6 m     0:00:09 2 kph   0° true\r
-Trackpoint     N51 18.792961501 E12 24.833241217       01/05/2005 15:14:03     136 m   0.0 m   13 m    0:00:17 3 kph   17° true\r
-Trackpoint     N51 18.797960468 E12 24.838240184       01/05/2005 15:14:16     135 m   0.0 m   11 m    0:00:13 3 kph   32° true\r
-Trackpoint     N51 18.796295822 E12 24.843239151       01/05/2005 15:14:26     139 m   0.0 m   7 m     0:00:10 2 kph   118° true\r
-Trackpoint     N51 18.796295822 E12 24.846573472       01/05/2005 15:14:30     139 m   0.0 m   4 m     0:00:04 3 kph   90° true\r
-Trackpoint     N51 18.782963566 E12 24.876572303       01/05/2005 15:15:06     141 m   0.0 m   43 m    0:00:36 4 kph   125° true\r
-Trackpoint     N51 18.777959570 E12 24.889909588       01/05/2005 15:15:27     140 m   0.0 m   18 m    0:00:21 3 kph   121° true\r
-Trackpoint     N51 18.774630278 E12 24.896573201       01/05/2005 15:15:39     140 m   0.0 m   10 m    0:00:12 3 kph   129° true\r
-Trackpoint     N51 18.776294924 E12 24.898242876       01/05/2005 15:25:31     152 m   0.0 m   4 m     0:09:52 0.0 kph 32° true\r
-Trackpoint     N51 18.776294924 E12 24.898242876       01/05/2005 15:25:40     152 m   0.0 m   0 m     0:00:09 0 kph   0° true\r
-Trackpoint     N51 18.777959570 E12 24.896573201       01/05/2005 15:29:18     155 m   0.0 m   4 m     0:03:38 0.1 kph 328° true\r
-Trackpoint     N51 18.789627180 E12 24.874907658       01/05/2005 15:30:30     149 m   0.0 m   33 m    0:01:12 2 kph   311° true\r
-Trackpoint     N51 18.789627180 E12 24.873243012       01/05/2005 15:30:37     150 m   0.0 m   2 m     0:00:07 1.0 kph 270° true\r
-Trackpoint     N51 18.789627180 E12 24.866574369       01/05/2005 15:30:47     151 m   0.0 m   8 m     0:00:10 3 kph   270° true\r
-Trackpoint     N51 18.789627180 E12 24.863240048       01/05/2005 15:30:48     151 m   0.0 m   4 m     0:00:01 14 kph  270° true\r
-Trackpoint     N51 18.799630143 E12 24.834905863       01/05/2005 15:30:52     150 m   0.0 m   38 m    0:00:04 34 kph  299° true\r
-Trackpoint     N51 18.821295686 E12 24.799908064       01/05/2005 15:30:57     150 m   0.0 m   57 m    0:00:05 41 kph  315° true\r
-Trackpoint     N51 18.839626908 E12 24.771573879       01/05/2005 15:31:03     150 m   0.0 m   47 m    0:00:06 28 kph  316° true\r
-Trackpoint     N51 18.852959163 E12 24.749908336       01/05/2005 15:31:10     150 m   0.0 m   35 m    0:00:07 18 kph  315° true\r
-Trackpoint     N51 18.877959028 E12 24.573239610       01/05/2005 15:32:38     143 m   0.0 m   210 m   0:01:28 9 kph   283° true\r
-Trackpoint     N51 18.877959028 E12 24.569910318       01/05/2005 15:32:45     141 m   0.0 m   4 m     0:00:07 2 kph   270° true\r
-Trackpoint     N51 18.877959028 E12 24.569910318       01/05/2005 15:33:17     143 m   0.0 m   0 m     0:00:32 0 kph   0° true\r
-Trackpoint     N51 18.877959028 E12 24.566575997       01/05/2005 15:33:42     139 m   0.0 m   4 m     0:00:25 0.6 kph 270° true\r
-Trackpoint     N51 18.877959028 E12 24.561572000       01/05/2005 15:33:54     139 m   0.0 m   6 m     0:00:12 2 kph   270° true\r
-Trackpoint     N51 18.877959028 E12 24.561572000       01/05/2005 15:34:04     138 m   0.0 m   0 m     0:00:10 0 kph   0° true\r
-Trackpoint     N51 18.877959028 E12 24.561572000       01/05/2005 15:34:20     139 m   0.0 m   0 m     0:00:16 0 kph   0° true\r
-Trackpoint     N51 18.877959028 E12 24.561572000       01/05/2005 15:35:45     144 m   0.0 m   0 m     0:01:25 0 kph   0° true\r
-Trackpoint     N51 18.877959028 E12 24.561572000       01/05/2005 15:35:56     145 m   0.0 m   0 m     0:00:11 0 kph   0° true\r
+Trackpoint     N51 18.772960603 E12 24.794909097       01/05/2005 15:03:25     154 m   0.0 m           8 m     0:00:38 0.8 kph 137° true\r
+Trackpoint     N51 18.771295957 E12 24.794909097       01/05/2005 15:03:39     148 m   0.0 m           3 m     0:00:14 0.8 kph 180° true\r
+Trackpoint     N51 18.769626282 E12 24.798243418       01/05/2005 15:04:16     139 m   0.0 m           5 m     0:00:37 0.5 kph 129° true\r
+Trackpoint     N51 18.769626282 E12 24.796573743       01/05/2005 15:05:02     145 m   0.0 m           2 m     0:00:46 0.2 kph 270° true\r
+Trackpoint     N51 18.769626282 E12 24.798243418       01/05/2005 15:05:45     134 m   0.0 m           2 m     0:00:43 0.2 kph 90° true\r
+Trackpoint     N51 18.766296990 E12 24.799908064       01/05/2005 15:06:44     131 m   0.0 m           6 m     0:00:59 0.4 kph 163° true\r
+Trackpoint     N51 18.766296990 E12 24.799908064       01/05/2005 15:07:50     130 m   0.0 m           0 m     0:01:06 0 kph   0° true\r
+Trackpoint     N51 18.764627315 E12 24.799908064       01/05/2005 15:08:19     132 m   0.0 m           3 m     0:00:29 0.4 kph 180° true\r
+Trackpoint     N51 18.767961636 E12 24.798243418       01/05/2005 15:11:16     144 m   0.0 m           6 m     0:02:57 0.1 kph 343° true\r
+Trackpoint     N51 18.774630278 E12 24.806576706       01/05/2005 15:12:34     147 m   0.0 m           16 m    0:01:18 0.7 kph 38° true\r
+Trackpoint     N51 18.779629245 E12 24.828242250       01/05/2005 15:13:18     145 m   0.0 m           27 m    0:00:44 2 kph   70° true\r
+Trackpoint     N51 18.782963566 E12 24.828242250       01/05/2005 15:13:27     145 m   0.0 m           6 m     0:00:09 2 kph   0° true\r
+Trackpoint     N51 18.782963566 E12 24.829906896       01/05/2005 15:13:37     135 m   0.0 m           2 m     0:00:10 0.7 kph 90° true\r
+Trackpoint     N51 18.786292858 E12 24.829906896       01/05/2005 15:13:46     135 m   0.0 m           6 m     0:00:09 2 kph   0° true\r
+Trackpoint     N51 18.792961501 E12 24.833241217       01/05/2005 15:14:03     136 m   0.0 m           13 m    0:00:17 3 kph   17° true\r
+Trackpoint     N51 18.797960468 E12 24.838240184       01/05/2005 15:14:16     135 m   0.0 m           11 m    0:00:13 3 kph   32° true\r
+Trackpoint     N51 18.796295822 E12 24.843239151       01/05/2005 15:14:26     139 m   0.0 m           7 m     0:00:10 2 kph   118° true\r
+Trackpoint     N51 18.796295822 E12 24.846573472       01/05/2005 15:14:30     139 m   0.0 m           4 m     0:00:04 3 kph   90° true\r
+Trackpoint     N51 18.782963566 E12 24.876572303       01/05/2005 15:15:06     141 m   0.0 m           43 m    0:00:36 4 kph   125° true\r
+Trackpoint     N51 18.777959570 E12 24.889909588       01/05/2005 15:15:27     140 m   0.0 m           18 m    0:00:21 3 kph   121° true\r
+Trackpoint     N51 18.774630278 E12 24.896573201       01/05/2005 15:15:39     140 m   0.0 m           10 m    0:00:12 3 kph   129° true\r
+Trackpoint     N51 18.776294924 E12 24.898242876       01/05/2005 15:25:31     152 m   0.0 m           4 m     0:09:52 0.0 kph 32° true\r
+Trackpoint     N51 18.776294924 E12 24.898242876       01/05/2005 15:25:40     152 m   0.0 m           0 m     0:00:09 0 kph   0° true\r
+Trackpoint     N51 18.777959570 E12 24.896573201       01/05/2005 15:29:18     155 m   0.0 m           4 m     0:03:38 0.1 kph 328° true\r
+Trackpoint     N51 18.789627180 E12 24.874907658       01/05/2005 15:30:30     149 m   0.0 m           33 m    0:01:12 2 kph   311° true\r
+Trackpoint     N51 18.789627180 E12 24.873243012       01/05/2005 15:30:37     150 m   0.0 m           2 m     0:00:07 1.0 kph 270° true\r
+Trackpoint     N51 18.789627180 E12 24.866574369       01/05/2005 15:30:47     151 m   0.0 m           8 m     0:00:10 3 kph   270° true\r
+Trackpoint     N51 18.789627180 E12 24.863240048       01/05/2005 15:30:48     151 m   0.0 m           4 m     0:00:01 14 kph  270° true\r
+Trackpoint     N51 18.799630143 E12 24.834905863       01/05/2005 15:30:52     150 m   0.0 m           38 m    0:00:04 34 kph  299° true\r
+Trackpoint     N51 18.821295686 E12 24.799908064       01/05/2005 15:30:57     150 m   0.0 m           57 m    0:00:05 41 kph  315° true\r
+Trackpoint     N51 18.839626908 E12 24.771573879       01/05/2005 15:31:03     150 m   0.0 m           47 m    0:00:06 28 kph  316° true\r
+Trackpoint     N51 18.852959163 E12 24.749908336       01/05/2005 15:31:10     150 m   0.0 m           35 m    0:00:07 18 kph  315° true\r
+Trackpoint     N51 18.877959028 E12 24.573239610       01/05/2005 15:32:38     143 m   0.0 m           210 m   0:01:28 9 kph   283° true\r
+Trackpoint     N51 18.877959028 E12 24.569910318       01/05/2005 15:32:45     141 m   0.0 m           4 m     0:00:07 2 kph   270° true\r
+Trackpoint     N51 18.877959028 E12 24.569910318       01/05/2005 15:33:17     143 m   0.0 m           0 m     0:00:32 0 kph   0° true\r
+Trackpoint     N51 18.877959028 E12 24.566575997       01/05/2005 15:33:42     139 m   0.0 m           4 m     0:00:25 0.6 kph 270° true\r
+Trackpoint     N51 18.877959028 E12 24.561572000       01/05/2005 15:33:54     139 m   0.0 m           6 m     0:00:12 2 kph   270° true\r
+Trackpoint     N51 18.877959028 E12 24.561572000       01/05/2005 15:34:04     138 m   0.0 m           0 m     0:00:10 0 kph   0° true\r
+Trackpoint     N51 18.877959028 E12 24.561572000       01/05/2005 15:34:20     139 m   0.0 m           0 m     0:00:16 0 kph   0° true\r
+Trackpoint     N51 18.877959028 E12 24.561572000       01/05/2005 15:35:45     144 m   0.0 m           0 m     0:01:25 0 kph   0° true\r
+Trackpoint     N51 18.877959028 E12 24.561572000       01/05/2005 15:35:56     145 m   0.0 m           0 m     0:00:11 0 kph   0° true\r
diff --git a/reference/geocaching.gpx b/reference/geocaching.gpx
new file mode 100644 (file)
index 0000000..aa06057
--- /dev/null
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>2008-03-09T00:28:36Z</time>
+<bounds minlat="35.972033333" minlon="-87.134700000" maxlat="36.112183333" maxlon="-86.620116667"/>
+<wpt lat="35.972033333" lon="-87.134700000">
+  <name>GCEBB</name>
+  <desc>Mountain Bike Heaven by susy1313</desc>
+  <url>http://www.geocaching.com/seek/cache_details.asp?ID=3771</url>
+  <urlname>Cache Details</urlname>
+  <sym>geocache</sym>
+</wpt>
+<wpt lat="36.090683333" lon="-86.679550000">
+  <name>GC1A37</name>
+  <desc>The Troll by a182pilot &amp; Family</desc>
+  <url>http://www.geocaching.com/seek/cache_details.asp?ID=6711</url>
+  <urlname>Cache Details</urlname>
+  <sym>geocache</sym>
+</wpt>
+<wpt lat="35.996266667" lon="-86.620116667">
+  <name>GC1C2B</name>
+  <desc>Dive Bomber by JoGPS &amp; family</desc>
+  <url>http://www.geocaching.com/seek/cache_details.asp?ID=7211</url>
+  <urlname>Cache Details</urlname>
+  <sym>geocache</sym>
+</wpt>
+<wpt lat="36.038483333" lon="-86.648616667">
+  <name>GC25A9</name>
+  <desc>FOSTER by JoGPS &amp; Family</desc>
+  <url>http://www.geocaching.com/seek/cache_details.asp?ID=9641</url>
+  <urlname>Cache Details</urlname>
+  <sym>geocache</sym>
+</wpt>
+<wpt lat="36.112183333" lon="-86.741766667">
+  <name>GC2723</name>
+  <desc>Logan Lighthouse by JoGps &amp; Family</desc>
+  <url>http://www.geocaching.com/seek/cache_details.asp?ID=10019</url>
+  <urlname>Cache Details</urlname>
+  <sym>geocache</sym>
+</wpt>
+<wpt lat="36.064083333" lon="-86.790516667">
+  <name>GC2B71</name>
+  <desc>Ganier Cache by Susy1313</desc>
+  <url>http://www.geocaching.com/seek/cache_details.asp?ID=11121</url>
+  <urlname>Cache Details</urlname>
+  <sym>geocache</sym>
+</wpt>
+<wpt lat="36.087766667" lon="-86.809733333">
+  <name>GC309F</name>
+  <desc>Shy&apos;s Hill by FireFighterEng33</desc>
+  <url>http://www.geocaching.com/seek/cache_details.asp?ID=12447</url>
+  <urlname>Cache Details</urlname>
+  <sym>geocache</sym>
+</wpt>
+<wpt lat="36.057500000" lon="-86.892000000">
+  <name>GC317A</name>
+  <desc>GittyUp by JoGPS / Warner Parks</desc>
+  <url>http://www.geocaching.com/seek/cache_details.asp?ID=12666</url>
+  <urlname>Cache Details</urlname>
+  <sym>geocache</sym>
+</wpt>
+<wpt lat="36.082800000" lon="-86.867283333">
+  <name>GC317D</name>
+  <desc>Inlighting by JoGPS / Warner Parks</desc>
+  <url>http://www.geocaching.com/seek/cache_details.asp?ID=12669</url>
+  <urlname>Cache Details</urlname>
+  <sym>geocache</sym>
+</wpt>
+</gpx>
diff --git a/reference/ik3d-sample.gpx b/reference/ik3d-sample.gpx
new file mode 100644 (file)
index 0000000..e4d8f72
--- /dev/null
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<bounds minlat="50.492606163" minlon="12.105131149" maxlat="51.314635752" maxlon="12.414971469"/>
+<wpt lat="50.493662870" lon="12.107152529">
+  <name>Jahnstrasse</name>
+  <cmt>Jahnstrasse 11</cmt>
+  <desc>Jahnstrasse 11</desc>
+</wpt>
+<wpt lat="50.493837046" lon="12.106101019">
+  <name>Liebknechtstrasse</name>
+  <cmt>Liebknechtstrasse 90</cmt>
+  <desc>Liebknechtstrasse 90</desc>
+</wpt>
+<wpt lat="50.492618987" lon="12.105448823">
+  <name>NARVA</name>
+  <cmt>Start</cmt>
+  <desc>Start</desc>
+</wpt>
+<trk>
+  <name>NARVA to Jahnstrasse</name>
+<trkseg>
+<trkpt lat="50.492618987" lon="12.105448823">
+</trkpt>
+<trkpt lat="50.492606163" lon="12.105431557">
+</trkpt>
+<trkpt lat="50.492606163" lon="12.105431557">
+</trkpt>
+<trkpt lat="50.494279861" lon="12.105131149">
+</trkpt>
+<trkpt lat="50.493836962" lon="12.106101271">
+</trkpt>
+<trkpt lat="50.493837046" lon="12.106101019">
+</trkpt>
+<trkpt lat="50.493836962" lon="12.106101271">
+</trkpt>
+<trkpt lat="50.493378639" lon="12.107105255">
+</trkpt>
+<trkpt lat="50.493662786" lon="12.107152529">
+</trkpt>
+<trkpt lat="50.493662870" lon="12.107152529">
+</trkpt>
+</trkseg>
+</trk>
+<trk>
+  <name>ACTIVE LOG 006</name>
+<trkseg>
+<trkpt lat="51.312941350" lon="12.413165923">
+</trkpt>
+<trkpt lat="51.312885778" lon="12.413249239">
+</trkpt>
+<trkpt lat="51.312858034" lon="12.413249239">
+</trkpt>
+<trkpt lat="51.312830206" lon="12.413304811">
+</trkpt>
+<trkpt lat="51.312830206" lon="12.413276983">
+</trkpt>
+<trkpt lat="51.312830206" lon="12.413304811">
+</trkpt>
+<trkpt lat="51.312774718" lon="12.413332555">
+</trkpt>
+<trkpt lat="51.312774718" lon="12.413332555">
+</trkpt>
+<trkpt lat="51.312746890" lon="12.413332555">
+</trkpt>
+<trkpt lat="51.312802462" lon="12.413304811">
+</trkpt>
+<trkpt lat="51.312913606" lon="12.413443699">
+</trkpt>
+<trkpt lat="51.312996922" lon="12.413804792">
+</trkpt>
+<trkpt lat="51.313052494" lon="12.413804792">
+</trkpt>
+<trkpt lat="51.313052494" lon="12.413832536">
+</trkpt>
+<trkpt lat="51.313107982" lon="12.413832536">
+</trkpt>
+<trkpt lat="51.313219126" lon="12.413888108">
+</trkpt>
+<trkpt lat="51.313302442" lon="12.413971424">
+</trkpt>
+<trkpt lat="51.313274698" lon="12.414054740">
+</trkpt>
+<trkpt lat="51.313274698" lon="12.414110312">
+</trkpt>
+<trkpt lat="51.313052494" lon="12.414610293">
+</trkpt>
+<trkpt lat="51.312969094" lon="12.414832581">
+</trkpt>
+<trkpt lat="51.312913606" lon="12.414943641">
+</trkpt>
+<trkpt lat="51.312941350" lon="12.414971469">
+</trkpt>
+<trkpt lat="51.312941350" lon="12.414971469">
+</trkpt>
+<trkpt lat="51.312969094" lon="12.414943641">
+</trkpt>
+<trkpt lat="51.313163554" lon="12.414582549">
+</trkpt>
+<trkpt lat="51.313163554" lon="12.414554805">
+</trkpt>
+<trkpt lat="51.313163554" lon="12.414443661">
+</trkpt>
+<trkpt lat="51.313163554" lon="12.414388089">
+</trkpt>
+<trkpt lat="51.313330270" lon="12.413915852">
+</trkpt>
+<trkpt lat="51.313691363" lon="12.413332555">
+</trkpt>
+<trkpt lat="51.313996883" lon="12.412860319">
+</trkpt>
+<trkpt lat="51.314219087" lon="12.412499227">
+</trkpt>
+<trkpt lat="51.314635752" lon="12.409554748">
+</trkpt>
+<trkpt lat="51.314635752" lon="12.409499260">
+</trkpt>
+<trkpt lat="51.314635752" lon="12.409499260">
+</trkpt>
+<trkpt lat="51.314635752" lon="12.409443688">
+</trkpt>
+<trkpt lat="51.314635752" lon="12.409360288">
+</trkpt>
+<trkpt lat="51.314635752" lon="12.409360288">
+</trkpt>
+<trkpt lat="51.314635752" lon="12.409360288">
+</trkpt>
+<trkpt lat="51.314635752" lon="12.409360288">
+</trkpt>
+<trkpt lat="51.314635752" lon="12.409360288">
+</trkpt>
+</trkseg>
+</trk>
+</gpx>
diff --git a/reference/ik3d-sample.ikt b/reference/ik3d-sample.ikt
new file mode 100644 (file)
index 0000000..441bb9a
--- /dev/null
@@ -0,0 +1,433 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<Root FileFormat="IK3D-Project-File" >
+ <Info>
+  <ProductVersion>
+   <Version>Germany TK25 Demo</Version>
+   <FileFormatVersion>1.1</FileFormatVersion>
+  </ProductVersion>
+  <Language>German</Language>
+ </Info>
+ <Header>
+  <Projectname>Undefiniert</Projectname>
+  <countOfObjects>5</countOfObjects>
+  <description><![CDATA[keine Beschreibung vorhanden]]></description>
+ </Header>
+ <Content>
+  <MMGeoObjects>
+   <count>5</count>
+   <MMGeoObject_0>
+    <GeoObjectType>0</GeoObjectType>
+    <Name>Jahnstrasse</Name>
+    <Remark></Remark>
+    <Link></Link>
+    <Priority>0</Priority>
+    <ID>132048172029964614</ID>
+    <Locked>False</Locked>
+    <GeoPosition X="12.1071525290" Y="50.4936628700" />
+    <DrawType2D>1</DrawType2D>
+    <DrawType3D>1</DrawType3D>
+    <POIDrawable2D>
+     <Text>Jahnstrasse 11</Text>
+     <BorderColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <TextColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <BorderType>2</BorderType>
+     <BackRounded>True</BackRounded>
+     <Distance>32.0000000000</Distance>
+     <BackAlpha>1.0000000000</BackAlpha>
+     <ArrowColor Blue="1.0000" Red="1.0000" Green="1.0000" />
+     <FrameColor Blue="0.2000" Red="0.8980" Green="0.8980" />
+     <Height>16.0000000000</Height>
+     <Frame>1</Frame>
+     <PicFileName>.\default.jpg</PicFileName>
+     <MarkerType>0</MarkerType>
+     <antiAliasing>False</antiAliasing>
+     <TextDesc>0.0000000000</TextDesc>
+     <Orientation>1</Orientation>
+     <ScaleFac>1.0000000000</ScaleFac>
+    </POIDrawable2D>
+    <POIDrawable3D>
+     <Text>Jahnstrasse 11</Text>
+     <BorderColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <TextColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <BorderType>2</BorderType>
+     <BackRounded>False</BackRounded>
+     <Distance>99.0000000000</Distance>
+     <BackAlpha>1.0000000000</BackAlpha>
+     <ArrowColor Blue="0.6000" Red="0.6000" Green="0.6000" />
+     <FrameColor Blue="0.2000" Red="0.8980" Green="0.8980" />
+     <Height>180.0000000000</Height>
+     <Frame>1</Frame>
+     <PicFileName>.\default.jpg</PicFileName>
+     <antiAliasing>False</antiAliasing>
+     <TextDesc>-36.0000000000</TextDesc>
+     <Orientation>1</Orientation>
+     <ScaleFac>0.2500000000</ScaleFac>
+    </POIDrawable3D>
+   </MMGeoObject_0>
+   <MMGeoObject_1>
+    <GeoObjectType>0</GeoObjectType>
+    <Name>Liebknechtstrasse</Name>
+    <Remark></Remark>
+    <Link></Link>
+    <Priority>1</Priority>
+    <ID>194043035650486614</ID>
+    <Locked>False</Locked>
+    <GeoPosition X="12.1061010190" Y="50.4938370460" />
+    <DrawType2D>1</DrawType2D>
+    <DrawType3D>1</DrawType3D>
+    <POIDrawable2D>
+     <Text>Liebknechtstrasse 90</Text>
+     <BorderColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <TextColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <BorderType>2</BorderType>
+     <BackRounded>True</BackRounded>
+     <Distance>32.0000000000</Distance>
+     <BackAlpha>1.0000000000</BackAlpha>
+     <ArrowColor Blue="1.0000" Red="1.0000" Green="1.0000" />
+     <FrameColor Blue="0.2000" Red="0.8980" Green="0.8980" />
+     <Height>16.0000000000</Height>
+     <Frame>1</Frame>
+     <PicFileName>.\default.jpg</PicFileName>
+     <MarkerType>0</MarkerType>
+     <antiAliasing>False</antiAliasing>
+     <TextDesc>0.0000000000</TextDesc>
+     <Orientation>1</Orientation>
+     <ScaleFac>1.0000000000</ScaleFac>
+    </POIDrawable2D>
+    <POIDrawable3D>
+     <Text>Liebknechtstrasse 90</Text>
+     <BorderColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <TextColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <BorderType>2</BorderType>
+     <BackRounded>False</BackRounded>
+     <Distance>100.0000000000</Distance>
+     <BackAlpha>1.0000000000</BackAlpha>
+     <ArrowColor Blue="0.6000" Red="0.6000" Green="0.6000" />
+     <FrameColor Blue="0.2000" Red="0.8980" Green="0.8980" />
+     <Height>180.0000000000</Height>
+     <Frame>1</Frame>
+     <PicFileName>.\default.jpg</PicFileName>
+     <antiAliasing>False</antiAliasing>
+     <TextDesc>-36.0000000000</TextDesc>
+     <Orientation>1</Orientation>
+     <ScaleFac>0.2500000000</ScaleFac>
+    </POIDrawable3D>
+   </MMGeoObject_1>
+   <MMGeoObject_2>
+    <GeoObjectType>0</GeoObjectType>
+    <Name>NARVA</Name>
+    <Remark></Remark>
+    <Link></Link>
+    <Priority>2</Priority>
+    <ID>319457729961128278</ID>
+    <Locked>False</Locked>
+    <GeoPosition X="12.1054488230" Y="50.4926189870" />
+    <DrawType2D>1</DrawType2D>
+    <DrawType3D>1</DrawType3D>
+    <POIDrawable2D>
+     <Text>Start</Text>
+     <BorderColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <TextColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <BorderType>2</BorderType>
+     <BackRounded>True</BackRounded>
+     <Distance>32.0000000000</Distance>
+     <BackAlpha>1.0000000000</BackAlpha>
+     <ArrowColor Blue="1.0000" Red="1.0000" Green="1.0000" />
+     <FrameColor Blue="0.2000" Red="0.8980" Green="0.8980" />
+     <Height>16.0000000000</Height>
+     <Frame>1</Frame>
+     <PicFileName>.\default.jpg</PicFileName>
+     <MarkerType>0</MarkerType>
+     <antiAliasing>False</antiAliasing>
+     <TextDesc>0.0000000000</TextDesc>
+     <Orientation>1</Orientation>
+     <ScaleFac>1.0000000000</ScaleFac>
+    </POIDrawable2D>
+    <POIDrawable3D>
+     <Text>Start</Text>
+     <BorderColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <TextColor Blue="0.0000" Red="0.0000" Green="0.0000" />
+     <BorderType>2</BorderType>
+     <BackRounded>False</BackRounded>
+     <Distance>99.0000000000</Distance>
+     <BackAlpha>1.0000000000</BackAlpha>
+     <ArrowColor Blue="0.6000" Red="0.6000" Green="0.6000" />
+     <FrameColor Blue="0.2000" Red="0.8980" Green="0.8980" />
+     <Height>180.0000000000</Height>
+     <Frame>1</Frame>
+     <PicFileName>.\default.jpg</PicFileName>
+     <antiAliasing>False</antiAliasing>
+     <TextDesc>-36.0000000000</TextDesc>
+     <Orientation>1</Orientation>
+     <ScaleFac>0.2500000000</ScaleFac>
+    </POIDrawable3D>
+   </MMGeoObject_2>
+   <MMGeoObject_3>
+    <GeoObjectType>1</GeoObjectType>
+    <Name>NARVA to Jahnstrasse</Name>
+    <Remark></Remark>
+    <Link></Link>
+    <Priority>3</Priority>
+    <ID>232341224669180246</ID>
+    <Locked>False</Locked>
+    <PathWidthFactor>1.0000000000</PathWidthFactor>
+    <PathDrawType>5</PathDrawType>
+    <PathPoints>
+     <count>10</count>
+     <Point_0>
+      <Link></Link>
+      <GeoPosition X="12.1054488230" Y="50.4926189870" />
+     </Point_0>
+     <Point_1>
+      <Link></Link>
+      <GeoPosition X="12.1054315570" Y="50.4926061630" />
+     </Point_1>
+     <Point_2>
+      <Link></Link>
+      <GeoPosition X="12.1054315570" Y="50.4926061630" />
+     </Point_2>
+     <Point_3>
+      <Link></Link>
+      <GeoPosition X="12.1051311490" Y="50.4942798610" />
+     </Point_3>
+     <Point_4>
+      <Link></Link>
+      <GeoPosition X="12.1061012710" Y="50.4938369620" />
+     </Point_4>
+     <Point_5>
+      <Link></Link>
+      <GeoPosition X="12.1061010190" Y="50.4938370460" />
+     </Point_5>
+     <Point_6>
+      <Link></Link>
+      <GeoPosition X="12.1061012710" Y="50.4938369620" />
+     </Point_6>
+     <Point_7>
+      <Link></Link>
+      <GeoPosition X="12.1071052550" Y="50.4933786390" />
+     </Point_7>
+     <Point_8>
+      <Link></Link>
+      <GeoPosition X="12.1071525290" Y="50.4936627860" />
+     </Point_8>
+     <Point_9>
+      <Link></Link>
+      <GeoPosition X="12.1071525290" Y="50.4936628700" />
+     </Point_9>
+    </PathPoints>
+    <PathDrawable2D>
+     <PathColor Blue="0.0000" Red="1.0000" Green="0.0000" />
+     <PointColor Blue="0.0000" Red="1.0000" Green="1.0000" />
+     <MarkingColor Blue="1.0000" Red="1.0000" Green="0.0000" />
+     <Alpha>1.0000000000</Alpha>
+     <Antialiasing>False</Antialiasing>
+     <CirclePieces>12</CirclePieces>
+    </PathDrawable2D>
+    <PathDrawable3D>
+     <PathColor Blue="0.0000" Red="1.0000" Green="0.0000" />
+     <PointColor Blue="0.0000" Red="1.0000" Green="1.0000" />
+     <MarkingColor Blue="1.0000" Red="1.0000" Green="0.0000" />
+     <Alpha>1.0000000000</Alpha>
+     <Antialiasing>False</Antialiasing>
+    </PathDrawable3D>
+   </MMGeoObject_3>
+   <MMGeoObject_4>
+    <GeoObjectType>1</GeoObjectType>
+    <Name>ACTIVE LOG 006</Name>
+    <Remark></Remark>
+    <Link></Link>
+    <Priority>4</Priority>
+    <ID>387926518045995350</ID>
+    <Locked>False</Locked>
+    <PathWidthFactor>1.0000000000</PathWidthFactor>
+    <PathDrawType>5</PathDrawType>
+    <PathPoints>
+     <count>42</count>
+     <Point_0>
+      <Link></Link>
+      <GeoPosition X="12.4131659230" Y="51.3129413500" />
+     </Point_0>
+     <Point_1>
+      <Link></Link>
+      <GeoPosition X="12.4132492390" Y="51.3128857780" />
+     </Point_1>
+     <Point_2>
+      <Link></Link>
+      <GeoPosition X="12.4132492390" Y="51.3128580340" />
+     </Point_2>
+     <Point_3>
+      <Link></Link>
+      <GeoPosition X="12.4133048110" Y="51.3128302060" />
+     </Point_3>
+     <Point_4>
+      <Link></Link>
+      <GeoPosition X="12.4132769830" Y="51.3128302060" />
+     </Point_4>
+     <Point_5>
+      <Link></Link>
+      <GeoPosition X="12.4133048110" Y="51.3128302060" />
+     </Point_5>
+     <Point_6>
+      <Link></Link>
+      <GeoPosition X="12.4133325550" Y="51.3127747180" />
+     </Point_6>
+     <Point_7>
+      <Link></Link>
+      <GeoPosition X="12.4133325550" Y="51.3127747180" />
+     </Point_7>
+     <Point_8>
+      <Link></Link>
+      <GeoPosition X="12.4133325550" Y="51.3127468900" />
+     </Point_8>
+     <Point_9>
+      <Link></Link>
+      <GeoPosition X="12.4133048110" Y="51.3128024620" />
+     </Point_9>
+     <Point_10>
+      <Link></Link>
+      <GeoPosition X="12.4134436990" Y="51.3129136060" />
+     </Point_10>
+     <Point_11>
+      <Link></Link>
+      <GeoPosition X="12.4138047920" Y="51.3129969220" />
+     </Point_11>
+     <Point_12>
+      <Link></Link>
+      <GeoPosition X="12.4138047920" Y="51.3130524940" />
+     </Point_12>
+     <Point_13>
+      <Link></Link>
+      <GeoPosition X="12.4138325360" Y="51.3130524940" />
+     </Point_13>
+     <Point_14>
+      <Link></Link>
+      <GeoPosition X="12.4138325360" Y="51.3131079820" />
+     </Point_14>
+     <Point_15>
+      <Link></Link>
+      <GeoPosition X="12.4138881080" Y="51.3132191260" />
+     </Point_15>
+     <Point_16>
+      <Link></Link>
+      <GeoPosition X="12.4139714240" Y="51.3133024420" />
+     </Point_16>
+     <Point_17>
+      <Link></Link>
+      <GeoPosition X="12.4140547400" Y="51.3132746980" />
+     </Point_17>
+     <Point_18>
+      <Link></Link>
+      <GeoPosition X="12.4141103120" Y="51.3132746980" />
+     </Point_18>
+     <Point_19>
+      <Link></Link>
+      <GeoPosition X="12.4146102930" Y="51.3130524940" />
+     </Point_19>
+     <Point_20>
+      <Link></Link>
+      <GeoPosition X="12.4148325810" Y="51.3129690940" />
+     </Point_20>
+     <Point_21>
+      <Link></Link>
+      <GeoPosition X="12.4149436410" Y="51.3129136060" />
+     </Point_21>
+     <Point_22>
+      <Link></Link>
+      <GeoPosition X="12.4149714690" Y="51.3129413500" />
+     </Point_22>
+     <Point_23>
+      <Link></Link>
+      <GeoPosition X="12.4149714690" Y="51.3129413500" />
+     </Point_23>
+     <Point_24>
+      <Link></Link>
+      <GeoPosition X="12.4149436410" Y="51.3129690940" />
+     </Point_24>
+     <Point_25>
+      <Link></Link>
+      <GeoPosition X="12.4145825490" Y="51.3131635540" />
+     </Point_25>
+     <Point_26>
+      <Link></Link>
+      <GeoPosition X="12.4145548050" Y="51.3131635540" />
+     </Point_26>
+     <Point_27>
+      <Link></Link>
+      <GeoPosition X="12.4144436610" Y="51.3131635540" />
+     </Point_27>
+     <Point_28>
+      <Link></Link>
+      <GeoPosition X="12.4143880890" Y="51.3131635540" />
+     </Point_28>
+     <Point_29>
+      <Link></Link>
+      <GeoPosition X="12.4139158520" Y="51.3133302700" />
+     </Point_29>
+     <Point_30>
+      <Link></Link>
+      <GeoPosition X="12.4133325550" Y="51.3136913630" />
+     </Point_30>
+     <Point_31>
+      <Link></Link>
+      <GeoPosition X="12.4128603190" Y="51.3139968830" />
+     </Point_31>
+     <Point_32>
+      <Link></Link>
+      <GeoPosition X="12.4124992270" Y="51.3142190870" />
+     </Point_32>
+     <Point_33>
+      <Link></Link>
+      <GeoPosition X="12.4095547480" Y="51.3146357520" />
+     </Point_33>
+     <Point_34>
+      <Link></Link>
+      <GeoPosition X="12.4094992600" Y="51.3146357520" />
+     </Point_34>
+     <Point_35>
+      <Link></Link>
+      <GeoPosition X="12.4094992600" Y="51.3146357520" />
+     </Point_35>
+     <Point_36>
+      <Link></Link>
+      <GeoPosition X="12.4094436880" Y="51.3146357520" />
+     </Point_36>
+     <Point_37>
+      <Link></Link>
+      <GeoPosition X="12.4093602880" Y="51.3146357520" />
+     </Point_37>
+     <Point_38>
+      <Link></Link>
+      <GeoPosition X="12.4093602880" Y="51.3146357520" />
+     </Point_38>
+     <Point_39>
+      <Link></Link>
+      <GeoPosition X="12.4093602880" Y="51.3146357520" />
+     </Point_39>
+     <Point_40>
+      <Link></Link>
+      <GeoPosition X="12.4093602880" Y="51.3146357520" />
+     </Point_40>
+     <Point_41>
+      <Link></Link>
+      <GeoPosition X="12.4093602880" Y="51.3146357520" />
+     </Point_41>
+    </PathPoints>
+    <PathDrawable2D>
+     <PathColor Blue="0.0000" Red="1.0000" Green="0.0000" />
+     <PointColor Blue="0.0000" Red="1.0000" Green="1.0000" />
+     <MarkingColor Blue="1.0000" Red="1.0000" Green="0.0000" />
+     <Alpha>1.0000000000</Alpha>
+     <Antialiasing>False</Antialiasing>
+     <CirclePieces>12</CirclePieces>
+    </PathDrawable2D>
+    <PathDrawable3D>
+     <PathColor Blue="0.0000" Red="1.0000" Green="0.0000" />
+     <PointColor Blue="0.0000" Red="1.0000" Green="1.0000" />
+     <MarkingColor Blue="1.0000" Red="1.0000" Green="0.0000" />
+     <Alpha>1.0000000000</Alpha>
+     <Antialiasing>False</Antialiasing>
+    </PathDrawable3D>
+   </MMGeoObject_4>
+  </MMGeoObjects>
+ </Content>
+</Root>
index 32b2ea607f0f12385a04786ca713d70456d34f61..26350d0292457fd874791cdd7e32be69f2700ee3 100644 (file)
Binary files a/reference/lowrance.usr and b/reference/lowrance.usr differ
diff --git a/reference/navilink_tracks.gpx b/reference/navilink_tracks.gpx
new file mode 100644 (file)
index 0000000..b910421
--- /dev/null
@@ -0,0 +1,2084 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<bounds minlat="51.758580000" minlon="-0.012070000" maxlat="51.764718300" maxlon="-0.003189900"/>
+<trk>
+<trkseg>
+<trkpt lat="51.758580000" lon="-0.012070000">
+  <ele>0.000000</ele>
+<time>2007-10-03T16:01:20Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758580000" lon="-0.012070000">
+  <ele>0.000000</ele>
+<time>2007-10-03T16:01:22Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758580000" lon="-0.012070000">
+  <ele>0.000000</ele>
+<time>2007-10-03T16:01:24Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758580000" lon="-0.012033300">
+  <ele>32.004000</ele>
+<time>2007-10-03T16:01:46Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758581600" lon="-0.012033300">
+  <ele>32.918400</ele>
+<time>2007-10-03T16:01:48Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758581600" lon="-0.012033300">
+  <ele>32.918400</ele>
+<time>2007-10-03T16:01:50Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758583300" lon="-0.012033300">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:01:53Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758583300" lon="-0.012031600">
+  <ele>34.137600</ele>
+<time>2007-10-03T16:01:55Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758588300" lon="-0.012023300">
+  <ele>33.223200</ele>
+<time>2007-10-03T16:01:57Z</time>
+  <course>23.000000</course>
+  <speed>0.555556</speed>
+</trkpt>
+<trkpt lat="51.758603300" lon="-0.011998300">
+  <ele>32.918400</ele>
+<time>2007-10-03T16:01:59Z</time>
+  <course>41.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.758623300" lon="-0.011965000">
+  <ele>32.613600</ele>
+<time>2007-10-03T16:02:01Z</time>
+  <course>47.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758641600" lon="-0.011926600">
+  <ele>32.308800</ele>
+<time>2007-10-03T16:02:03Z</time>
+  <course>57.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758661600" lon="-0.011888300">
+  <ele>32.613600</ele>
+<time>2007-10-03T16:02:05Z</time>
+  <course>47.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758683300" lon="-0.011851600">
+  <ele>32.613600</ele>
+<time>2007-10-03T16:02:07Z</time>
+  <course>57.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758700000" lon="-0.011808300">
+  <ele>32.918400</ele>
+<time>2007-10-03T16:02:09Z</time>
+  <course>63.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758715000" lon="-0.011763300">
+  <ele>33.528000</ele>
+<time>2007-10-03T16:02:11Z</time>
+  <course>61.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758730000" lon="-0.011720000">
+  <ele>33.832800</ele>
+<time>2007-10-03T16:02:13Z</time>
+  <course>63.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758743300" lon="-0.011676600">
+  <ele>34.137600</ele>
+<time>2007-10-03T16:02:15Z</time>
+  <course>63.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758758300" lon="-0.011631600">
+  <ele>34.747200</ele>
+<time>2007-10-03T16:02:17Z</time>
+  <course>64.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758771600" lon="-0.011583300">
+  <ele>35.052000</ele>
+<time>2007-10-03T16:02:19Z</time>
+  <course>69.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758783300" lon="-0.011538300">
+  <ele>35.356800</ele>
+<time>2007-10-03T16:02:21Z</time>
+  <course>71.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758793300" lon="-0.011490000">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:02:23Z</time>
+  <course>71.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758803300" lon="-0.011441600">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:02:25Z</time>
+  <course>78.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758806600" lon="-0.011413300">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:02:27Z</time>
+  <course>76.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758821600" lon="-0.011333300">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:02:29Z</time>
+  <course>78.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758828300" lon="-0.011276600">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:02:31Z</time>
+  <course>84.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758835000" lon="-0.011213300">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:02:33Z</time>
+  <course>79.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758841600" lon="-0.011158300">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:02:35Z</time>
+  <course>78.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758845000" lon="-0.011108300">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:02:37Z</time>
+  <course>80.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758848300" lon="-0.011070000">
+  <ele>35.661600</ele>
+<time>2007-10-03T16:02:39Z</time>
+  <course>83.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758851600" lon="-0.011028300">
+  <ele>35.661600</ele>
+<time>2007-10-03T16:02:41Z</time>
+  <course>81.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758860000" lon="-0.010986600">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:02:43Z</time>
+  <course>78.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758865000" lon="-0.010944900">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:02:45Z</time>
+  <course>86.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758866600" lon="-0.010921600">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:02:47Z</time>
+  <course>82.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758875000" lon="-0.010856600">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:02:49Z</time>
+  <course>80.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758880000" lon="-0.010806600">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:02:51Z</time>
+  <course>82.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758883300" lon="-0.010756600">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:02:53Z</time>
+  <course>82.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758888300" lon="-0.010708300">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:02:55Z</time>
+  <course>82.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758891600" lon="-0.010659900">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:02:57Z</time>
+  <course>84.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758895000" lon="-0.010615000">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:02:59Z</time>
+  <course>84.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758896600" lon="-0.010570000">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:03:01Z</time>
+  <course>84.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758899900" lon="-0.010520000">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:03:03Z</time>
+  <course>83.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758908300" lon="-0.010473300">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:03:05Z</time>
+  <course>84.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758913300" lon="-0.010428300">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:03:07Z</time>
+  <course>86.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758916600" lon="-0.010380000">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:03:09Z</time>
+  <course>86.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758921600" lon="-0.010331600">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:03:11Z</time>
+  <course>84.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758925000" lon="-0.010281600">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:03:13Z</time>
+  <course>84.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758929900" lon="-0.010233300">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:03:15Z</time>
+  <course>83.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758933300" lon="-0.010186600">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:03:17Z</time>
+  <course>81.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758940000" lon="-0.010141600">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:03:19Z</time>
+  <course>85.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758946600" lon="-0.010093300">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:03:21Z</time>
+  <course>85.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758951600" lon="-0.010045000">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:03:23Z</time>
+  <course>78.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758958300" lon="-0.009998300">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:03:25Z</time>
+  <course>82.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758963300" lon="-0.009951600">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:03:27Z</time>
+  <course>79.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758966600" lon="-0.009903300">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:03:29Z</time>
+  <course>80.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758968300" lon="-0.009858300">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:03:31Z</time>
+  <course>84.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758973300" lon="-0.009815000">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:03:33Z</time>
+  <course>75.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758980000" lon="-0.009763300">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:03:35Z</time>
+  <course>79.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758988300" lon="-0.009711600">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:03:37Z</time>
+  <course>78.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758991600" lon="-0.009684900">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:03:39Z</time>
+  <course>86.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758991600" lon="-0.009684900">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:03:41Z</time>
+  <course>86.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758971600" lon="-0.009575000">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:03:43Z</time>
+  <course>94.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.758971600" lon="-0.009575000">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:03:45Z</time>
+  <course>94.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.758971600" lon="-0.009575000">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:03:47Z</time>
+  <course>94.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759036600" lon="-0.009298300">
+  <ele>35.052000</ele>
+<time>2007-10-03T16:03:56Z</time>
+  <course>57.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759036600" lon="-0.009298300">
+  <ele>35.052000</ele>
+<time>2007-10-03T16:03:58Z</time>
+  <course>57.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759070000" lon="-0.009225000">
+  <ele>35.052000</ele>
+<time>2007-10-03T16:04:00Z</time>
+  <course>55.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759083300" lon="-0.009181600">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:04:02Z</time>
+  <course>68.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759093300" lon="-0.009143300">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:04:04Z</time>
+  <course>59.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759108300" lon="-0.009113300">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:04:06Z</time>
+  <course>50.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759108300" lon="-0.009113300">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:04:08Z</time>
+  <course>50.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759133300" lon="-0.009025000">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:04:10Z</time>
+  <course>59.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759146600" lon="-0.008981600">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:04:12Z</time>
+  <course>64.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759156600" lon="-0.008935000">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:04:14Z</time>
+  <course>70.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759165000" lon="-0.008900000">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:04:16Z</time>
+  <course>68.000000</course>
+  <speed>0.555556</speed>
+</trkpt>
+<trkpt lat="51.759176600" lon="-0.008868300">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:04:18Z</time>
+  <course>56.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759195000" lon="-0.008833300">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:04:20Z</time>
+  <course>51.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759213300" lon="-0.008791600">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:04:22Z</time>
+  <course>63.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759228300" lon="-0.008743300">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:04:24Z</time>
+  <course>64.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759235000" lon="-0.008716600">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:04:26Z</time>
+  <course>64.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759235000" lon="-0.008716600">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:04:28Z</time>
+  <course>64.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759293300" lon="-0.008516600">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:04:42Z</time>
+  <course>64.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759293300" lon="-0.008518300">
+  <ele>35.661600</ele>
+<time>2007-10-03T16:04:44Z</time>
+  <course>64.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759301600" lon="-0.008520000">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:04:46Z</time>
+  <course>64.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759301600" lon="-0.008520000">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:04:48Z</time>
+  <course>64.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759311600" lon="-0.008510000">
+  <ele>35.052000</ele>
+<time>2007-10-03T16:04:51Z</time>
+  <course>64.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759353300" lon="-0.008471600">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:04:53Z</time>
+  <course>57.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759370000" lon="-0.008436600">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:04:55Z</time>
+  <course>53.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759385000" lon="-0.008400000">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:04:57Z</time>
+  <course>57.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759403300" lon="-0.008360000">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:04:59Z</time>
+  <course>53.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759421600" lon="-0.008323300">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:05:01Z</time>
+  <course>52.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759438300" lon="-0.008288300">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:05:03Z</time>
+  <course>50.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759456600" lon="-0.008256600">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:05:05Z</time>
+  <course>50.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759473300" lon="-0.008225000">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:05:07Z</time>
+  <course>48.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759490000" lon="-0.008195000">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:05:09Z</time>
+  <course>50.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759508300" lon="-0.008160000">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:05:11Z</time>
+  <course>45.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759528300" lon="-0.008126600">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:05:13Z</time>
+  <course>46.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759546600" lon="-0.008091600">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:05:15Z</time>
+  <course>47.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759555000" lon="-0.008073300">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:05:17Z</time>
+  <course>56.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759565000" lon="-0.008035000">
+  <ele>35.356800</ele>
+<time>2007-10-03T16:05:19Z</time>
+  <course>56.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759565000" lon="-0.008035000">
+  <ele>35.356800</ele>
+<time>2007-10-03T16:05:21Z</time>
+  <course>56.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759573300" lon="-0.008025000">
+  <ele>35.661600</ele>
+<time>2007-10-03T16:05:23Z</time>
+  <course>107.000000</course>
+  <speed>0.555556</speed>
+</trkpt>
+<trkpt lat="51.759561600" lon="-0.008011600">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:05:25Z</time>
+  <course>126.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759556600" lon="-0.007985000">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:05:27Z</time>
+  <course>103.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759544900" lon="-0.007928300">
+  <ele>34.747200</ele>
+<time>2007-10-03T16:05:30Z</time>
+  <course>104.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759546600" lon="-0.007891600">
+  <ele>34.442400</ele>
+<time>2007-10-03T16:05:32Z</time>
+  <course>81.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759565000" lon="-0.007861600">
+  <ele>33.832800</ele>
+<time>2007-10-03T16:05:34Z</time>
+  <course>18.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759591600" lon="-0.007848300">
+  <ele>33.528000</ele>
+<time>2007-10-03T16:05:36Z</time>
+  <course>23.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.759623300" lon="-0.007840000">
+  <ele>32.918400</ele>
+<time>2007-10-03T16:05:38Z</time>
+  <course>20.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759623300" lon="-0.007840000">
+  <ele>32.918400</ele>
+<time>2007-10-03T16:05:40Z</time>
+  <course>20.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759623300" lon="-0.007840000">
+  <ele>32.918400</ele>
+<time>2007-10-03T16:05:42Z</time>
+  <course>20.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759683300" lon="-0.007813300">
+  <ele>32.004000</ele>
+<time>2007-10-03T16:05:43Z</time>
+  <course>18.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.759683300" lon="-0.007813300">
+  <ele>32.004000</ele>
+<time>2007-10-03T16:05:46Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759786600" lon="-0.007696600">
+  <ele>31.699200</ele>
+<time>2007-10-03T16:05:55Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759795000" lon="-0.007680000">
+  <ele>31.699200</ele>
+<time>2007-10-03T16:05:57Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759795000" lon="-0.007680000">
+  <ele>31.699200</ele>
+<time>2007-10-03T16:05:59Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759880000" lon="-0.007583300">
+  <ele>31.394400</ele>
+<time>2007-10-03T16:06:05Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759906600" lon="-0.007560000">
+  <ele>31.699200</ele>
+<time>2007-10-03T16:06:07Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759906600" lon="-0.007560000">
+  <ele>31.699200</ele>
+<time>2007-10-03T16:06:09Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.759906600" lon="-0.007560000">
+  <ele>31.699200</ele>
+<time>2007-10-03T16:06:11Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760084900" lon="-0.007390000">
+  <ele>31.394400</ele>
+<time>2007-10-03T16:06:22Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760084900" lon="-0.007390000">
+  <ele>31.394400</ele>
+<time>2007-10-03T16:06:24Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760084900" lon="-0.007390000">
+  <ele>31.394400</ele>
+<time>2007-10-03T16:06:26Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760136600" lon="-0.007323300">
+  <ele>31.699200</ele>
+<time>2007-10-03T16:06:28Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760156600" lon="-0.007321600">
+  <ele>31.699200</ele>
+<time>2007-10-03T16:06:30Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760156600" lon="-0.007321600">
+  <ele>31.699200</ele>
+<time>2007-10-03T16:06:32Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760156600" lon="-0.007321600">
+  <ele>31.699200</ele>
+<time>2007-10-03T16:06:34Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760598300" lon="-0.007103300">
+  <ele>29.565600</ele>
+<time>2007-10-03T16:07:08Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760690000" lon="-0.007025000">
+  <ele>33.223200</ele>
+<time>2007-10-03T16:07:10Z</time>
+  <course>15.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.760678300" lon="-0.007036600">
+  <ele>32.308800</ele>
+<time>2007-10-03T16:07:12Z</time>
+  <course>16.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.760678300" lon="-0.007036600">
+  <ele>32.308800</ele>
+<time>2007-10-03T16:07:14Z</time>
+  <course>16.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760678300" lon="-0.007036600">
+  <ele>32.308800</ele>
+<time>2007-10-03T16:07:16Z</time>
+  <course>16.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760773300" lon="-0.007003300">
+  <ele>34.442400</ele>
+<time>2007-10-03T16:07:18Z</time>
+  <course>17.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.760800000" lon="-0.006995000">
+  <ele>34.747200</ele>
+<time>2007-10-03T16:07:20Z</time>
+  <course>14.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.760825000" lon="-0.006983300">
+  <ele>35.052000</ele>
+<time>2007-10-03T16:07:22Z</time>
+  <course>16.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.760836600" lon="-0.006976600">
+  <ele>34.747200</ele>
+<time>2007-10-03T16:07:24Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760836600" lon="-0.006976600">
+  <ele>34.747200</ele>
+<time>2007-10-03T16:07:26Z</time>
+  <course>18.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.760961600" lon="-0.006853300">
+  <ele>32.918400</ele>
+<time>2007-10-03T16:07:34Z</time>
+  <course>38.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.760970000" lon="-0.006816600">
+  <ele>32.918400</ele>
+<time>2007-10-03T16:07:36Z</time>
+  <course>61.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.760978300" lon="-0.006780000">
+  <ele>32.308800</ele>
+<time>2007-10-03T16:07:38Z</time>
+  <course>62.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.760989900" lon="-0.006756600">
+  <ele>32.004000</ele>
+<time>2007-10-03T16:07:40Z</time>
+  <course>40.000000</course>
+  <speed>0.555556</speed>
+</trkpt>
+<trkpt lat="51.761019900" lon="-0.006718300">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:08:28Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761021600" lon="-0.006713300">
+  <ele>38.709600</ele>
+<time>2007-10-03T16:08:29Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761031600" lon="-0.006715000">
+  <ele>39.928800</ele>
+<time>2007-10-03T16:08:32Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761031600" lon="-0.006713300">
+  <ele>39.319200</ele>
+<time>2007-10-03T16:08:33Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761038300" lon="-0.006716600">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:08:36Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761038300" lon="-0.006715000">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:08:37Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761038300" lon="-0.006705000">
+  <ele>41.148000</ele>
+<time>2007-10-03T16:08:40Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761038300" lon="-0.006703300">
+  <ele>42.062400</ele>
+<time>2007-10-03T16:08:41Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761036600" lon="-0.006701600">
+  <ele>43.586400</ele>
+<time>2007-10-03T16:08:43Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761033300" lon="-0.006710000">
+  <ele>45.110400</ele>
+<time>2007-10-03T16:08:46Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761030000" lon="-0.006715000">
+  <ele>45.110400</ele>
+<time>2007-10-03T16:08:47Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761023300" lon="-0.006730000">
+  <ele>45.110400</ele>
+<time>2007-10-03T16:08:50Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761021600" lon="-0.006735000">
+  <ele>44.805600</ele>
+<time>2007-10-03T16:08:51Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761019900" lon="-0.006745000">
+  <ele>43.586400</ele>
+<time>2007-10-03T16:08:54Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761018300" lon="-0.006746600">
+  <ele>42.976800</ele>
+<time>2007-10-03T16:08:55Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761026600" lon="-0.006726600">
+  <ele>42.062400</ele>
+<time>2007-10-03T16:08:58Z</time>
+  <course>35.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761040000" lon="-0.006715000">
+  <ele>42.367200</ele>
+<time>2007-10-03T16:08:59Z</time>
+  <course>28.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761085000" lon="-0.006695000">
+  <ele>42.672000</ele>
+<time>2007-10-03T16:09:02Z</time>
+  <course>16.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761100000" lon="-0.006695000">
+  <ele>42.367200</ele>
+<time>2007-10-03T16:09:03Z</time>
+  <course>17.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761145000" lon="-0.006681600">
+  <ele>41.452800</ele>
+<time>2007-10-03T16:09:06Z</time>
+  <course>21.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761161600" lon="-0.006670000">
+  <ele>41.757600</ele>
+<time>2007-10-03T16:09:07Z</time>
+  <course>22.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761205000" lon="-0.006635000">
+  <ele>41.757600</ele>
+<time>2007-10-03T16:09:10Z</time>
+  <course>29.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761216600" lon="-0.006623300">
+  <ele>41.452800</ele>
+<time>2007-10-03T16:09:11Z</time>
+  <course>34.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761229900" lon="-0.006610000">
+  <ele>41.148000</ele>
+<time>2007-10-03T16:09:13Z</time>
+  <course>36.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761288300" lon="-0.006538300">
+  <ele>40.843200</ele>
+<time>2007-10-03T16:09:16Z</time>
+  <course>65.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761295000" lon="-0.006515000">
+  <ele>41.148000</ele>
+<time>2007-10-03T16:09:17Z</time>
+  <course>65.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761311600" lon="-0.006446600">
+  <ele>40.843200</ele>
+<time>2007-10-03T16:09:20Z</time>
+  <course>68.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761316600" lon="-0.006425000">
+  <ele>40.843200</ele>
+<time>2007-10-03T16:09:21Z</time>
+  <course>71.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761326600" lon="-0.006354900">
+  <ele>40.843200</ele>
+<time>2007-10-03T16:09:24Z</time>
+  <course>78.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761330000" lon="-0.006330000">
+  <ele>41.148000</ele>
+<time>2007-10-03T16:09:25Z</time>
+  <course>80.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761336600" lon="-0.006258300">
+  <ele>41.452800</ele>
+<time>2007-10-03T16:09:28Z</time>
+  <course>82.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761338300" lon="-0.006233300">
+  <ele>41.452800</ele>
+<time>2007-10-03T16:09:29Z</time>
+  <course>85.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761353300" lon="-0.006171600">
+  <ele>41.148000</ele>
+<time>2007-10-03T16:09:32Z</time>
+  <course>53.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761363300" lon="-0.006156600">
+  <ele>41.148000</ele>
+<time>2007-10-03T16:09:33Z</time>
+  <course>37.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761403300" lon="-0.006141600">
+  <ele>40.538400</ele>
+<time>2007-10-03T16:09:36Z</time>
+  <course>5.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761418300" lon="-0.006140000">
+  <ele>40.538400</ele>
+<time>2007-10-03T16:09:37Z</time>
+  <course>4.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761454900" lon="-0.006153300">
+  <ele>41.452800</ele>
+<time>2007-10-03T16:09:40Z</time>
+  <course>288.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761461600" lon="-0.006169900">
+  <ele>41.452800</ele>
+<time>2007-10-03T16:09:41Z</time>
+  <course>290.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761465000" lon="-0.006216600">
+  <ele>41.757600</ele>
+<time>2007-10-03T16:09:44Z</time>
+  <course>279.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761463300" lon="-0.006218300">
+  <ele>42.062400</ele>
+<time>2007-10-03T16:09:46Z</time>
+  <course>279.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761465000" lon="-0.006221600">
+  <ele>42.367200</ele>
+<time>2007-10-03T16:09:47Z</time>
+  <course>295.000000</course>
+  <speed>0.555556</speed>
+</trkpt>
+<trkpt lat="51.761481600" lon="-0.006266600">
+  <ele>42.672000</ele>
+<time>2007-10-03T16:09:50Z</time>
+  <course>299.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761486600" lon="-0.006286600">
+  <ele>42.672000</ele>
+<time>2007-10-03T16:09:51Z</time>
+  <course>300.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761510000" lon="-0.006341600">
+  <ele>43.281600</ele>
+<time>2007-10-03T16:09:54Z</time>
+  <course>308.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761518300" lon="-0.006360000">
+  <ele>43.281600</ele>
+<time>2007-10-03T16:09:55Z</time>
+  <course>308.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761543300" lon="-0.006410000">
+  <ele>43.586400</ele>
+<time>2007-10-03T16:09:58Z</time>
+  <course>316.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761555000" lon="-0.006423300">
+  <ele>43.586400</ele>
+<time>2007-10-03T16:09:59Z</time>
+  <course>323.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761591600" lon="-0.006461600">
+  <ele>43.281600</ele>
+<time>2007-10-03T16:10:02Z</time>
+  <course>327.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761603300" lon="-0.006475000">
+  <ele>43.281600</ele>
+<time>2007-10-03T16:10:03Z</time>
+  <course>320.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761638300" lon="-0.006516600">
+  <ele>43.586400</ele>
+<time>2007-10-03T16:10:06Z</time>
+  <course>327.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761651600" lon="-0.006530000">
+  <ele>43.586400</ele>
+<time>2007-10-03T16:10:07Z</time>
+  <course>331.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761688300" lon="-0.006571600">
+  <ele>43.891200</ele>
+<time>2007-10-03T16:10:10Z</time>
+  <course>324.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761700000" lon="-0.006585000">
+  <ele>44.196000</ele>
+<time>2007-10-03T16:10:11Z</time>
+  <course>327.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761738300" lon="-0.006613300">
+  <ele>44.500800</ele>
+<time>2007-10-03T16:10:14Z</time>
+  <course>342.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761765000" lon="-0.006623300">
+  <ele>44.196000</ele>
+<time>2007-10-03T16:10:16Z</time>
+  <course>353.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761780000" lon="-0.006621600">
+  <ele>44.196000</ele>
+<time>2007-10-03T16:10:17Z</time>
+  <course>3.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761823300" lon="-0.006608300">
+  <ele>43.281600</ele>
+<time>2007-10-03T16:10:20Z</time>
+  <course>15.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761836600" lon="-0.006600000">
+  <ele>42.672000</ele>
+<time>2007-10-03T16:10:21Z</time>
+  <course>19.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761878300" lon="-0.006576600">
+  <ele>42.062400</ele>
+<time>2007-10-03T16:10:24Z</time>
+  <course>20.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761891600" lon="-0.006570000">
+  <ele>42.062400</ele>
+<time>2007-10-03T16:10:25Z</time>
+  <course>20.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.761913300" lon="-0.006555000">
+  <ele>41.757600</ele>
+<time>2007-10-03T16:10:28Z</time>
+  <course>25.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.761936600" lon="-0.006541600">
+  <ele>41.757600</ele>
+<time>2007-10-03T16:10:29Z</time>
+  <course>26.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761971600" lon="-0.006508300">
+  <ele>42.062400</ele>
+<time>2007-10-03T16:10:32Z</time>
+  <course>26.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.761983300" lon="-0.006496600">
+  <ele>42.367200</ele>
+<time>2007-10-03T16:10:33Z</time>
+  <course>29.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762020000" lon="-0.006470000">
+  <ele>42.062400</ele>
+<time>2007-10-03T16:10:36Z</time>
+  <course>23.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762033300" lon="-0.006460000">
+  <ele>42.367200</ele>
+<time>2007-10-03T16:10:37Z</time>
+  <course>22.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762058300" lon="-0.006445000">
+  <ele>42.062400</ele>
+<time>2007-10-03T16:10:39Z</time>
+  <course>22.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762080000" lon="-0.006429900">
+  <ele>41.148000</ele>
+<time>2007-10-03T16:10:41Z</time>
+  <course>29.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762110000" lon="-0.006400000">
+  <ele>40.233600</ele>
+<time>2007-10-03T16:10:44Z</time>
+  <course>29.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762123300" lon="-0.006390000">
+  <ele>40.233600</ele>
+<time>2007-10-03T16:10:45Z</time>
+  <course>29.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762151600" lon="-0.006373300">
+  <ele>40.233600</ele>
+<time>2007-10-03T16:10:47Z</time>
+  <course>21.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762193300" lon="-0.006348300">
+  <ele>40.538400</ele>
+<time>2007-10-03T16:10:50Z</time>
+  <course>23.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762206600" lon="-0.006338300">
+  <ele>40.843200</ele>
+<time>2007-10-03T16:10:51Z</time>
+  <course>23.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762249900" lon="-0.006310000">
+  <ele>41.452800</ele>
+<time>2007-10-03T16:10:54Z</time>
+  <course>27.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762261600" lon="-0.006300000">
+  <ele>40.843200</ele>
+<time>2007-10-03T16:10:55Z</time>
+  <course>27.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762296600" lon="-0.006268300">
+  <ele>39.319200</ele>
+<time>2007-10-03T16:10:58Z</time>
+  <course>30.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762308300" lon="-0.006258300">
+  <ele>38.709600</ele>
+<time>2007-10-03T16:10:59Z</time>
+  <course>31.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762346600" lon="-0.006216600">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:11:02Z</time>
+  <course>40.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762356600" lon="-0.006200000">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:11:03Z</time>
+  <course>45.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762381600" lon="-0.006141600">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:11:06Z</time>
+  <course>64.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762388300" lon="-0.006120000">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:11:07Z</time>
+  <course>73.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762403300" lon="-0.006045000">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:11:10Z</time>
+  <course>77.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762408300" lon="-0.006016600">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:11:11Z</time>
+  <course>77.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762423300" lon="-0.005935000">
+  <ele>38.709600</ele>
+<time>2007-10-03T16:11:14Z</time>
+  <course>74.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762431600" lon="-0.005888300">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:11:16Z</time>
+  <course>69.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762436600" lon="-0.005865000">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:11:17Z</time>
+  <course>69.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762455000" lon="-0.005801600">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:11:20Z</time>
+  <course>56.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762463300" lon="-0.005783300">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:11:21Z</time>
+  <course>58.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762486600" lon="-0.005726600">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:11:24Z</time>
+  <course>48.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762496600" lon="-0.005710000">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:11:25Z</time>
+  <course>49.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762528300" lon="-0.005671600">
+  <ele>35.356800</ele>
+<time>2007-10-03T16:11:28Z</time>
+  <course>32.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762540000" lon="-0.005661600">
+  <ele>35.052000</ele>
+<time>2007-10-03T16:11:29Z</time>
+  <course>34.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762578300" lon="-0.005633300">
+  <ele>35.356800</ele>
+<time>2007-10-03T16:11:32Z</time>
+  <course>24.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762593300" lon="-0.005626600">
+  <ele>35.052000</ele>
+<time>2007-10-03T16:11:33Z</time>
+  <course>20.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762621600" lon="-0.005615000">
+  <ele>34.747200</ele>
+<time>2007-10-03T16:11:35Z</time>
+  <course>17.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762653300" lon="-0.005601600">
+  <ele>35.356800</ele>
+<time>2007-10-03T16:11:37Z</time>
+  <course>13.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762703300" lon="-0.005595000">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:11:40Z</time>
+  <course>359.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762720000" lon="-0.005593300">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:11:41Z</time>
+  <course>1.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762768300" lon="-0.005595000">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:11:44Z</time>
+  <course>357.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762800000" lon="-0.005601600">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:11:46Z</time>
+  <course>353.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762815000" lon="-0.005605000">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:11:47Z</time>
+  <course>353.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762861600" lon="-0.005611600">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:11:50Z</time>
+  <course>0.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762876600" lon="-0.005608300">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:11:51Z</time>
+  <course>10.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.762918300" lon="-0.005603300">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:11:54Z</time>
+  <course>92.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762931600" lon="-0.005603300">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:11:55Z</time>
+  <course>46.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.762953300" lon="-0.005605000">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:11:58Z</time>
+  <course>186.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.762953300" lon="-0.005605000">
+  <ele>38.709600</ele>
+<time>2007-10-03T16:11:59Z</time>
+  <course>186.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.762953300" lon="-0.005605000">
+  <ele>38.709600</ele>
+<time>2007-10-03T16:12:02Z</time>
+  <course>186.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.762956600" lon="-0.005601600">
+  <ele>38.709600</ele>
+<time>2007-10-03T16:12:03Z</time>
+  <course>186.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.762956600" lon="-0.005600000">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:12:06Z</time>
+  <course>186.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.762956600" lon="-0.005601600">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:12:07Z</time>
+  <course>186.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.762953300" lon="-0.005606600">
+  <ele>33.832800</ele>
+<time>2007-10-03T16:12:10Z</time>
+  <course>186.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.762951600" lon="-0.005610000">
+  <ele>33.528000</ele>
+<time>2007-10-03T16:12:11Z</time>
+  <course>186.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.762965000" lon="-0.005631600">
+  <ele>33.223200</ele>
+<time>2007-10-03T16:12:14Z</time>
+  <course>326.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.762998300" lon="-0.005711600">
+  <ele>34.137600</ele>
+<time>2007-10-03T16:12:16Z</time>
+  <course>309.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763001600" lon="-0.005720000">
+  <ele>34.137600</ele>
+<time>2007-10-03T16:12:18Z</time>
+  <course>312.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.763025000" lon="-0.005721600">
+  <ele>33.832800</ele>
+<time>2007-10-03T16:12:20Z</time>
+  <course>29.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763025000" lon="-0.005721600">
+  <ele>33.832800</ele>
+<time>2007-10-03T16:12:21Z</time>
+  <course>29.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.763066600" lon="-0.005625000">
+  <ele>33.223200</ele>
+<time>2007-10-03T16:12:24Z</time>
+  <course>64.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763074900" lon="-0.005600000">
+  <ele>33.223200</ele>
+<time>2007-10-03T16:12:25Z</time>
+  <course>68.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763096600" lon="-0.005538300">
+  <ele>33.528000</ele>
+<time>2007-10-03T16:12:28Z</time>
+  <course>59.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763103300" lon="-0.005518300">
+  <ele>33.528000</ele>
+<time>2007-10-03T16:12:29Z</time>
+  <course>59.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763130000" lon="-0.005446600">
+  <ele>34.442400</ele>
+<time>2007-10-03T16:12:32Z</time>
+  <course>61.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763140000" lon="-0.005421600">
+  <ele>34.747200</ele>
+<time>2007-10-03T16:12:33Z</time>
+  <course>60.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763168300" lon="-0.005350000">
+  <ele>35.661600</ele>
+<time>2007-10-03T16:12:36Z</time>
+  <course>64.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763176600" lon="-0.005328300">
+  <ele>35.661600</ele>
+<time>2007-10-03T16:12:37Z</time>
+  <course>66.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763198300" lon="-0.005256600">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:12:40Z</time>
+  <course>69.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763203300" lon="-0.005231600">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:12:41Z</time>
+  <course>74.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763224900" lon="-0.005168300">
+  <ele>39.014400</ele>
+<time>2007-10-03T16:12:44Z</time>
+  <course>66.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763236600" lon="-0.005125000">
+  <ele>39.624000</ele>
+<time>2007-10-03T16:12:46Z</time>
+  <course>67.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763236600" lon="-0.005125000">
+  <ele>39.624000</ele>
+<time>2007-10-03T16:12:47Z</time>
+  <course>67.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.763265000" lon="-0.005040000">
+  <ele>41.452800</ele>
+<time>2007-10-03T16:12:50Z</time>
+  <course>58.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763273300" lon="-0.005021600">
+  <ele>41.148000</ele>
+<time>2007-10-03T16:12:51Z</time>
+  <course>46.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763305000" lon="-0.004971600">
+  <ele>40.538400</ele>
+<time>2007-10-03T16:12:54Z</time>
+  <course>45.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763314900" lon="-0.004955000">
+  <ele>40.538400</ele>
+<time>2007-10-03T16:12:55Z</time>
+  <course>44.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763350000" lon="-0.004909900">
+  <ele>39.624000</ele>
+<time>2007-10-03T16:12:58Z</time>
+  <course>40.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763359900" lon="-0.004895000">
+  <ele>39.319200</ele>
+<time>2007-10-03T16:12:59Z</time>
+  <course>43.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763391600" lon="-0.004846600">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:13:02Z</time>
+  <course>42.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763403300" lon="-0.004831600">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:13:03Z</time>
+  <course>46.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763438300" lon="-0.004793300">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:13:06Z</time>
+  <course>19.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763453300" lon="-0.004785000">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:13:07Z</time>
+  <course>13.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763501600" lon="-0.004773300">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:13:10Z</time>
+  <course>11.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763518300" lon="-0.004766600">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:13:11Z</time>
+  <course>15.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763551600" lon="-0.004726600">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:13:14Z</time>
+  <course>48.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763569900" lon="-0.004698300">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:13:16Z</time>
+  <course>36.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763590000" lon="-0.004686600">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:13:18Z</time>
+  <course>24.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763611600" lon="-0.004671600">
+  <ele>39.014400</ele>
+<time>2007-10-03T16:13:20Z</time>
+  <course>20.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763623300" lon="-0.004665000">
+  <ele>39.319200</ele>
+<time>2007-10-03T16:13:21Z</time>
+  <course>20.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763633300" lon="-0.004658300">
+  <ele>39.928800</ele>
+<time>2007-10-03T16:13:24Z</time>
+  <course>20.000000</course>
+  <speed>0.000000</speed>
+</trkpt>
+<trkpt lat="51.763659900" lon="-0.004631600">
+  <ele>40.538400</ele>
+<time>2007-10-03T16:13:25Z</time>
+  <course>36.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763686600" lon="-0.004583300">
+  <ele>40.538400</ele>
+<time>2007-10-03T16:13:28Z</time>
+  <course>44.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763695000" lon="-0.004568300">
+  <ele>40.538400</ele>
+<time>2007-10-03T16:13:29Z</time>
+  <course>43.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763723300" lon="-0.004520000">
+  <ele>40.233600</ele>
+<time>2007-10-03T16:13:32Z</time>
+  <course>48.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763730000" lon="-0.004503300">
+  <ele>39.928800</ele>
+<time>2007-10-03T16:13:33Z</time>
+  <course>51.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763755000" lon="-0.004455000">
+  <ele>39.624000</ele>
+<time>2007-10-03T16:13:36Z</time>
+  <course>47.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763763300" lon="-0.004438300">
+  <ele>39.624000</ele>
+<time>2007-10-03T16:13:37Z</time>
+  <course>48.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763790000" lon="-0.004390000">
+  <ele>39.014400</ele>
+<time>2007-10-03T16:13:40Z</time>
+  <course>49.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763798300" lon="-0.004373300">
+  <ele>39.014400</ele>
+<time>2007-10-03T16:13:41Z</time>
+  <course>48.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763823300" lon="-0.004323300">
+  <ele>38.100000</ele>
+<time>2007-10-03T16:13:44Z</time>
+  <course>48.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763843300" lon="-0.004295000">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:13:46Z</time>
+  <course>45.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763853300" lon="-0.004279900">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:13:47Z</time>
+  <course>46.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763880000" lon="-0.004233300">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:13:50Z</time>
+  <course>52.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763888300" lon="-0.004216600">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:13:51Z</time>
+  <course>54.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763910000" lon="-0.004166600">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:13:54Z</time>
+  <course>54.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.763916600" lon="-0.004146600">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:13:55Z</time>
+  <course>58.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763941600" lon="-0.004090000">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:13:58Z</time>
+  <course>51.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763950000" lon="-0.004071600">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:13:59Z</time>
+  <course>55.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763973300" lon="-0.004013300">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:14:02Z</time>
+  <course>56.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.763981600" lon="-0.003995000">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:14:03Z</time>
+  <course>54.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764006600" lon="-0.003933300">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:14:06Z</time>
+  <course>55.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764016600" lon="-0.003915000">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:14:07Z</time>
+  <course>51.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764041600" lon="-0.003860000">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:14:10Z</time>
+  <course>56.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764046600" lon="-0.003843300">
+  <ele>35.661600</ele>
+<time>2007-10-03T16:14:11Z</time>
+  <course>60.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764068300" lon="-0.003785000">
+  <ele>35.661600</ele>
+<time>2007-10-03T16:14:14Z</time>
+  <course>55.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764084900" lon="-0.003748300">
+  <ele>35.356800</ele>
+<time>2007-10-03T16:14:16Z</time>
+  <course>55.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764101600" lon="-0.003710000">
+  <ele>35.661600</ele>
+<time>2007-10-03T16:14:18Z</time>
+  <course>61.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764118300" lon="-0.003666600">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:14:20Z</time>
+  <course>62.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764126600" lon="-0.003646600">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:14:21Z</time>
+  <course>59.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764151600" lon="-0.003583300">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:14:24Z</time>
+  <course>60.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764159900" lon="-0.003560000">
+  <ele>37.185600</ele>
+<time>2007-10-03T16:14:25Z</time>
+  <course>57.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764186600" lon="-0.003493300">
+  <ele>39.319200</ele>
+<time>2007-10-03T16:14:28Z</time>
+  <course>60.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.764195000" lon="-0.003471600">
+  <ele>39.624000</ele>
+<time>2007-10-03T16:14:29Z</time>
+  <course>61.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.764218300" lon="-0.003413300">
+  <ele>39.928800</ele>
+<time>2007-10-03T16:14:32Z</time>
+  <course>55.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764226600" lon="-0.003395000">
+  <ele>39.928800</ele>
+<time>2007-10-03T16:14:33Z</time>
+  <course>59.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764248300" lon="-0.003341600">
+  <ele>39.624000</ele>
+<time>2007-10-03T16:14:36Z</time>
+  <course>54.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.764253300" lon="-0.003325000">
+  <ele>39.319200</ele>
+<time>2007-10-03T16:14:37Z</time>
+  <course>56.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.764271600" lon="-0.003268300">
+  <ele>38.404800</ele>
+<time>2007-10-03T16:14:40Z</time>
+  <course>62.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764278300" lon="-0.003250000">
+  <ele>37.795200</ele>
+<time>2007-10-03T16:14:41Z</time>
+  <course>61.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.764301600" lon="-0.003201600">
+  <ele>36.576000</ele>
+<time>2007-10-03T16:14:44Z</time>
+  <course>35.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764324900" lon="-0.003189900">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:14:46Z</time>
+  <course>11.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764354900" lon="-0.003189900">
+  <ele>35.966400</ele>
+<time>2007-10-03T16:14:48Z</time>
+  <course>346.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764386600" lon="-0.003203300">
+  <ele>36.880800</ele>
+<time>2007-10-03T16:14:50Z</time>
+  <course>341.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764401600" lon="-0.003210000">
+  <ele>37.490400</ele>
+<time>2007-10-03T16:14:51Z</time>
+  <course>334.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764444900" lon="-0.003236600">
+  <ele>38.709600</ele>
+<time>2007-10-03T16:14:54Z</time>
+  <course>335.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764458300" lon="-0.003246600">
+  <ele>39.014400</ele>
+<time>2007-10-03T16:14:55Z</time>
+  <course>335.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.764500000" lon="-0.003268300">
+  <ele>39.624000</ele>
+<time>2007-10-03T16:14:58Z</time>
+  <course>349.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.764515000" lon="-0.003263300">
+  <ele>39.928800</ele>
+<time>2007-10-03T16:14:59Z</time>
+  <course>11.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764563300" lon="-0.003246600">
+  <ele>41.452800</ele>
+<time>2007-10-03T16:15:02Z</time>
+  <course>2.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764578300" lon="-0.003243300">
+  <ele>42.062400</ele>
+<time>2007-10-03T16:15:03Z</time>
+  <course>5.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764621600" lon="-0.003235000">
+  <ele>42.672000</ele>
+<time>2007-10-03T16:15:06Z</time>
+  <course>1.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764635000" lon="-0.003236600">
+  <ele>42.672000</ele>
+<time>2007-10-03T16:15:07Z</time>
+  <course>354.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764673300" lon="-0.003251600">
+  <ele>42.976800</ele>
+<time>2007-10-03T16:15:10Z</time>
+  <course>348.000000</course>
+  <speed>1.666667</speed>
+</trkpt>
+<trkpt lat="51.764686600" lon="-0.003255000">
+  <ele>42.976800</ele>
+<time>2007-10-03T16:15:11Z</time>
+  <course>175.000000</course>
+  <speed>1.111111</speed>
+</trkpt>
+<trkpt lat="51.764718300" lon="-0.003238300">
+  <ele>43.586400</ele>
+<time>2007-10-03T16:15:14Z</time>
+  <course>45.000000</course>
+  <speed>0.555556</speed>
+</trkpt>
+</trkseg>
+</trk>
+</gpx>
diff --git a/reference/navilink_tracks.trk b/reference/navilink_tracks.trk
new file mode 100755 (executable)
index 0000000..13ba97f
Binary files /dev/null and b/reference/navilink_tracks.trk differ
diff --git a/reference/navilink_tracks_gpx.trk b/reference/navilink_tracks_gpx.trk
new file mode 100755 (executable)
index 0000000..e03359d
Binary files /dev/null and b/reference/navilink_tracks_gpx.trk differ
diff --git a/reference/navilink_waypoints.gpx b/reference/navilink_waypoints.gpx
new file mode 100644 (file)
index 0000000..fbd8ef8
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<bounds minlat="51.759301600" minlon="-0.008520000" maxlat="51.775566600" maxlon="0.004690000"/>
+<wpt lat="51.768668300" lon="0.003845000">
+  <ele>67.970400</ele>
+<time>2007-09-27T13:37:38Z</time>
+  <name>M000</name>
+  <cmt>M000</cmt>
+  <desc>M000</desc>
+  <sym>Star</sym>
+</wpt>
+<wpt lat="51.768668300" lon="0.003845000">
+  <ele>67.970400</ele>
+<time>2007-10-03T17:04:53Z</time>
+  <name>M000</name>
+  <cmt>M000</cmt>
+  <desc>M000</desc>
+  <sym>Star</sym>
+</wpt>
+<wpt lat="51.775566600" lon="0.004690000">
+  <ele>0.000000</ele>
+<time>2007-09-29T14:45:02Z</time>
+  <name>M001</name>
+  <cmt>M001</cmt>
+  <desc>M001</desc>
+  <sym>Star</sym>
+</wpt>
+<wpt lat="51.775566600" lon="0.004690000">
+  <ele>0.000000</ele>
+<time>2007-10-03T17:04:53Z</time>
+  <name>M001</name>
+  <cmt>M001</cmt>
+  <desc>M001</desc>
+  <sym>Star</sym>
+</wpt>
+<wpt lat="51.759301600" lon="-0.008520000">
+  <ele>36.271200</ele>
+<time>2007-10-03T16:04:48Z</time>
+  <name>M002</name>
+  <cmt>M002</cmt>
+  <desc>M002</desc>
+  <sym>Star</sym>
+</wpt>
+<wpt lat="51.759301600" lon="-0.008520000">
+  <ele>36.271200</ele>
+<time>2007-10-03T17:04:53Z</time>
+  <name>M002</name>
+  <cmt>M002</cmt>
+  <desc>M002</desc>
+  <sym>Star</sym>
+</wpt>
+<wpt lat="51.759565000" lon="-0.008035000">
+  <ele>35.356800</ele>
+<time>2007-10-03T16:07:12Z</time>
+  <name>SUBWAY</name>
+  <cmt>SUBWAY</cmt>
+  <desc>SUBWAY</desc>
+  <sym>Star</sym>
+</wpt>
+<wpt lat="51.759565000" lon="-0.008035000">
+  <ele>35.356800</ele>
+<time>2007-10-03T17:04:53Z</time>
+  <name>SUBWAY</name>
+  <cmt>SUBWAY</cmt>
+  <desc>SUBWAY</desc>
+  <sym>Star</sym>
+</wpt>
+</gpx>
diff --git a/reference/navilink_waypoints.wpt b/reference/navilink_waypoints.wpt
new file mode 100755 (executable)
index 0000000..0dd8f06
Binary files /dev/null and b/reference/navilink_waypoints.wpt differ
diff --git a/reference/navilink_waypoints_gpx.wpt b/reference/navilink_waypoints_gpx.wpt
new file mode 100644 (file)
index 0000000..13f994b
Binary files /dev/null and b/reference/navilink_waypoints_gpx.wpt differ
diff --git a/reference/nokia.lmx b/reference/nokia.lmx
new file mode 100644 (file)
index 0000000..1807707
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" ?>
+<lm:lmx xmlns:lm="http://www.nokia.com/schemas/location/landmarks/1/0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nokia.com/schemas/location/landmarks/1/0/lmx.xsd">  <lm:landmarkCollection>
+    <lm:landmark>
+        <lm:name>GCEBB</lm:name>
+        <lm:description>Mountain Bike Heaven by susy1313</lm:description>
+        <lm:coordinates>
+          <lm:latitude>35.972033</lm:latitude>
+          <lm:longitude>-87.134700</lm:longitude>
+        </lm:coordinates>
+        <lm:mediaLink>
+          <lm:name>Cache Details</lm:name>
+          <lm:url>http://www.geocaching.com/seek/cache_details.asp?ID=3771</lm:url>
+        </lm:mediaLink>
+    </lm:landmark>
+    <lm:landmark>
+        <lm:name>GC1A37</lm:name>
+        <lm:description>The Troll by a182pilot &amp; Family</lm:description>
+        <lm:coordinates>
+          <lm:latitude>36.090683</lm:latitude>
+          <lm:longitude>-86.679550</lm:longitude>
+        </lm:coordinates>
+        <lm:mediaLink>
+          <lm:name>Cache Details</lm:name>
+          <lm:url>http://www.geocaching.com/seek/cache_details.asp?ID=6711</lm:url>
+        </lm:mediaLink>
+    </lm:landmark>
+    <lm:landmark>
+        <lm:name>GC1C2B</lm:name>
+        <lm:description>Dive Bomber by JoGPS &amp; family</lm:description>
+        <lm:coordinates>
+          <lm:latitude>35.996267</lm:latitude>
+          <lm:longitude>-86.620117</lm:longitude>
+        </lm:coordinates>
+        <lm:mediaLink>
+          <lm:name>Cache Details</lm:name>
+          <lm:url>http://www.geocaching.com/seek/cache_details.asp?ID=7211</lm:url>
+        </lm:mediaLink>
+    </lm:landmark>
+    <lm:landmark>
+        <lm:name>GC25A9</lm:name>
+        <lm:description>FOSTER by JoGPS &amp; Family</lm:description>
+        <lm:coordinates>
+          <lm:latitude>36.038483</lm:latitude>
+          <lm:longitude>-86.648617</lm:longitude>
+        </lm:coordinates>
+        <lm:mediaLink>
+          <lm:name>Cache Details</lm:name>
+          <lm:url>http://www.geocaching.com/seek/cache_details.asp?ID=9641</lm:url>
+        </lm:mediaLink>
+    </lm:landmark>
+    <lm:landmark>
+        <lm:name>GC2723</lm:name>
+        <lm:description>Logan Lighthouse by JoGps &amp; Family</lm:description>
+        <lm:coordinates>
+          <lm:latitude>36.112183</lm:latitude>
+          <lm:longitude>-86.741767</lm:longitude>
+        </lm:coordinates>
+        <lm:mediaLink>
+          <lm:name>Cache Details</lm:name>
+          <lm:url>http://www.geocaching.com/seek/cache_details.asp?ID=10019</lm:url>
+        </lm:mediaLink>
+    </lm:landmark>
+    <lm:landmark>
+        <lm:name>GC2B71</lm:name>
+        <lm:description>Ganier Cache by Susy1313</lm:description>
+        <lm:coordinates>
+          <lm:latitude>36.064083</lm:latitude>
+          <lm:longitude>-86.790517</lm:longitude>
+        </lm:coordinates>
+        <lm:mediaLink>
+          <lm:name>Cache Details</lm:name>
+          <lm:url>http://www.geocaching.com/seek/cache_details.asp?ID=11121</lm:url>
+        </lm:mediaLink>
+    </lm:landmark>
+    <lm:landmark>
+        <lm:name>GC309F</lm:name>
+        <lm:description>Shy&apos;s Hill by FireFighterEng33</lm:description>
+        <lm:coordinates>
+          <lm:latitude>36.087767</lm:latitude>
+          <lm:longitude>-86.809733</lm:longitude>
+        </lm:coordinates>
+        <lm:mediaLink>
+          <lm:name>Cache Details</lm:name>
+          <lm:url>http://www.geocaching.com/seek/cache_details.asp?ID=12447</lm:url>
+        </lm:mediaLink>
+    </lm:landmark>
+    <lm:landmark>
+        <lm:name>GC317A</lm:name>
+        <lm:description>GittyUp by JoGPS / Warner Parks</lm:description>
+        <lm:coordinates>
+          <lm:latitude>36.057500</lm:latitude>
+          <lm:longitude>-86.892000</lm:longitude>
+        </lm:coordinates>
+        <lm:mediaLink>
+          <lm:name>Cache Details</lm:name>
+          <lm:url>http://www.geocaching.com/seek/cache_details.asp?ID=12666</lm:url>
+        </lm:mediaLink>
+    </lm:landmark>
+    <lm:landmark>
+        <lm:name>GC317D</lm:name>
+        <lm:description>Inlighting by JoGPS / Warner Parks</lm:description>
+        <lm:coordinates>
+          <lm:latitude>36.082800</lm:latitude>
+          <lm:longitude>-86.867283</lm:longitude>
+        </lm:coordinates>
+        <lm:mediaLink>
+          <lm:name>Cache Details</lm:name>
+          <lm:url>http://www.geocaching.com/seek/cache_details.asp?ID=12669</lm:url>
+        </lm:mediaLink>
+    </lm:landmark>
+  </lm:landmarkCollection>
+</lm:lmx>
diff --git a/reference/osm-data.gpx b/reference/osm-data.gpx
new file mode 100644 (file)
index 0000000..ec340db
--- /dev/null
@@ -0,0 +1,400 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<bounds minlat="48.142198200" minlon="11.532774100" maxlat="48.146356200" maxlon="11.546733100"/>
+<wpt lat="48.142198200" lon="11.541224300">
+<time>2008-03-06T19:16:18Z</time>
+  <name>osm-id 250870628</name>
+  <cmt>osm-id 250870628</cmt>
+  <desc>osm-id 250870628</desc>
+</wpt>
+<wpt lat="48.144905900" lon="11.541171100">
+<time>2006-12-14T23:22:36Z</time>
+  <name>osm-id 21585826</name>
+  <cmt>osm-id 21585826</cmt>
+  <desc>osm-id 21585826</desc>
+</wpt>
+<wpt lat="48.144466600" lon="11.540724400">
+<time>2006-12-29T14:41:35Z</time>
+  <name>osm-id 21585827</name>
+  <cmt>osm-id 21585827</cmt>
+  <desc>osm-id 21585827</desc>
+</wpt>
+<wpt lat="48.144878800" lon="11.542666600">
+<time>2006-11-30T14:20:49Z</time>
+  <name>osm-id 21324374</name>
+  <cmt>osm-id 21324374</cmt>
+  <desc>osm-id 21324374</desc>
+</wpt>
+<wpt lat="48.146356200" lon="11.535740000">
+<time>2008-02-10T13:05:27Z</time>
+  <name>osm-id 245339</name>
+  <cmt>osm-id 245339</cmt>
+  <desc>osm-id 245339</desc>
+</wpt>
+<wpt lat="48.146296000" lon="11.536311800">
+<time>2008-02-10T13:05:27Z</time>
+  <name>osm-id 245353</name>
+  <cmt>osm-id 245353</cmt>
+  <desc>osm-id 245353</desc>
+</wpt>
+<wpt lat="48.145241000" lon="11.541552300">
+<time>2007-02-07T16:49:43Z</time>
+  <name>osm-id 398692</name>
+  <cmt>osm-id 398692</cmt>
+  <desc>osm-id 398692</desc>
+</wpt>
+<wpt lat="48.145220900" lon="11.540887000">
+<time>2006-12-18T10:06:05Z</time>
+  <name>osm-id 398694</name>
+  <cmt>osm-id 398694</cmt>
+  <desc>osm-id 398694</desc>
+</wpt>
+<wpt lat="48.145323400" lon="11.540503700">
+<time>2006-12-18T10:06:05Z</time>
+  <name>osm-id 398704</name>
+  <cmt>osm-id 398704</cmt>
+  <desc>osm-id 398704</desc>
+</wpt>
+<wpt lat="48.145746800" lon="11.538671100">
+<time>2006-12-18T10:07:09Z</time>
+  <name>osm-id 398705</name>
+  <cmt>osm-id 398705</cmt>
+  <desc>osm-id 398705</desc>
+</wpt>
+<wpt lat="48.146225900" lon="11.536977500">
+<time>2006-08-28T22:19:19Z</time>
+  <name>osm-id 398710</name>
+  <cmt>osm-id 398710</cmt>
+  <desc>osm-id 398710</desc>
+</wpt>
+<wpt lat="48.144241300" lon="11.545447000">
+<time>2006-10-24T12:41:23Z</time>
+  <name>osm-id 19404292</name>
+  <cmt>osm-id 19404292</cmt>
+  <desc>osm-id 19404292</desc>
+</wpt>
+<wpt lat="48.146104400" lon="11.536904100">
+<time>2006-11-17T12:37:19Z</time>
+  <name>osm-id 21040287</name>
+  <cmt>osm-id 21040287</cmt>
+  <desc>osm-id 21040287</desc>
+</wpt>
+<wpt lat="48.146221200" lon="11.535614400">
+<time>2008-02-10T13:05:37Z</time>
+  <name>osm-id 21040288</name>
+  <cmt>osm-id 21040288</cmt>
+  <desc>osm-id 21040288</desc>
+</wpt>
+<wpt lat="48.146179300" lon="11.536204200">
+<time>2008-02-10T13:05:36Z</time>
+  <name>osm-id 21040289</name>
+  <cmt>osm-id 21040289</cmt>
+  <desc>osm-id 21040289</desc>
+</wpt>
+<wpt lat="48.145943200" lon="11.537772800">
+<time>2006-12-18T10:06:05Z</time>
+  <name>osm-id 21040291</name>
+  <cmt>osm-id 21040291</cmt>
+  <desc>osm-id 21040291</desc>
+</wpt>
+<wpt lat="48.146265700" lon="11.536599800">
+<time>2008-02-10T13:05:26Z</time>
+  <name>osm-id 21040296</name>
+  <cmt>osm-id 21040296</cmt>
+  <desc>osm-id 21040296</desc>
+</wpt>
+<wpt lat="48.143935300" lon="11.546733100">
+<time>2006-11-30T14:20:49Z</time>
+  <name>osm-id 21324375</name>
+  <cmt>osm-id 21324375</cmt>
+  <desc>osm-id 21324375</desc>
+</wpt>
+<wpt lat="48.145147100" lon="11.541886000">
+<time>2006-12-18T10:06:06Z</time>
+  <name>osm-id 21324376</name>
+  <cmt>osm-id 21324376</cmt>
+  <desc>osm-id 21324376</desc>
+</wpt>
+<wpt lat="48.145350600" lon="11.540937600">
+<time>2006-12-18T10:06:04Z</time>
+  <name>osm-id 21324380</name>
+  <cmt>osm-id 21324380</cmt>
+  <desc>osm-id 21324380</desc>
+</wpt>
+<wpt lat="48.145450700" lon="11.540562900">
+<time>2006-12-18T10:06:07Z</time>
+  <name>osm-id 21324381</name>
+  <cmt>osm-id 21324381</cmt>
+  <desc>osm-id 21324381</desc>
+</wpt>
+<wpt lat="48.145913500" lon="11.538651000">
+<time>2006-12-18T10:06:04Z</time>
+  <name>osm-id 21324382</name>
+  <cmt>osm-id 21324382</cmt>
+  <desc>osm-id 21324382</desc>
+</wpt>
+<wpt lat="48.144707800" lon="11.538416800">
+<time>2007-06-27T18:34:56Z</time>
+  <name>osm-id 21585828</name>
+  <cmt>osm-id 21585828</cmt>
+  <desc>osm-id 21585828</desc>
+</wpt>
+<wpt lat="48.145120600" lon="11.541408700">
+<time>2006-12-18T10:06:01Z</time>
+  <name>osm-id 21632176</name>
+  <cmt>osm-id 21632176</cmt>
+  <desc>osm-id 21632176</desc>
+</wpt>
+<wpt lat="48.143974700" lon="11.545326200">
+<time>2007-06-27T18:34:56Z</time>
+  <name>osm-id 21632177</name>
+  <cmt>osm-id 21632177</cmt>
+  <desc>osm-id 21632177</desc>
+</wpt>
+<wpt lat="48.142325900" lon="11.532774100">
+<time>2008-03-06T19:16:17Z</time>
+  <name>osm-id 250870622</name>
+  <cmt>osm-id 250870622</cmt>
+  <desc>osm-id 250870622</desc>
+</wpt>
+<wpt lat="48.142383900" lon="11.535803100">
+<time>2008-03-06T19:16:17Z</time>
+  <name>osm-id 250870624</name>
+  <cmt>osm-id 250870624</cmt>
+  <desc>osm-id 250870624</desc>
+</wpt>
+<wpt lat="48.142360800" lon="11.538405500">
+<time>2008-03-06T19:16:17Z</time>
+  <name>osm-id 250870626</name>
+  <cmt>osm-id 250870626</cmt>
+  <desc>osm-id 250870626</desc>
+</wpt>
+<rte>
+  <name>Arnulfstraße</name>
+  <desc>osm-id 4020271</desc>
+  <rtept lat="48.144878800" lon="11.542666600">
+<time>2006-11-30T14:20:49Z</time>
+    <name>osm-id 21324374</name>
+    <cmt>osm-id 21324374</cmt>
+    <desc>osm-id 21324374</desc>
+  </rtept>
+  <rtept lat="48.145147100" lon="11.541886000">
+<time>2006-12-18T10:06:06Z</time>
+    <name>osm-id 21324376</name>
+    <cmt>osm-id 21324376</cmt>
+    <desc>osm-id 21324376</desc>
+  </rtept>
+  <rtept lat="48.145241000" lon="11.541552300">
+<time>2007-02-07T16:49:43Z</time>
+    <name>osm-id 398692</name>
+    <cmt>osm-id 398692</cmt>
+    <desc>osm-id 398692</desc>
+  </rtept>
+  <rtept lat="48.145350600" lon="11.540937600">
+<time>2006-12-18T10:06:04Z</time>
+    <name>osm-id 21324380</name>
+    <cmt>osm-id 21324380</cmt>
+    <desc>osm-id 21324380</desc>
+  </rtept>
+  <rtept lat="48.145450700" lon="11.540562900">
+<time>2006-12-18T10:06:07Z</time>
+    <name>osm-id 21324381</name>
+    <cmt>osm-id 21324381</cmt>
+    <desc>osm-id 21324381</desc>
+  </rtept>
+  <rtept lat="48.145913500" lon="11.538651000">
+<time>2006-12-18T10:06:04Z</time>
+    <name>osm-id 21324382</name>
+    <cmt>osm-id 21324382</cmt>
+    <desc>osm-id 21324382</desc>
+  </rtept>
+  <rtept lat="48.146225900" lon="11.536977500">
+<time>2006-08-28T22:19:19Z</time>
+    <name>osm-id 398710</name>
+    <cmt>osm-id 398710</cmt>
+    <desc>osm-id 398710</desc>
+  </rtept>
+  <rtept lat="48.146265700" lon="11.536599800">
+<time>2008-02-10T13:05:26Z</time>
+    <name>osm-id 21040296</name>
+    <cmt>osm-id 21040296</cmt>
+    <desc>osm-id 21040296</desc>
+  </rtept>
+  <rtept lat="48.146296000" lon="11.536311800">
+<time>2008-02-10T13:05:27Z</time>
+    <name>osm-id 245353</name>
+    <cmt>osm-id 245353</cmt>
+    <desc>osm-id 245353</desc>
+  </rtept>
+  <rtept lat="48.146356200" lon="11.535740000">
+<time>2008-02-10T13:05:27Z</time>
+    <name>osm-id 245339</name>
+    <cmt>osm-id 245339</cmt>
+    <desc>osm-id 245339</desc>
+  </rtept>
+</rte>
+<rte>
+  <name>Arnulfstraße</name>
+  <desc>osm-id 4020916</desc>
+  <rtept lat="48.144878800" lon="11.542666600">
+<time>2006-11-30T14:20:49Z</time>
+    <name>osm-id 21324374</name>
+    <cmt>osm-id 21324374</cmt>
+    <desc>osm-id 21324374</desc>
+  </rtept>
+  <rtept lat="48.144241300" lon="11.545447000">
+<time>2006-10-24T12:41:23Z</time>
+    <name>osm-id 19404292</name>
+    <cmt>osm-id 19404292</cmt>
+    <desc>osm-id 19404292</desc>
+  </rtept>
+  <rtept lat="48.143935300" lon="11.546733100">
+<time>2006-11-30T14:20:49Z</time>
+    <name>osm-id 21324375</name>
+    <cmt>osm-id 21324375</cmt>
+    <desc>osm-id 21324375</desc>
+  </rtept>
+</rte>
+<rte>
+  <name>Helmholtzstraße</name>
+  <desc>osm-id 4078867</desc>
+  <rtept lat="48.145241000" lon="11.541552300">
+<time>2007-02-07T16:49:43Z</time>
+    <name>osm-id 398692</name>
+    <cmt>osm-id 398692</cmt>
+    <desc>osm-id 398692</desc>
+  </rtept>
+  <rtept lat="48.145120600" lon="11.541408700">
+<time>2006-12-18T10:06:01Z</time>
+    <name>osm-id 21632176</name>
+    <cmt>osm-id 21632176</cmt>
+    <desc>osm-id 21632176</desc>
+  </rtept>
+  <rtept lat="48.144905900" lon="11.541171100">
+<time>2006-12-14T23:22:36Z</time>
+    <name>osm-id 21585826</name>
+    <cmt>osm-id 21585826</cmt>
+    <desc>osm-id 21585826</desc>
+  </rtept>
+  <rtept lat="48.144466600" lon="11.540724400">
+<time>2006-12-29T14:41:35Z</time>
+    <name>osm-id 21585827</name>
+    <cmt>osm-id 21585827</cmt>
+    <desc>osm-id 21585827</desc>
+  </rtept>
+</rte>
+<rte>
+  <name>Marlene-Dietrich-Straße</name>
+  <desc>osm-id 4078868</desc>
+  <rtept lat="48.143974700" lon="11.545326200">
+<time>2007-06-27T18:34:56Z</time>
+    <name>osm-id 21632177</name>
+    <cmt>osm-id 21632177</cmt>
+    <desc>osm-id 21632177</desc>
+  </rtept>
+  <rtept lat="48.144466600" lon="11.540724400">
+<time>2006-12-29T14:41:35Z</time>
+    <name>osm-id 21585827</name>
+    <cmt>osm-id 21585827</cmt>
+    <desc>osm-id 21585827</desc>
+  </rtept>
+  <rtept lat="48.144707800" lon="11.538416800">
+<time>2007-06-27T18:34:56Z</time>
+    <name>osm-id 21585828</name>
+    <cmt>osm-id 21585828</cmt>
+    <desc>osm-id 21585828</desc>
+  </rtept>
+</rte>
+<rte>
+  <name>Arnulfstraße</name>
+  <desc>osm-id 4513917</desc>
+  <rtept lat="48.146221200" lon="11.535614400">
+<time>2008-02-10T13:05:37Z</time>
+    <name>osm-id 21040288</name>
+    <cmt>osm-id 21040288</cmt>
+    <desc>osm-id 21040288</desc>
+  </rtept>
+  <rtept lat="48.146179300" lon="11.536204200">
+<time>2008-02-10T13:05:36Z</time>
+    <name>osm-id 21040289</name>
+    <cmt>osm-id 21040289</cmt>
+    <desc>osm-id 21040289</desc>
+  </rtept>
+  <rtept lat="48.146104400" lon="11.536904100">
+<time>2006-11-17T12:37:19Z</time>
+    <name>osm-id 21040287</name>
+    <cmt>osm-id 21040287</cmt>
+    <desc>osm-id 21040287</desc>
+  </rtept>
+  <rtept lat="48.145943200" lon="11.537772800">
+<time>2006-12-18T10:06:05Z</time>
+    <name>osm-id 21040291</name>
+    <cmt>osm-id 21040291</cmt>
+    <desc>osm-id 21040291</desc>
+  </rtept>
+  <rtept lat="48.145746800" lon="11.538671100">
+<time>2006-12-18T10:07:09Z</time>
+    <name>osm-id 398705</name>
+    <cmt>osm-id 398705</cmt>
+    <desc>osm-id 398705</desc>
+  </rtept>
+  <rtept lat="48.145323400" lon="11.540503700">
+<time>2006-12-18T10:06:05Z</time>
+    <name>osm-id 398704</name>
+    <cmt>osm-id 398704</cmt>
+    <desc>osm-id 398704</desc>
+  </rtept>
+  <rtept lat="48.145220900" lon="11.540887000">
+<time>2006-12-18T10:06:05Z</time>
+    <name>osm-id 398694</name>
+    <cmt>osm-id 398694</cmt>
+    <desc>osm-id 398694</desc>
+  </rtept>
+  <rtept lat="48.145120600" lon="11.541408700">
+<time>2006-12-18T10:06:01Z</time>
+    <name>osm-id 21632176</name>
+    <cmt>osm-id 21632176</cmt>
+    <desc>osm-id 21632176</desc>
+  </rtept>
+  <rtept lat="48.144878800" lon="11.542666600">
+<time>2006-11-30T14:20:49Z</time>
+    <name>osm-id 21324374</name>
+    <cmt>osm-id 21324374</cmt>
+    <desc>osm-id 21324374</desc>
+  </rtept>
+</rte>
+<rte>
+  <name>S7</name>
+  <desc>osm-id 23197114</desc>
+  <rtept lat="48.142325900" lon="11.532774100">
+<time>2008-03-06T19:16:17Z</time>
+    <name>osm-id 250870622</name>
+    <cmt>osm-id 250870622</cmt>
+    <desc>osm-id 250870622</desc>
+  </rtept>
+  <rtept lat="48.142383900" lon="11.535803100">
+<time>2008-03-06T19:16:17Z</time>
+    <name>osm-id 250870624</name>
+    <cmt>osm-id 250870624</cmt>
+    <desc>osm-id 250870624</desc>
+  </rtept>
+  <rtept lat="48.142360800" lon="11.538405500">
+<time>2008-03-06T19:16:17Z</time>
+    <name>osm-id 250870626</name>
+    <cmt>osm-id 250870626</cmt>
+    <desc>osm-id 250870626</desc>
+  </rtept>
+  <rtept lat="48.142198200" lon="11.541224300">
+<time>2008-03-06T19:16:18Z</time>
+    <name>osm-id 250870628</name>
+    <cmt>osm-id 250870628</cmt>
+    <desc>osm-id 250870628</desc>
+  </rtept>
+</rte>
+</gpx>
diff --git a/reference/osm-data.xml b/reference/osm-data.xml
new file mode 100644 (file)
index 0000000..ecbf0aa
--- /dev/null
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<osm version="0.5" generator="OpenStreetMap server">
+  <node id="250870628" lat="48.1421982" lon="11.5412243" user="user_4133" visible="true" timestamp="2008-03-06T19:16:18+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21585826" lat="48.1449059" lon="11.5411711" visible="true" timestamp="2006-12-14T23:22:36+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21585827" lat="48.1444666" lon="11.5407244" user="user_4133" visible="true" timestamp="2006-12-29T14:41:35+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21324374" lat="48.1448788" lon="11.5426666" user="user_4133" visible="true" timestamp="2006-11-30T14:20:49+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="245339" lat="48.1463562" lon="11.53574" user="3247" visible="true" timestamp="2008-02-10T13:05:27+00:00"/>
+  <node id="245353" lat="48.146296" lon="11.5363118" user="3247" visible="true" timestamp="2008-02-10T13:05:27+00:00"/>
+  <node id="398692" lat="48.145241" lon="11.5415523" user="helm" visible="true" timestamp="2007-02-07T16:49:43+00:00"/>
+  <node id="398694" lat="48.1452209" lon="11.540887" user="user_4133" visible="true" timestamp="2006-12-18T10:06:05+00:00"/>
+  <node id="398704" lat="48.1453234" lon="11.5405037" user="user_4133" visible="true" timestamp="2006-12-18T10:06:05+00:00"/>
+  <node id="398705" lat="48.1457468" lon="11.5386711" user="user_4133" visible="true" timestamp="2006-12-18T10:07:09+00:00"/>
+  <node id="398710" lat="48.1462259" lon="11.5369775" user="Jörg Ostertag" visible="true" timestamp="2006-08-28T23:19:19+01:00"/>
+  <node id="19404292" lat="48.1442413" lon="11.545447" user="Jörg Ostertag" visible="true" timestamp="2006-10-24T13:41:23+01:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21040287" lat="48.1461044" lon="11.5369041" user="user_4133" visible="true" timestamp="2006-11-17T12:37:19+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21040288" lat="48.1462212" lon="11.5356144" user="3247" visible="true" timestamp="2008-02-10T13:05:37+00:00"/>
+  <node id="21040289" lat="48.1461793" lon="11.5362042" user="3247" visible="true" timestamp="2008-02-10T13:05:36+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21040291" lat="48.1459432" lon="11.5377728" user="user_4133" visible="true" timestamp="2006-12-18T10:06:05+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21040296" lat="48.1462657" lon="11.5365998" user="3247" visible="true" timestamp="2008-02-10T13:05:26+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21324375" lat="48.1439353" lon="11.5467331" user="user_4133" visible="true" timestamp="2006-11-30T14:20:49+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21324376" lat="48.1451471" lon="11.541886" user="user_4133" visible="true" timestamp="2006-12-18T10:06:06+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21324380" lat="48.1453506" lon="11.5409376" user="user_4133" visible="true" timestamp="2006-12-18T10:06:04+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21324381" lat="48.1454507" lon="11.5405629" user="user_4133" visible="true" timestamp="2006-12-18T10:06:07+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21324382" lat="48.1459135" lon="11.538651" user="user_4133" visible="true" timestamp="2006-12-18T10:06:04+00:00"/>
+  <node id="21585828" lat="48.1447078" lon="11.5384168" user="ludwich" visible="true" timestamp="2007-06-27T19:34:56+01:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21632176" lat="48.1451206" lon="11.5414087" user="user_4133" visible="true" timestamp="2006-12-18T10:06:01+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="21632177" lat="48.1439747" lon="11.5453262" user="ludwich" visible="true" timestamp="2007-06-27T19:34:56+01:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="250870622" lat="48.1423259" lon="11.5327741" user="user_4133" visible="true" timestamp="2008-03-06T19:16:17+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="250870624" lat="48.1423839" lon="11.5358031" user="user_4133" visible="true" timestamp="2008-03-06T19:16:17+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <node id="250870626" lat="48.1423608" lon="11.5384055" user="user_4133" visible="true" timestamp="2008-03-06T19:16:17+00:00">
+    <tag k="created_by" v="JOSM"/>
+  </node>
+  <way id="4020271" visible="true" timestamp="2007-07-13T09:52:50+01:00" user="user_4133">
+    <nd ref="21324374"/>
+    <nd ref="21324376"/>
+    <nd ref="398692"/>
+    <nd ref="21324380"/>
+    <nd ref="21324381"/>
+    <nd ref="21324382"/>
+    <nd ref="398710"/>
+    <nd ref="21040296"/>
+    <nd ref="245353"/>
+    <nd ref="245339"/>
+    <tag k="highway" v="secondary"/>
+    <tag k="created_by" v="JOSM"/>
+    <tag k="name" v="Arnulfstraße"/>
+    <tag k="lanes" v="2"/>
+    <tag k="oneway" v="true"/>
+  </way>
+  <way id="4020916" visible="true" timestamp="2008-01-27T16:37:31+00:00" user="helm">
+    <nd ref="21324374"/>
+    <nd ref="19404292"/>
+    <nd ref="21324375"/>
+    <tag k="osmarender:renderName" v="no"/>
+    <tag k="highway" v="secondary"/>
+    <tag k="created_by" v="JOSM"/>
+    <tag k="name" v="Arnulfstraße"/>
+    <tag k="lanes" v="2"/>
+  </way>
+  <way id="4078867" visible="true" timestamp="2006-12-18T10:06:02+00:00" user="user_4133">
+    <nd ref="398692"/>
+    <nd ref="21632176"/>
+    <nd ref="21585826"/>
+    <nd ref="21585827"/>
+    <tag k="name" v="Helmholtzstraße"/>
+    <tag k="highway" v="residential"/>
+    <tag k="created_by" v="JOSM"/>
+  </way>
+  <way id="4078868" visible="true" timestamp="2007-06-27T19:34:56+01:00" user="ludwich">
+    <nd ref="21632177"/>
+    <nd ref="21585827"/>
+    <nd ref="21585828"/>
+    <tag k="highway" v="residential"/>
+    <tag k="created_by" v="Potlatch alpha"/>
+    <tag k="name" v="Marlene-Dietrich-Straße"/>
+  </way>
+  <way id="4513917" visible="true" timestamp="2008-01-27T16:37:31+00:00" user="helm">
+    <nd ref="21040288"/>
+    <nd ref="21040289"/>
+    <nd ref="21040287"/>
+    <nd ref="21040291"/>
+    <nd ref="398705"/>
+    <nd ref="398704"/>
+    <nd ref="398694"/>
+    <nd ref="21632176"/>
+    <nd ref="21324374"/>
+    <tag k="lanes" v="2"/>
+    <tag k="created_by" v="Potlatch 0.5d"/>
+    <tag k="highway" v="secondary"/>
+    <tag k="osmarender:renderName" v="no"/>
+    <tag k="name" v="Arnulfstraße"/>
+    <tag k="oneway" v="true"/>
+  </way>
+  <way id="23197114" visible="true" timestamp="2008-03-06T19:18:07+00:00" user="user_4133">
+    <nd ref="250870622"/>
+    <nd ref="250870624"/>
+    <nd ref="250870626"/>
+    <nd ref="250870628"/>
+    <tag k="name" v="S7"/>
+    <tag k="created_by" v="Potlatch 0.6c"/>
+    <tag k="railway" v="rail"/>
+  </way>
+</osm>
\ No newline at end of file
index 5b3f02df721386585495a3f48e0282aa4920ed74..ffe172c0b5f71cbaefecc0de8c103122d6b3ab85 100644 (file)
@@ -2,12 +2,12 @@ OziExplorer Waypoint File Version 1.1
 WGS 84\r
 Reserved 2\r
 Reserved 3\r
-1,GCEBB,35.972033,-87.134700,25569.00000,0,1,3,0,65535,Mountain Bike Heaven by susy1313,0,0,0,0,6,0,17\r
-2,GC1A37,36.090683,-86.679550,25569.00000,0,1,3,0,65535,The Troll by a182pilot & Family,0,0,0,0,6,0,17\r
-3,GC1C2B,35.996267,-86.620117,25569.00000,0,1,3,0,65535,Dive Bomber by JoGPS & family,0,0,0,0,6,0,17\r
-4,GC25A9,36.038483,-86.648617,25569.00000,0,1,3,0,65535,FOSTER by JoGPS & Family,0,0,0,0,6,0,17\r
-5,GC2723,36.112183,-86.741767,25569.00000,0,1,3,0,65535,Logan Lighthouse by JoGps & Family,0,0,0,0,6,0,17\r
-6,GC2B71,36.064083,-86.790517,25569.00000,0,1,3,0,65535,Ganier Cache by Susy1313,0,0,0,0,6,0,17\r
-7,GC309F,36.087767,-86.809733,25569.00000,0,1,3,0,65535,Shy's Hill by FireFighterEng33,0,0,0,0,6,0,17\r
-8,GC317A,36.057500,-86.892000,25569.00000,0,1,3,0,65535,GittyUp by JoGPS / Warner Parks,0,0,0,0,6,0,17\r
-9,GC317D,36.082800,-86.867283,25569.00000,0,1,3,0,65535,Inlighting by JoGPS / Warner Parks,0,0,0,0,6,0,17\r
+1,GCEBB,35.972033,-87.134700,,0,1,3,0,65535,Mountain Bike Heaven by susy1313,0,0,0,0,6,0,17\r
+2,GC1A37,36.090683,-86.679550,,0,1,3,0,65535,The Troll by a182pilot & Family,0,0,0,0,6,0,17\r
+3,GC1C2B,35.996267,-86.620117,,0,1,3,0,65535,Dive Bomber by JoGPS & family,0,0,0,0,6,0,17\r
+4,GC25A9,36.038483,-86.648617,,0,1,3,0,65535,FOSTER by JoGPS & Family,0,0,0,0,6,0,17\r
+5,GC2723,36.112183,-86.741767,,0,1,3,0,65535,Logan Lighthouse by JoGps & Family,0,0,0,0,6,0,17\r
+6,GC2B71,36.064083,-86.790517,,0,1,3,0,65535,Ganier Cache by Susy1313,0,0,0,0,6,0,17\r
+7,GC309F,36.087767,-86.809733,,0,1,3,0,65535,Shy's Hill by FireFighterEng33,0,0,0,0,6,0,17\r
+8,GC317A,36.057500,-86.892000,,0,1,3,0,65535,GittyUp by JoGPS / Warner Parks,0,0,0,0,6,0,17\r
+9,GC317D,36.082800,-86.867283,,0,1,3,0,65535,Inlighting by JoGPS / Warner Parks,0,0,0,0,6,0,17\r
diff --git a/reference/route/destinator_itn.dat b/reference/route/destinator_itn.dat
new file mode 100644 (file)
index 0000000..3b5275b
Binary files /dev/null and b/reference/route/destinator_itn.dat differ
diff --git a/reference/route/destinator_itn.txt b/reference/route/destinator_itn.txt
new file mode 100644 (file)
index 0000000..0d8b159
--- /dev/null
@@ -0,0 +1,47 @@
+No,Latitude,Longitude,Name,Notes\r
+1,42.430950,-71.107628,"BELLEVUE","Bellevue Parking Lot"\r
+2,42.431240,-71.109236,"GATE6","Gate 6"\r
+3,42.434980,-71.109942,"PANTHRCAVE","Panther Cave"\r
+4,42.436757,-71.113223,"6014MEADOW","6014MEADOW"\r
+5,42.439018,-71.114456,"6006","600698"\r
+6,42.438594,-71.114803,"6006BLUE","6006BLUE"\r
+7,42.438917,-71.116146,"5096","5096"\r
+8,42.438878,-71.119277,"5066","5066"\r
+9,42.439227,-71.119689,"5067","5067"\r
+10,42.439993,-71.120925,"5058ROAD","Road Crossing"\r
+11,42.441727,-71.121676,"5150TANK","Water Tank"\r
+12,42.443904,-71.122044,"5142","5142"\r
+13,42.445359,-71.122845,"5144SUMMIT","Summit"\r
+14,42.447298,-71.121447,"5156","5156"\r
+15,42.449765,-71.122320,"5148NANEPA","Nanepashemet Road Crossing"\r
+16,42.451442,-71.121746,"5258","5258"\r
+17,42.453256,-71.121211,"5252PURPLE","Purple Rock Hill"\r
+18,42.456252,-71.119356,"527631","527631"\r
+19,42.456592,-71.119676,"527614","527614"\r
+20,42.457388,-71.119845,"5267OBSTAC","Obstacle"\r
+21,42.458148,-71.119135,"5278","5278"\r
+22,42.459377,-71.117693,"5289","5289"\r
+23,42.464183,-71.119828,"5374FIRE","5374FIRE"\r
+24,42.465650,-71.119399,"5376","5376"\r
+25,42.465913,-71.119328,"5376STREAM","Stream Crossing"\r
+26,42.467110,-71.113574,"6328","6328"\r
+27,42.466459,-71.110067,"635722","635722"\r
+28,42.466557,-71.109410,"635783","635783"\r
+29,42.463495,-71.107117,"6373","6373"\r
+30,42.465687,-71.107360,"BEAR HILL","Bear Hill Tower"\r
+31,42.459986,-71.106170,"6289","6289"\r
+32,42.457616,-71.105116,"6297","6297"\r
+33,42.453845,-71.105206,"6283","6283"\r
+34,42.451430,-71.105413,"6280","6280"\r
+35,42.448448,-71.106158,"6177","6177"\r
+36,42.447804,-71.106624,"6176","6176"\r
+37,42.444773,-71.108882,"6153","6153"\r
+38,42.443592,-71.106301,"6171","6171"\r
+39,42.442981,-71.111441,"6131","6131"\r
+40,42.442196,-71.110975,"6130","6130"\r
+41,42.441754,-71.113220,"6029","6029"\r
+42,42.439018,-71.114456,"6006","600698"\r
+43,42.436757,-71.113223,"6014MEADOW","6014MEADOW"\r
+44,42.434980,-71.109942,"PANTHRCAVE","Panther Cave"\r
+45,42.431240,-71.109236,"GATE6","Gate 6"\r
+46,42.430950,-71.107628,"BELLEVUE","Bellevue Parking Lot"\r
index 1f345153d3808ece4b14b14b9bbf60e5daa55358..e9981bec8b76c40f841a4c7473a267f38b4357cd 100644 (file)
@@ -37,47 +37,47 @@ Header      Name    Start Time      Elapsed Time    Length  Average Speed   Link
 \r
 Track  ACTIVE LOG 006  01/05/2005 15:02:47     0:33:09 653 m   1.2 kph \r
 \r
-Header Position        Time    Altitude        Depth   Leg Length      Leg Time        Leg Speed       Leg Course\r
+Header Position        Time    Altitude        Depth   Temperature     Leg Length      Leg Time        Leg Speed       Leg Course\r
 \r
-Trackpoint     N51 18.78 E12 24.79     01/05/2005 15:02:47     161 m   0.0 m\r
-Trackpoint     N51 18.77 E12 24.79     01/05/2005 15:03:25     154 m   0.0 m   8 m     0:00:38 0.8 kph 137° true\r
-Trackpoint     N51 18.77 E12 24.79     01/05/2005 15:03:39     148 m   0.0 m   3 m     0:00:14 0.8 kph 180° true\r
-Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:04:16     139 m   0.0 m   5 m     0:00:37 0.5 kph 129° true\r
-Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:05:02     145 m   0.0 m   2 m     0:00:46 0.2 kph 270° true\r
-Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:05:45     134 m   0.0 m   2 m     0:00:43 0.2 kph 90° true\r
-Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:06:44     131 m   0.0 m   6 m     0:00:59 0.4 kph 162° true\r
-Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:07:50     130 m   0.0 m   0 m     0:01:06 0 kph   0° true\r
-Trackpoint     N51 18.76 E12 24.80     01/05/2005 15:08:19     132 m   0.0 m   3 m     0:00:29 0.4 kph 180° true\r
-Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:11:16     144 m   0.0 m   6 m     0:02:57 0.1 kph 342° true\r
-Trackpoint     N51 18.77 E12 24.81     01/05/2005 15:12:34     147 m   0.0 m   16 m    0:01:18 0.7 kph 38° true\r
-Trackpoint     N51 18.78 E12 24.83     01/05/2005 15:13:18     145 m   0.0 m   27 m    0:00:44 2 kph   70° true\r
-Trackpoint     N51 18.78 E12 24.83     01/05/2005 15:13:27     145 m   0.0 m   6 m     0:00:09 2 kph   0° true\r
-Trackpoint     N51 18.78 E12 24.83     01/05/2005 15:13:37     135 m   0.0 m   2 m     0:00:10 0.7 kph 90° true\r
-Trackpoint     N51 18.79 E12 24.83     01/05/2005 15:13:46     135 m   0.0 m   6 m     0:00:09 2 kph   0° true\r
-Trackpoint     N51 18.79 E12 24.83     01/05/2005 15:14:03     136 m   0.0 m   13 m    0:00:17 3 kph   17° true\r
-Trackpoint     N51 18.80 E12 24.84     01/05/2005 15:14:16     135 m   0.0 m   11 m    0:00:13 3 kph   32° true\r
-Trackpoint     N51 18.80 E12 24.84     01/05/2005 15:14:26     139 m   0.0 m   7 m     0:00:10 2 kph   117° true\r
-Trackpoint     N51 18.80 E12 24.85     01/05/2005 15:14:30     139 m   0.0 m   4 m     0:00:04 4 kph   90° true\r
-Trackpoint     N51 18.78 E12 24.88     01/05/2005 15:15:06     141 m   0.0 m   43 m    0:00:36 4 kph   126° true\r
-Trackpoint     N51 18.78 E12 24.89     01/05/2005 15:15:27     140 m   0.0 m   18 m    0:00:21 3 kph   121° true\r
-Trackpoint     N51 18.77 E12 24.90     01/05/2005 15:15:39     140 m   0.0 m   10 m    0:00:12 3 kph   128° true\r
-Trackpoint     N51 18.78 E12 24.90     01/05/2005 15:25:31     152 m   0.0 m   4 m     0:09:52 0.0 kph 33° true\r
-Trackpoint     N51 18.78 E12 24.90     01/05/2005 15:25:40     152 m   0.0 m   0 m     0:00:09 0 kph   0° true\r
-Trackpoint     N51 18.78 E12 24.90     01/05/2005 15:29:18     155 m   0.0 m   4 m     0:03:38 0.1 kph 328° true\r
-Trackpoint     N51 18.79 E12 24.87     01/05/2005 15:30:30     149 m   0.0 m   33 m    0:01:12 2 kph   311° true\r
-Trackpoint     N51 18.79 E12 24.87     01/05/2005 15:30:37     150 m   0.0 m   2 m     0:00:07 1.0 kph 270° true\r
-Trackpoint     N51 18.79 E12 24.87     01/05/2005 15:30:47     151 m   0.0 m   8 m     0:00:10 3 kph   270° true\r
-Trackpoint     N51 18.79 E12 24.86     01/05/2005 15:30:48     151 m   0.0 m   4 m     0:00:01 14 kph  270° true\r
-Trackpoint     N51 18.80 E12 24.83     01/05/2005 15:30:52     150 m   0.0 m   38 m    0:00:04 34 kph  300° true\r
-Trackpoint     N51 18.82 E12 24.80     01/05/2005 15:30:57     150 m   0.0 m   57 m    0:00:05 41 kph  315° true\r
-Trackpoint     N51 18.84 E12 24.77     01/05/2005 15:31:03     150 m   0.0 m   47 m    0:00:06 28 kph  316° true\r
-Trackpoint     N51 18.85 E12 24.75     01/05/2005 15:31:10     150 m   0.0 m   35 m    0:00:07 18 kph  314° true\r
-Trackpoint     N51 18.88 E12 24.57     01/05/2005 15:32:38     143 m   0.0 m   210 m   0:01:28 9 kph   283° true\r
-Trackpoint     N51 18.88 E12 24.57     01/05/2005 15:32:45     141 m   0.0 m   4 m     0:00:07 2 kph   270° true\r
-Trackpoint     N51 18.88 E12 24.57     01/05/2005 15:33:17     143 m   0.0 m   0 m     0:00:32 0 kph   0° true\r
-Trackpoint     N51 18.88 E12 24.57     01/05/2005 15:33:42     139 m   0.0 m   4 m     0:00:25 0.6 kph 270° true\r
-Trackpoint     N51 18.88 E12 24.56     01/05/2005 15:33:54     139 m   0.0 m   6 m     0:00:12 2 kph   270° true\r
-Trackpoint     N51 18.88 E12 24.56     01/05/2005 15:34:04     138 m   0.0 m   0 m     0:00:10 0 kph   0° true\r
-Trackpoint     N51 18.88 E12 24.56     01/05/2005 15:34:20     139 m   0.0 m   0 m     0:00:16 0 kph   0° true\r
-Trackpoint     N51 18.88 E12 24.56     01/05/2005 15:35:45     144 m   0.0 m   0 m     0:01:25 0 kph   0° true\r
-Trackpoint     N51 18.88 E12 24.56     01/05/2005 15:35:56     145 m   0.0 m   0 m     0:00:11 0 kph   0° true\r
+Trackpoint     N51 18.78 E12 24.79     01/05/2005 15:02:47     161 m   \r
+Trackpoint     N51 18.77 E12 24.79     01/05/2005 15:03:25     154 m                   8 m     0:00:38 0.8 kph 137° true\r
+Trackpoint     N51 18.77 E12 24.79     01/05/2005 15:03:39     148 m                   3 m     0:00:14 0.8 kph 180° true\r
+Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:04:16     139 m                   5 m     0:00:37 0.5 kph 129° true\r
+Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:05:02     145 m                   2 m     0:00:46 0.2 kph 270° true\r
+Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:05:45     134 m                   2 m     0:00:43 0.2 kph 90° true\r
+Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:06:44     131 m                   6 m     0:00:59 0.4 kph 162° true\r
+Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:07:50     130 m                   0 m     0:01:06 0 kph   0° true\r
+Trackpoint     N51 18.76 E12 24.80     01/05/2005 15:08:19     132 m                   3 m     0:00:29 0.4 kph 180° true\r
+Trackpoint     N51 18.77 E12 24.80     01/05/2005 15:11:16     144 m                   6 m     0:02:57 0.1 kph 342° true\r
+Trackpoint     N51 18.77 E12 24.81     01/05/2005 15:12:34     147 m                   16 m    0:01:18 0.7 kph 38° true\r
+Trackpoint     N51 18.78 E12 24.83     01/05/2005 15:13:18     145 m                   27 m    0:00:44 2 kph   70° true\r
+Trackpoint     N51 18.78 E12 24.83     01/05/2005 15:13:27     145 m                   6 m     0:00:09 2 kph   0° true\r
+Trackpoint     N51 18.78 E12 24.83     01/05/2005 15:13:37     135 m                   2 m     0:00:10 0.7 kph 90° true\r
+Trackpoint     N51 18.79 E12 24.83     01/05/2005 15:13:46     135 m                   6 m     0:00:09 2 kph   0° true\r
+Trackpoint     N51 18.79 E12 24.83     01/05/2005 15:14:03     136 m                   13 m    0:00:17 3 kph   17° true\r
+Trackpoint     N51 18.80 E12 24.84     01/05/2005 15:14:16     135 m                   11 m    0:00:13 3 kph   32° true\r
+Trackpoint     N51 18.80 E12 24.84     01/05/2005 15:14:26     139 m                   7 m     0:00:10 2 kph   117° true\r
+Trackpoint     N51 18.80 E12 24.85     01/05/2005 15:14:30     139 m                   4 m     0:00:04 4 kph   90° true\r
+Trackpoint     N51 18.78 E12 24.88     01/05/2005 15:15:06     141 m                   43 m    0:00:36 4 kph   126° true\r
+Trackpoint     N51 18.78 E12 24.89     01/05/2005 15:15:27     140 m                   18 m    0:00:21 3 kph   121° true\r
+Trackpoint     N51 18.77 E12 24.90     01/05/2005 15:15:39     140 m                   10 m    0:00:12 3 kph   128° true\r
+Trackpoint     N51 18.78 E12 24.90     01/05/2005 15:25:31     152 m                   4 m     0:09:52 0.0 kph 33° true\r
+Trackpoint     N51 18.78 E12 24.90     01/05/2005 15:25:40     152 m                   0 m     0:00:09 0 kph   0° true\r
+Trackpoint     N51 18.78 E12 24.90     01/05/2005 15:29:18     155 m                   4 m     0:03:38 0.1 kph 328° true\r
+Trackpoint     N51 18.79 E12 24.87     01/05/2005 15:30:30     149 m                   33 m    0:01:12 2 kph   311° true\r
+Trackpoint     N51 18.79 E12 24.87     01/05/2005 15:30:37     150 m                   2 m     0:00:07 1.0 kph 270° true\r
+Trackpoint     N51 18.79 E12 24.87     01/05/2005 15:30:47     151 m                   8 m     0:00:10 3 kph   270° true\r
+Trackpoint     N51 18.79 E12 24.86     01/05/2005 15:30:48     151 m                   4 m     0:00:01 14 kph  270° true\r
+Trackpoint     N51 18.80 E12 24.83     01/05/2005 15:30:52     150 m                   38 m    0:00:04 34 kph  300° true\r
+Trackpoint     N51 18.82 E12 24.80     01/05/2005 15:30:57     150 m                   57 m    0:00:05 41 kph  315° true\r
+Trackpoint     N51 18.84 E12 24.77     01/05/2005 15:31:03     150 m                   47 m    0:00:06 28 kph  316° true\r
+Trackpoint     N51 18.85 E12 24.75     01/05/2005 15:31:10     150 m                   35 m    0:00:07 18 kph  314° true\r
+Trackpoint     N51 18.88 E12 24.57     01/05/2005 15:32:38     143 m                   210 m   0:01:28 9 kph   283° true\r
+Trackpoint     N51 18.88 E12 24.57     01/05/2005 15:32:45     141 m                   4 m     0:00:07 2 kph   270° true\r
+Trackpoint     N51 18.88 E12 24.57     01/05/2005 15:33:17     143 m                   0 m     0:00:32 0 kph   0° true\r
+Trackpoint     N51 18.88 E12 24.57     01/05/2005 15:33:42     139 m                   4 m     0:00:25 0.6 kph 270° true\r
+Trackpoint     N51 18.88 E12 24.56     01/05/2005 15:33:54     139 m                   6 m     0:00:12 2 kph   270° true\r
+Trackpoint     N51 18.88 E12 24.56     01/05/2005 15:34:04     138 m                   0 m     0:00:10 0 kph   0° true\r
+Trackpoint     N51 18.88 E12 24.56     01/05/2005 15:34:20     139 m                   0 m     0:00:16 0 kph   0° true\r
+Trackpoint     N51 18.88 E12 24.56     01/05/2005 15:35:45     144 m                   0 m     0:01:25 0 kph   0° true\r
+Trackpoint     N51 18.88 E12 24.56     01/05/2005 15:35:56     145 m                   0 m     0:00:11 0 kph   0° true\r
diff --git a/reference/track/destinator_trl.dat b/reference/track/destinator_trl.dat
new file mode 100644 (file)
index 0000000..6d54aff
Binary files /dev/null and b/reference/track/destinator_trl.dat differ
diff --git a/reference/track/destinator_trl.txt b/reference/track/destinator_trl.txt
new file mode 100644 (file)
index 0000000..39b0717
--- /dev/null
@@ -0,0 +1,27 @@
+No,Latitude,Longitude,Altitude,FIX,Satellites,Date,Time\r
+1,53.556728,9.865573,47.5,"3d",6,2007/08/17,09:31:56.496\r
+2,53.556728,9.865575,47.8,"3d",6,2007/08/17,09:31:56.752\r
+3,53.556728,9.865577,47.9,"3d",6,2007/08/17,09:31:57\r
+4,53.556728,9.865577,48.0,"3d",6,2007/08/17,09:31:57.248\r
+5,53.556728,9.865577,48.1,"3d",6,2007/08/17,09:31:57.504\r
+6,53.556728,9.865578,48.2,"3d",6,2007/08/17,09:31:57.752\r
+7,53.556728,9.865577,48.3,"3d",6,2007/08/17,09:31:58.248\r
+8,53.556728,9.865578,48.4,"3d",6,2007/08/17,09:31:58\r
+9,53.556728,9.865578,48.4,"3d",6,2007/08/17,09:31:58.752\r
+10,53.556728,9.865580,48.5,"3d",6,2007/08/17,09:31:59\r
+11,53.556728,9.865578,49.6,"3d",6,2007/08/17,09:32:00.496\r
+12,53.556728,9.865578,49.6,"3d",6,2007/08/17,09:31:59.248\r
+13,53.556728,9.865580,49.0,"3d",6,2007/08/17,09:31:59.504\r
+14,53.556728,9.865578,49.5,"3d",6,2007/08/17,09:32:00\r
+15,53.556728,9.865580,49.6,"3d",6,2007/08/17,09:32:00.248\r
+16,53.556728,9.865575,50.1,"3d",6,2007/08/17,09:32:01\r
+17,53.556728,9.865578,49.5,"3d",6,2007/08/17,09:32:01.248\r
+18,53.556728,9.865577,49.5,"3d",6,2007/08/17,09:32:01.504\r
+19,53.556730,9.865577,49.6,"3d",6,2007/08/17,09:32:01.752\r
+20,53.556728,9.865575,49.7,"3d",6,2007/08/17,09:32:02\r
+21,53.556728,9.865575,49.8,"3d",6,2007/08/17,09:32:02.496\r
+22,53.556728,9.865575,50.1,"3d",6,2007/08/17,09:32:02.752\r
+23,53.556728,9.865577,50.0,"3d",6,2007/08/17,09:32:03\r
+24,53.556728,9.865577,49.9,"3d",6,2007/08/17,09:32:03.248\r
+25,53.556728,9.865577,49.9,"3d",6,2007/08/17,09:32:03.504\r
+26,53.556728,9.865575,49.9,"3d",6,2007/08/17,09:32:05.752\r
diff --git a/reference/track/mtk_logger.bin b/reference/track/mtk_logger.bin
new file mode 100644 (file)
index 0000000..032e9f8
Binary files /dev/null and b/reference/track/mtk_logger.bin differ
diff --git a/reference/track/mtk_logger.csv b/reference/track/mtk_logger.csv
new file mode 100644 (file)
index 0000000..22e809a
--- /dev/null
@@ -0,0 +1,818 @@
+INDEX,RCR,DATE,TIME,VALID,LATITUDE,N/S,LONGITUDE,E/W,HEIGHT,SPEED,HEADING,NSAT (USED/VIEW),DISTANCE,
+1,T,2008/01/27,13:03:22.836,No fix,57.719581,N,12.016372,E,98.470 m,0.000 km/h,0.000000,0(7),      0.00 m,
+2,B,2008/01/27,13:03:24.836,No fix,57.719581,N,12.016372,E,98.470 m,0.000 km/h,0.000000,0(9),      0.00 m,
+3,T,2008/01/27,14:13:51.012,No fix,57.719581,N,12.016372,E,98.470 m,0.000 km/h,0.000000,0(0),      0.00 m,
+4,T,2008/01/27,14:13:56.812,No fix,57.719581,N,12.016372,E,98.470 m,0.000 km/h,0.000000,0(5),      0.00 m,
+5,T,2008/01/27,14:14:01.812,No fix,57.719581,N,12.016372,E,98.470 m,0.000 km/h,0.000000,0(10),      0.00 m,
+6,T,2008/01/27,14:14:07.532,No fix,57.719581,N,12.016372,E,98.470 m,0.000 km/h,0.000000,0(9),      0.00 m,
+7,T,2008/01/27,14:14:12.532,No fix,57.719581,N,12.016372,E,98.470 m,0.000 km/h,0.000000,0(9),      0.00 m,
+8,T,2008/01/27,14:14:17.532,No fix,57.719581,N,12.016372,E,98.470 m,0.000 km/h,0.000000,0(10),      0.00 m,
+9,T,2008/01/27,14:14:22.532,No fix,57.719581,N,12.016372,E,98.470 m,0.000 km/h,0.000000,0(10),      0.00 m,
+10,T,2008/01/27,14:14:27.532,No fix,57.719581,N,12.016372,E,98.470 m,0.000 km/h,0.000000,0(9),      0.00 m,
+11,D,2008/01/27,14:14:28.531,No fix,57.705089,N,11.996373,E,98.409 m,2.142 km/h,0.000000,2(9),   2006.55 m,
+12,T,2008/01/27,14:14:34.000,No fix,57.704939,N,11.996336,E,98.469 m,1.093 km/h,0.000000,2(9),     16.80 m,
+13,D,2008/01/27,14:14:35.000,SPS,57.707240,N,11.967281,E,22.480 m,4.329 km/h,0.000000,6(9),   1752.68 m,
+14,T,2008/01/27,14:14:40.000,SPS,57.707220,N,11.967151,E,32.486 m,3.883 km/h,0.000000,6(9),     12.87 m,
+15,T,2008/01/27,14:14:45.000,SPS,57.707209,N,11.967053,E,34.286 m,3.788 km/h,0.000000,8(9),      6.24 m,
+16,T,2008/01/27,14:14:50.000,SPS,57.707201,N,11.966970,E,33.626 m,3.570 km/h,0.000000,8(9),      5.06 m,
+17,T,2008/01/27,14:14:55.000,SPS,57.707198,N,11.966948,E,34.133 m,1.588 km/h,0.000000,8(9),      1.44 m,
+18,T,2008/01/27,14:15:00.000,SPS,57.707199,N,11.966980,E,34.461 m,2.094 km/h,0.000000,8(9),      1.98 m,
+19,T,2008/01/27,14:15:05.000,SPS,57.707202,N,11.966988,E,34.240 m,0.301 km/h,0.000000,9(9),      0.63 m,
+20,B,2008/01/27,14:15:09.000,SPS,57.707192,N,11.967000,E,34.320 m,1.198 km/h,0.000000,8(9),      1.35 m,
+21,T,2008/01/27,14:15:14.000,SPS,57.707180,N,11.967054,E,34.183 m,1.906 km/h,0.000000,8(9),      3.51 m,
+22,T,2008/01/27,14:15:19.000,SPS,57.707141,N,11.967152,E,34.389 m,4.819 km/h,0.000000,9(9),      7.29 m,
+23,T,2008/01/27,14:15:24.000,SPS,57.707082,N,11.967244,E,34.793 m,5.849 km/h,0.000000,9(9),      8.58 m,
+24,T,2008/01/27,14:15:29.000,SPS,57.707028,N,11.967342,E,35.034 m,5.930 km/h,0.000000,9(9),      8.39 m,
+25,T,2008/01/27,14:15:34.000,SPS,57.706993,N,11.967462,E,35.394 m,4.971 km/h,0.000000,9(9),      8.13 m,
+26,T,2008/01/27,14:15:39.000,SPS,57.706920,N,11.967556,E,34.952 m,6.284 km/h,145.024078,9(9),      9.85 m,
+27,T,2008/01/27,14:15:44.000,SPS,57.706865,N,11.967651,E,36.921 m,6.656 km/h,142.223740,8(9),      8.65 m,
+28,T,2008/01/27,14:15:49.000,SPS,57.706812,N,11.967756,E,36.359 m,5.452 km/h,144.998688,8(9),      8.56 m,
+29,T,2008/01/27,14:15:54.000,SPS,57.706746,N,11.967810,E,35.562 m,4.889 km/h,144.998688,9(9),      8.04 m,
+30,T,2008/01/27,14:15:59.000,SPS,57.706677,N,11.967837,E,35.367 m,4.960 km/h,144.998688,9(9),      7.91 m,
+31,T,2008/01/27,14:16:04.000,SPS,57.706618,N,11.967878,E,35.278 m,5.648 km/h,144.998688,9(9),      6.99 m,
+32,T,2008/01/27,14:16:09.000,SPS,57.706547,N,11.967903,E,34.554 m,5.879 km/h,144.998688,9(9),      8.03 m,
+33,T,2008/01/27,14:16:14.000,SPS,57.706513,N,11.967905,E,35.263 m,0.183 km/h,144.998688,9(9),      3.86 m,
+34,T,2008/01/27,14:16:19.000,SPS,57.706515,N,11.967900,E,35.184 m,1.538 km/h,144.998688,8(9),      0.37 m,
+35,T,2008/01/27,14:16:24.000,SPS,57.706515,N,11.967898,E,35.184 m,0.110 km/h,144.998688,8(9),      0.11 m,
+36,T,2008/01/27,14:16:29.000,SPS,57.706514,N,11.967898,E,35.194 m,0.015 km/h,144.998688,8(9),      0.04 m,
+37,T,2008/01/27,14:16:34.000,SPS,57.706514,N,11.967898,E,35.194 m,0.028 km/h,144.998688,9(9),      0.04 m,
+38,T,2008/01/27,14:16:39.000,SPS,57.706513,N,11.967898,E,35.195 m,0.032 km/h,144.998688,8(9),      0.08 m,
+39,T,2008/01/27,14:16:44.000,SPS,57.706493,N,11.967904,E,35.155 m,5.219 km/h,144.998688,8(9),      2.31 m,
+40,T,2008/01/27,14:16:49.000,SPS,57.706432,N,11.967966,E,36.225 m,5.103 km/h,148.006943,7(9),      7.81 m,
+41,T,2008/01/27,14:16:54.000,SPS,57.706373,N,11.968041,E,35.693 m,4.740 km/h,145.174026,9(9),      7.94 m,
+42,T,2008/01/27,14:16:59.000,SPS,57.706330,N,11.968089,E,36.124 m,2.401 km/h,145.174026,9(9),      5.62 m,
+43,T,2008/01/27,14:17:04.000,SPS,57.706291,N,11.968096,E,34.865 m,1.065 km/h,145.174026,8(9),      4.55 m,
+44,T,2008/01/27,14:17:09.000,SPS,57.706252,N,11.968083,E,34.707 m,2.964 km/h,145.174026,9(9),      4.39 m,
+45,T,2008/01/27,14:17:14.000,SPS,57.706197,N,11.968102,E,35.035 m,5.348 km/h,145.174026,8(9),      6.24 m,
+46,T,2008/01/27,14:17:19.000,SPS,57.706132,N,11.968132,E,35.846 m,3.733 km/h,145.174026,9(9),      7.54 m,
+47,T,2008/01/27,14:17:24.000,SPS,57.706048,N,11.968163,E,36.723 m,7.332 km/h,193.604065,9(9),      9.51 m,
+48,T,2008/01/27,14:17:29.000,SPS,57.706021,N,11.968163,E,36.816 m,0.122 km/h,193.604065,9(9),      3.08 m,
+49,T,2008/01/27,14:17:34.000,SPS,57.706023,N,11.968161,E,36.775 m,0.368 km/h,193.604065,9(9),      0.25 m,
+50,T,2008/01/27,14:17:39.000,SPS,57.706017,N,11.968170,E,36.756 m,1.212 km/h,193.604065,8(9),      0.80 m,
+51,T,2008/01/27,14:17:44.000,SPS,57.706005,N,11.968188,E,36.742 m,1.749 km/h,193.604065,9(9),      1.75 m,
+52,T,2008/01/27,14:17:49.000,SPS,57.705990,N,11.968206,E,36.740 m,0.692 km/h,193.604065,9(9),      1.97 m,
+53,T,2008/01/27,14:17:54.000,SPS,57.706007,N,11.968194,E,36.763 m,3.844 km/h,193.604065,7(9),      1.99 m,
+54,T,2008/01/27,14:17:59.000,SPS,57.706115,N,11.968266,E,36.768 m,8.742 km/h,351.843750,8(9),     12.76 m,
+55,T,2008/01/27,14:18:04.000,SPS,57.706186,N,11.968516,E,37.723 m,0.918 km/h,2.294798,7(9),     16.95 m,
+56,T,2008/01/27,14:18:09.000,SPS,57.706125,N,11.968584,E,38.271 m,2.661 km/h,2.294798,9(9),      7.88 m,
+57,T,2008/01/27,14:18:14.000,SPS,57.706084,N,11.968609,E,39.401 m,5.108 km/h,2.294798,9(9),      4.95 m,
+58,T,2008/01/27,14:18:19.000,SPS,57.705972,N,11.968670,E,42.658 m,4.392 km/h,2.294798,9(9),     13.37 m,
+59,T,2008/01/27,14:18:24.000,SPS,57.705860,N,11.968734,E,44.571 m,4.576 km/h,143.381439,9(9),     13.18 m,
+60,T,2008/01/27,14:18:29.000,SPS,57.705777,N,11.968797,E,46.084 m,5.476 km/h,143.381439,9(9),     10.11 m,
+61,T,2008/01/27,14:18:34.000,SPS,57.705688,N,11.968830,E,47.522 m,4.338 km/h,143.381439,9(9),     10.22 m,
+62,T,2008/01/27,14:18:39.000,SPS,57.705562,N,11.968854,E,46.846 m,5.019 km/h,140.877411,9(9),     14.09 m,
+63,T,2008/01/27,14:18:44.000,SPS,57.705429,N,11.968857,E,42.744 m,4.944 km/h,140.877411,9(9),     15.41 m,
+64,T,2008/01/27,14:18:49.000,SPS,57.705335,N,11.968908,E,41.074 m,7.019 km/h,140.877411,7(9),     10.98 m,
+65,T,2008/01/27,14:18:54.000,SPS,57.705285,N,11.968814,E,53.912 m,3.695 km/h,142.614777,9(9),     15.06 m,
+66,T,2008/01/27,14:18:59.000,SPS,57.705250,N,11.968786,E,57.604 m,4.404 km/h,142.614777,9(9),      5.66 m,
+67,T,2008/01/27,14:19:04.000,SPS,57.705181,N,11.968788,E,59.425 m,6.306 km/h,144.389893,9(9),      7.95 m,
+68,T,2008/01/27,14:19:09.000,SPS,57.705107,N,11.968813,E,59.241 m,4.660 km/h,144.389893,8(9),      8.30 m,
+69,T,2008/01/27,14:19:14.000,SPS,57.705027,N,11.968819,E,56.956 m,5.931 km/h,144.389893,7(9),      9.26 m,
+70,T,2008/01/27,14:19:19.000,SPS,57.704951,N,11.968824,E,55.168 m,5.787 km/h,144.389893,8(9),      8.68 m,
+71,T,2008/01/27,14:19:24.000,SPS,57.704891,N,11.968841,E,52.904 m,4.115 km/h,142.798004,8(9),      7.03 m,
+72,T,2008/01/27,14:19:29.000,SPS,57.704841,N,11.968864,E,52.243 m,4.262 km/h,142.798004,9(9),      5.81 m,
+73,T,2008/01/27,14:19:34.000,SPS,57.704798,N,11.968902,E,53.329 m,2.691 km/h,142.798004,9(9),      5.37 m,
+74,T,2008/01/27,14:19:39.000,SPS,57.704765,N,11.968933,E,51.154 m,5.018 km/h,142.798004,9(9),      4.67 m,
+75,T,2008/01/27,14:19:44.000,SPS,57.704710,N,11.969006,E,50.982 m,2.045 km/h,142.061447,9(9),      7.50 m,
+76,T,2008/01/27,14:19:49.000,SPS,57.704649,N,11.969040,E,50.857 m,4.554 km/h,142.061447,7(9),      7.13 m,
+77,T,2008/01/27,14:19:54.000,SPS,57.704526,N,11.969103,E,49.896 m,5.752 km/h,142.061447,8(9),     14.23 m,
+78,T,2008/01/27,14:19:59.000,SPS,57.704421,N,11.969262,E,46.709 m,5.609 km/h,152.146713,8(9),     15.37 m,
+79,T,2008/01/27,14:20:04.000,SPS,57.704347,N,11.969332,E,43.882 m,5.225 km/h,153.529343,8(9),      9.72 m,
+80,T,2008/01/27,14:20:09.000,SPS,57.704288,N,11.969264,E,41.683 m,6.420 km/h,153.529343,8(9),      7.98 m,
+81,T,2008/01/27,14:20:14.000,SPS,57.704252,N,11.969200,E,42.077 m,4.191 km/h,153.663147,9(9),      5.56 m,
+82,T,2008/01/27,14:20:19.000,SPS,57.704213,N,11.969243,E,40.520 m,5.118 km/h,153.663147,8(9),      5.32 m,
+83,T,2008/01/27,14:20:24.000,SPS,57.704157,N,11.969264,E,40.441 m,5.823 km/h,150.640991,9(9),      6.31 m,
+84,T,2008/01/27,14:20:29.000,SPS,57.704116,N,11.969269,E,38.741 m,5.815 km/h,150.640991,8(9),      4.92 m,
+85,T,2008/01/27,14:20:34.000,SPS,57.704060,N,11.969300,E,40.093 m,5.564 km/h,149.428802,8(9),      6.58 m,
+86,T,2008/01/27,14:20:39.000,SPS,57.704002,N,11.969344,E,43.700 m,6.179 km/h,149.875687,9(9),      7.87 m,
+87,T,2008/01/27,14:20:44.000,SPS,57.703946,N,11.969419,E,45.619 m,4.620 km/h,152.252014,9(9),      7.91 m,
+88,T,2008/01/27,14:20:49.000,SPS,57.703873,N,11.969494,E,45.383 m,6.091 km/h,152.252014,8(9),      9.30 m,
+89,T,2008/01/27,14:20:54.000,SPS,57.703825,N,11.969620,E,43.774 m,5.070 km/h,152.252014,8(9),      9.38 m,
+90,T,2008/01/27,14:20:59.000,SPS,57.703769,N,11.969732,E,42.711 m,5.157 km/h,149.309753,8(9),      9.21 m,
+91,T,2008/01/27,14:21:04.000,SPS,57.703739,N,11.969839,E,41.588 m,5.432 km/h,149.309753,9(9),      7.24 m,
+92,T,2008/01/27,14:21:09.000,SPS,57.703712,N,11.969976,E,39.019 m,5.650 km/h,149.309753,9(9),      9.08 m,
+93,T,2008/01/27,14:21:14.000,SPS,57.703658,N,11.970097,E,37.535 m,4.592 km/h,149.309753,8(9),      9.54 m,
+94,T,2008/01/27,14:21:19.000,SPS,57.703608,N,11.970196,E,37.183 m,6.357 km/h,149.309753,9(9),      8.09 m,
+95,T,2008/01/27,14:21:24.000,SPS,57.703553,N,11.970282,E,35.910 m,5.320 km/h,145.645874,9(9),      8.12 m,
+96,T,2008/01/27,14:21:29.000,SPS,57.703497,N,11.970365,E,36.647 m,5.556 km/h,148.902954,9(9),      7.97 m,
+97,T,2008/01/27,14:21:34.000,SPS,57.703448,N,11.970437,E,35.836 m,4.999 km/h,144.122391,9(9),      7.03 m,
+98,T,2008/01/27,14:21:39.000,SPS,57.703386,N,11.970510,E,35.017 m,5.919 km/h,146.880249,9(9),      8.14 m,
+99,T,2008/01/27,14:21:44.000,SPS,57.703320,N,11.970583,E,35.753 m,6.228 km/h,148.921082,9(9),      8.58 m,
+100,T,2008/01/27,14:21:49.000,SPS,57.703252,N,11.970652,E,35.331 m,5.456 km/h,150.968842,9(9),      8.67 m,
+101,T,2008/01/27,14:21:54.000,SPS,57.703203,N,11.970722,E,36.076 m,6.625 km/h,150.968842,9(9),      6.88 m,
+102,T,2008/01/27,14:21:59.000,SPS,57.703141,N,11.970776,E,35.706 m,4.944 km/h,148.422119,9(9),      7.61 m,
+103,T,2008/01/27,14:22:04.000,SPS,57.703072,N,11.970804,E,35.922 m,5.725 km/h,148.422119,9(9),      7.88 m,
+104,T,2008/01/27,14:22:09.000,SPS,57.703020,N,11.970877,E,36.545 m,5.074 km/h,151.107529,9(9),      7.31 m,
+105,T,2008/01/27,14:22:14.000,SPS,57.702966,N,11.970964,E,36.327 m,5.598 km/h,151.107529,9(9),      7.94 m,
+106,T,2008/01/27,14:22:19.000,SPS,57.702906,N,11.971040,E,37.919 m,6.304 km/h,151.477859,9(9),      8.26 m,
+107,T,2008/01/27,14:22:24.000,SPS,57.702841,N,11.971125,E,37.317 m,5.482 km/h,151.477859,8(9),      8.84 m,
+108,T,2008/01/27,14:22:29.000,SPS,57.702774,N,11.971215,E,37.531 m,6.173 km/h,151.477859,9(9),      9.20 m,
+109,T,2008/01/27,14:22:34.000,SPS,57.702716,N,11.971303,E,36.046 m,5.410 km/h,152.840408,9(9),      8.41 m,
+110,T,2008/01/27,14:22:39.000,SPS,57.702654,N,11.971376,E,35.769 m,4.778 km/h,149.361832,9(9),      8.17 m,
+111,T,2008/01/27,14:22:44.000,SPS,57.702598,N,11.971460,E,36.368 m,6.357 km/h,152.900650,9(9),      8.01 m,
+112,T,2008/01/27,14:22:49.000,SPS,57.702544,N,11.971540,E,36.279 m,5.471 km/h,151.154800,9(9),      7.70 m,
+113,T,2008/01/27,14:22:54.000,SPS,57.702491,N,11.971608,E,36.259 m,4.905 km/h,147.538422,9(9),      7.17 m,
+114,T,2008/01/27,14:22:59.000,SPS,57.702441,N,11.971678,E,37.068 m,5.114 km/h,147.538422,9(9),      6.97 m,
+115,T,2008/01/27,14:23:04.000,SPS,57.702397,N,11.971745,E,37.291 m,4.761 km/h,147.538422,9(9),      6.40 m,
+116,T,2008/01/27,14:23:09.000,SPS,57.702389,N,11.971776,E,36.768 m,0.013 km/h,147.538422,9(9),      2.11 m,
+117,T,2008/01/27,14:23:14.000,SPS,57.702389,N,11.971776,E,36.757 m,0.020 km/h,147.538422,9(9),      0.01 m,
+118,T,2008/01/27,14:23:19.000,SPS,57.702387,N,11.971779,E,36.756 m,1.288 km/h,147.538422,9(9),      0.24 m,
+119,T,2008/01/27,14:23:24.000,SPS,57.702382,N,11.971772,E,36.850 m,0.031 km/h,147.538422,9(9),      0.71 m,
+120,T,2008/01/27,14:23:29.000,SPS,57.702360,N,11.971813,E,36.804 m,5.462 km/h,147.397430,9(9),      3.48 m,
+121,T,2008/01/27,14:23:34.000,SPS,57.702310,N,11.971900,E,37.637 m,6.343 km/h,146.144302,9(9),      7.60 m,
+122,T,2008/01/27,14:23:39.000,SPS,57.702262,N,11.971989,E,37.109 m,5.282 km/h,146.144302,9(9),      7.56 m,
+123,T,2008/01/27,14:23:44.000,SPS,57.702205,N,11.972077,E,36.777 m,5.387 km/h,142.318588,9(9),      8.29 m,
+124,T,2008/01/27,14:23:49.000,SPS,57.702167,N,11.972155,E,36.541 m,4.789 km/h,141.388947,9(9),      6.28 m,
+125,T,2008/01/27,14:23:54.000,SPS,57.702114,N,11.972225,E,37.536 m,4.316 km/h,143.495270,9(9),      7.25 m,
+126,T,2008/01/27,14:23:59.000,SPS,57.702075,N,11.972305,E,38.683 m,3.844 km/h,143.495270,9(9),      6.61 m,
+127,T,2008/01/27,14:24:04.000,SPS,57.702031,N,11.972358,E,40.180 m,5.849 km/h,143.495270,8(9),      6.05 m,
+128,T,2008/01/27,14:24:09.000,SPS,57.702005,N,11.972405,E,40.464 m,2.516 km/h,143.495270,8(9),      4.01 m,
+129,T,2008/01/27,14:24:14.000,SPS,57.701941,N,11.972475,E,40.150 m,4.882 km/h,142.500504,8(9),      8.26 m,
+130,T,2008/01/27,14:24:19.000,SPS,57.701902,N,11.972565,E,41.289 m,4.514 km/h,142.500504,9(9),      6.97 m,
+131,T,2008/01/27,14:24:24.000,SPS,57.701854,N,11.972631,E,43.597 m,5.178 km/h,142.500504,8(9),      7.07 m,
+132,T,2008/01/27,14:24:29.000,SPS,57.701806,N,11.972704,E,45.537 m,5.645 km/h,144.574066,9(9),      7.15 m,
+133,T,2008/01/27,14:24:34.000,SPS,57.701765,N,11.972797,E,46.518 m,4.432 km/h,144.574066,9(9),      7.27 m,
+134,T,2008/01/27,14:24:39.000,SPS,57.701719,N,11.972896,E,47.777 m,4.439 km/h,144.574066,9(9),      7.91 m,
+135,T,2008/01/27,14:24:44.000,SPS,57.701652,N,11.972960,E,47.737 m,5.667 km/h,139.446564,9(9),      8.37 m,
+136,T,2008/01/27,14:24:49.000,SPS,57.701602,N,11.973009,E,48.639 m,6.125 km/h,139.909683,7(9),      6.38 m,
+137,T,2008/01/27,14:24:54.000,SPS,57.701564,N,11.973088,E,49.968 m,4.705 km/h,139.909683,8(9),      6.46 m,
+138,T,2008/01/27,14:24:59.000,SPS,57.701515,N,11.973171,E,52.496 m,4.574 km/h,140.883011,8(9),      7.81 m,
+139,T,2008/01/27,14:25:04.000,SPS,57.701465,N,11.973252,E,55.388 m,6.149 km/h,142.145920,8(9),      7.89 m,
+140,T,2008/01/27,14:25:09.000,SPS,57.701428,N,11.973333,E,57.299 m,4.935 km/h,141.485916,8(9),      6.64 m,
+141,T,2008/01/27,14:25:14.000,SPS,57.701378,N,11.973416,E,58.615 m,4.705 km/h,139.331635,8(9),      7.51 m,
+142,T,2008/01/27,14:25:19.000,SPS,57.701333,N,11.973495,E,61.027 m,3.944 km/h,140.293564,8(9),      7.27 m,
+143,T,2008/01/27,14:25:24.000,SPS,57.701295,N,11.973585,E,63.131 m,6.009 km/h,142.518753,8(9),      7.20 m,
+144,T,2008/01/27,14:25:29.000,SPS,57.701252,N,11.973650,E,64.942 m,4.910 km/h,142.518753,8(9),      6.38 m,
+145,T,2008/01/27,14:25:34.000,SPS,57.701196,N,11.973733,E,65.995 m,5.170 km/h,143.172440,8(9),      8.10 m,
+146,T,2008/01/27,14:25:39.000,SPS,57.701145,N,11.973814,E,66.960 m,6.035 km/h,143.604630,8(9),      7.53 m,
+147,T,2008/01/27,14:25:44.000,SPS,57.701097,N,11.973898,E,66.496 m,5.760 km/h,143.604630,8(9),      7.31 m,
+148,T,2008/01/27,14:25:49.000,SPS,57.701038,N,11.973964,E,66.285 m,4.407 km/h,144.729324,8(9),      7.62 m,
+149,T,2008/01/27,14:25:54.000,SPS,57.700892,N,11.974022,E,54.864 m,5.331 km/h,141.792358,8(9),     20.22 m,
+150,T,2008/01/27,14:25:59.000,SPS,57.700807,N,11.974077,E,49.539 m,4.924 km/h,141.792358,8(9),     11.29 m,
+151,T,2008/01/27,14:26:04.000,SPS,57.700763,N,11.974153,E,48.266 m,5.889 km/h,138.983597,8(9),      6.84 m,
+152,T,2008/01/27,14:26:09.000,SPS,57.700702,N,11.974227,E,46.362 m,7.215 km/h,154.235672,8(9),      8.34 m,
+153,T,2008/01/27,14:26:14.000,SPS,57.700652,N,11.974287,E,45.062 m,5.653 km/h,152.009735,7(9),      6.70 m,
+154,T,2008/01/27,14:26:19.000,SPS,57.700596,N,11.974367,E,45.015 m,4.898 km/h,152.009735,8(9),      7.86 m,
+155,T,2008/01/27,14:26:24.000,SPS,57.700539,N,11.974445,E,46.408 m,5.194 km/h,146.927551,8(9),      8.01 m,
+156,T,2008/01/27,14:26:29.000,SPS,57.700501,N,11.974528,E,48.432 m,5.674 km/h,144.441391,8(9),      6.77 m,
+157,T,2008/01/27,14:26:34.000,SPS,57.700449,N,11.974601,E,50.567 m,4.294 km/h,148.208267,8(9),      7.54 m,
+158,T,2008/01/27,14:26:39.000,SPS,57.700399,N,11.974682,E,51.603 m,4.031 km/h,148.208267,8(9),      7.50 m,
+159,T,2008/01/27,14:26:44.000,SPS,57.700365,N,11.974767,E,53.746 m,5.657 km/h,148.208267,8(9),      6.70 m,
+160,T,2008/01/27,14:26:49.000,SPS,57.700316,N,11.974832,E,56.361 m,5.684 km/h,148.971863,8(9),      7.15 m,
+161,T,2008/01/27,14:26:54.000,SPS,57.700283,N,11.974908,E,58.788 m,4.602 km/h,146.601395,8(9),      6.32 m,
+162,T,2008/01/27,14:26:59.000,SPS,57.700240,N,11.975000,E,60.958 m,4.184 km/h,148.007050,9(9),      7.60 m,
+163,T,2008/01/27,14:27:04.000,SPS,57.700172,N,11.975046,E,63.890 m,5.937 km/h,148.007050,9(9),      8.53 m,
+164,T,2008/01/27,14:27:09.000,SPS,57.700144,N,11.975124,E,67.956 m,4.641 km/h,149.515228,8(9),      6.93 m,
+165,T,2008/01/27,14:27:14.000,SPS,57.700103,N,11.975198,E,71.879 m,5.623 km/h,149.515228,9(9),      7.50 m,
+166,T,2008/01/27,14:27:19.000,SPS,57.700063,N,11.975268,E,74.786 m,4.700 km/h,149.515228,9(9),      6.71 m,
+167,T,2008/01/27,14:27:24.000,SPS,57.700010,N,11.975334,E,77.087 m,4.305 km/h,149.515228,8(9),      7.51 m,
+168,T,2008/01/27,14:27:29.000,SPS,57.699976,N,11.975421,E,78.694 m,3.675 km/h,147.837906,8(9),      6.59 m,
+169,T,2008/01/27,14:27:34.000,SPS,57.699933,N,11.975551,E,74.407 m,3.268 km/h,147.837906,9(9),     10.09 m,
+170,T,2008/01/27,14:27:39.000,SPS,57.699861,N,11.975623,E,70.901 m,5.284 km/h,147.837906,7(9),      9.79 m,
+171,T,2008/01/27,14:27:44.000,SPS,57.699766,N,11.975627,E,69.342 m,5.455 km/h,148.045532,7(9),     10.70 m,
+172,T,2008/01/27,14:27:49.000,SPS,57.699714,N,11.975701,E,69.503 m,4.288 km/h,148.045532,9(9),      7.31 m,
+173,T,2008/01/27,14:27:54.000,SPS,57.699677,N,11.975772,E,74.143 m,4.658 km/h,148.045532,8(9),      7.48 m,
+174,T,2008/01/27,14:27:59.000,SPS,57.699630,N,11.975831,E,77.762 m,4.690 km/h,146.587997,8(9),      7.31 m,
+175,T,2008/01/27,14:28:04.000,SPS,57.699587,N,11.975906,E,82.255 m,4.369 km/h,146.587997,9(9),      7.91 m,
+176,T,2008/01/27,14:28:09.000,SPS,57.699523,N,11.975945,E,86.903 m,4.164 km/h,146.587997,9(9),      8.87 m,
+177,T,2008/01/27,14:28:14.000,SPS,57.699489,N,11.976030,E,91.039 m,2.754 km/h,146.587997,9(9),      7.56 m,
+178,T,2008/01/27,14:28:19.000,SPS,57.699445,N,11.976073,E,95.987 m,5.104 km/h,146.587997,8(9),      7.43 m,
+179,T,2008/01/27,14:28:24.000,SPS,57.699389,N,11.976112,E,101.368 m,4.419 km/h,146.587997,8(9),      8.55 m,
+180,T,2008/01/27,14:28:29.000,SPS,57.699329,N,11.976171,E,108.444 m,3.853 km/h,148.233871,9(9),     10.36 m,
+181,T,2008/01/27,14:28:34.000,SPS,57.699294,N,11.976244,E,112.981 m,2.953 km/h,148.233871,8(9),      7.40 m,
+182,T,2008/01/27,14:28:39.000,SPS,57.699264,N,11.976337,E,119.031 m,2.642 km/h,150.412949,8(9),      8.88 m,
+183,T,2008/01/27,14:28:44.000,SPS,57.699210,N,11.976447,E,124.016 m,3.473 km/h,150.412949,8(9),     10.16 m,
+184,T,2008/01/27,14:28:49.000,SPS,57.699173,N,11.976573,E,128.919 m,5.681 km/h,149.867859,9(9),      9.84 m,
+185,T,2008/01/27,14:28:54.000,SPS,57.699139,N,11.976670,E,135.981 m,3.088 km/h,149.867859,9(9),      9.92 m,
+186,T,2008/01/27,14:28:59.000,SPS,57.699093,N,11.976753,E,142.061 m,5.294 km/h,152.427673,9(9),      9.35 m,
+187,T,2008/01/27,14:29:04.000,SPS,57.699046,N,11.976873,E,145.621 m,4.161 km/h,152.427673,8(9),      9.55 m,
+188,T,2008/01/27,14:29:09.000,SPS,57.698989,N,11.976973,E,147.339 m,4.649 km/h,152.427673,9(9),      8.89 m,
+189,T,2008/01/27,14:29:14.000,SPS,57.698959,N,11.977002,E,147.915 m,1.062 km/h,152.427673,8(9),      3.76 m,
+190,T,2008/01/27,14:29:19.000,SPS,57.698952,N,11.977011,E,149.006 m,0.663 km/h,152.427673,8(9),      1.47 m,
+191,T,2008/01/27,14:29:24.000,SPS,57.698945,N,11.977021,E,149.275 m,0.836 km/h,152.427673,8(9),      1.02 m,
+192,T,2008/01/27,14:29:29.000,SPS,57.698937,N,11.977026,E,149.182 m,0.762 km/h,152.427673,8(9),      0.91 m,
+193,T,2008/01/27,14:29:34.000,SPS,57.698931,N,11.977031,E,148.906 m,0.273 km/h,152.427673,8(9),      0.79 m,
+194,T,2008/01/27,14:29:39.000,SPS,57.698925,N,11.977038,E,148.810 m,4.308 km/h,152.427673,8(9),      0.86 m,
+195,T,2008/01/27,14:29:44.000,SPS,57.698786,N,11.977053,E,135.016 m,3.069 km/h,152.427673,8(9),     20.74 m,
+196,T,2008/01/27,14:29:49.000,SPS,57.698688,N,11.977180,E,127.507 m,2.269 km/h,151.834854,8(9),     15.23 m,
+197,T,2008/01/27,14:29:54.000,SPS,57.698672,N,11.977273,E,125.575 m,3.602 km/h,151.834854,8(10),      6.10 m,
+198,T,2008/01/27,14:29:59.000,SPS,57.698642,N,11.977302,E,124.096 m,2.652 km/h,151.834854,9(10),      4.06 m,
+199,T,2008/01/27,14:30:04.000,SPS,57.698615,N,11.977346,E,125.293 m,5.561 km/h,151.834854,8(10),      4.18 m,
+200,T,2008/01/27,14:30:09.000,SPS,57.698579,N,11.977430,E,126.160 m,5.967 km/h,151.834854,9(10),      6.51 m,
+201,T,2008/01/27,14:30:14.000,SPS,57.698531,N,11.977506,E,126.889 m,4.460 km/h,151.834854,8(10),      7.01 m,
+202,T,2008/01/27,14:30:19.000,SPS,57.698481,N,11.977542,E,127.783 m,4.184 km/h,151.834854,8(10),      6.06 m,
+203,T,2008/01/27,14:30:24.000,SPS,57.698439,N,11.977617,E,127.161 m,1.893 km/h,151.834854,8(9),      6.46 m,
+204,T,2008/01/27,14:30:29.000,SPS,57.698406,N,11.977693,E,127.212 m,3.030 km/h,151.709610,8(10),      5.83 m,
+205,T,2008/01/27,14:30:34.000,SPS,57.698369,N,11.977842,E,122.670 m,3.823 km/h,150.292557,9(10),     10.84 m,
+206,T,2008/01/27,14:30:39.000,SPS,57.698332,N,11.977959,E,119.508 m,4.297 km/h,150.292557,9(10),      8.67 m,
+207,T,2008/01/27,14:30:44.000,SPS,57.698291,N,11.978065,E,118.257 m,3.208 km/h,152.138992,8(10),      7.88 m,
+208,T,2008/01/27,14:30:49.000,SPS,57.698251,N,11.978478,E,114.823 m,5.848 km/h,152.138992,9(10),     25.29 m,
+209,T,2008/01/27,14:30:54.000,SPS,57.698180,N,11.978644,E,109.670 m,4.343 km/h,152.138992,8(10),     13.60 m,
+210,T,2008/01/27,14:30:59.000,SPS,57.698129,N,11.978757,E,105.506 m,5.529 km/h,151.187805,8(10),      9.81 m,
+211,T,2008/01/27,14:31:04.000,SPS,57.698061,N,11.978835,E,103.666 m,4.856 km/h,149.160706,9(10),      9.04 m,
+212,T,2008/01/27,14:31:09.000,SPS,57.697995,N,11.978816,E,105.252 m,4.680 km/h,147.681824,8(10),      7.65 m,
+213,T,2008/01/27,14:31:14.000,SPS,57.697933,N,11.978762,E,106.092 m,4.216 km/h,147.681824,8(9),      7.67 m,
+214,T,2008/01/27,14:31:19.000,SPS,57.697842,N,11.978776,E,104.700 m,6.214 km/h,147.681824,8(10),     10.29 m,
+215,T,2008/01/27,14:31:24.000,SPS,57.697784,N,11.978808,E,104.697 m,4.608 km/h,147.681824,9(10),      6.75 m,
+216,T,2008/01/27,14:31:29.000,SPS,57.697712,N,11.978872,E,106.038 m,4.529 km/h,144.817627,7(10),      8.91 m,
+217,T,2008/01/27,14:31:34.000,SPS,57.697683,N,11.978893,E,103.740 m,5.686 km/h,143.690689,8(10),      4.15 m,
+218,T,2008/01/27,14:31:39.000,SPS,57.697665,N,11.978943,E,100.028 m,3.866 km/h,143.690689,8(10),      5.17 m,
+219,T,2008/01/27,14:31:44.000,SPS,57.697600,N,11.979012,E,96.331 m,5.607 km/h,171.598877,8(10),      9.04 m,
+220,T,2008/01/27,14:31:49.000,SPS,57.697474,N,11.978969,E,89.905 m,7.039 km/h,175.468765,7(10),     15.68 m,
+221,T,2008/01/27,14:31:54.000,SPS,57.697367,N,11.979000,E,84.427 m,4.651 km/h,175.468765,8(10),     13.23 m,
+222,T,2008/01/27,14:31:59.000,SPS,57.697308,N,11.979088,E,83.601 m,5.585 km/h,175.468765,8(10),      8.48 m,
+223,T,2008/01/27,14:32:04.000,SPS,57.697291,N,11.979184,E,86.593 m,4.621 km/h,175.468765,9(10),      6.70 m,
+224,T,2008/01/27,14:32:09.000,SPS,57.697274,N,11.979310,E,89.465 m,5.419 km/h,175.468765,9(10),      8.25 m,
+225,T,2008/01/27,14:32:14.000,SPS,57.697219,N,11.979413,E,87.774 m,4.181 km/h,175.468765,9(10),      8.90 m,
+226,T,2008/01/27,14:32:19.000,SPS,57.697166,N,11.979434,E,95.693 m,3.918 km/h,175.468765,9(10),      9.92 m,
+227,T,2008/01/27,14:32:24.000,SPS,57.697098,N,11.979491,E,92.201 m,1.306 km/h,175.468765,9(10),      9.03 m,
+228,T,2008/01/27,14:32:29.000,SPS,57.697098,N,11.979481,E,95.843 m,1.357 km/h,175.468765,9(10),      3.70 m,
+229,B,2008/01/27,14:32:31.000,SPS,57.697093,N,11.979470,E,96.421 m,1.226 km/h,175.468765,8(10),      0.98 m,
+230,T,2008/01/27,14:32:36.000,SPS,57.697089,N,11.979459,E,97.553 m,0.348 km/h,175.468765,9(10),      1.38 m,
+231,T,2008/01/27,14:32:41.000,SPS,57.697088,N,11.979459,E,97.998 m,0.744 km/h,175.468765,9(10),      0.46 m,
+232,T,2008/01/27,14:32:46.000,SPS,57.697104,N,11.979504,E,96.478 m,3.837 km/h,175.468765,9(10),      3.54 m,
+233,T,2008/01/27,14:32:51.000,SPS,57.697152,N,11.979574,E,89.553 m,4.436 km/h,175.468765,8(10),      9.69 m,
+234,T,2008/01/27,14:32:56.000,SPS,57.697205,N,11.979565,E,83.425 m,4.382 km/h,175.468765,9(10),      8.53 m,
+235,T,2008/01/27,14:33:01.000,SPS,57.697266,N,11.979543,E,79.043 m,5.017 km/h,175.468765,9(10),      8.14 m,
+236,T,2008/01/27,14:33:06.000,SPS,57.697335,N,11.979517,E,75.905 m,6.258 km/h,175.468765,9(10),      8.55 m,
+237,T,2008/01/27,14:33:11.000,SPS,57.697396,N,11.979553,E,72.991 m,6.059 km/h,175.468765,9(10),      7.68 m,
+238,T,2008/01/27,14:33:16.000,SPS,57.697457,N,11.979552,E,69.763 m,4.282 km/h,175.468765,8(10),      7.51 m,
+239,T,2008/01/27,14:33:21.000,SPS,57.697530,N,11.979501,E,64.874 m,5.514 km/h,175.468765,8(10),      9.92 m,
+240,T,2008/01/27,14:33:26.000,SPS,57.697577,N,11.979440,E,61.687 m,4.860 km/h,175.468765,9(10),      7.16 m,
+241,T,2008/01/27,14:33:31.000,SPS,57.697611,N,11.979335,E,60.879 m,6.522 km/h,175.468765,9(10),      7.37 m,
+242,T,2008/01/27,14:33:36.000,SPS,57.697651,N,11.979255,E,60.912 m,4.865 km/h,175.468765,8(10),      6.51 m,
+243,T,2008/01/27,14:33:41.000,SPS,57.697683,N,11.979185,E,61.899 m,4.418 km/h,175.468765,9(10),      5.60 m,
+244,T,2008/01/27,14:33:46.000,SPS,57.697710,N,11.979115,E,64.165 m,5.755 km/h,175.468765,9(10),      5.63 m,
+245,T,2008/01/27,14:33:51.000,SPS,57.697735,N,11.979055,E,68.273 m,3.367 km/h,175.468765,9(10),      6.09 m,
+246,T,2008/01/27,14:33:56.000,SPS,57.697783,N,11.978979,E,69.860 m,3.793 km/h,175.468765,9(10),      7.23 m,
+247,T,2008/01/27,14:34:01.000,SPS,57.697852,N,11.978978,E,69.197 m,3.305 km/h,175.468765,9(10),      7.68 m,
+248,T,2008/01/27,14:34:06.000,SPS,57.697931,N,11.978880,E,66.018 m,4.712 km/h,175.468765,8(10),     11.04 m,
+249,T,2008/01/27,14:34:11.000,SPS,57.698014,N,11.978795,E,63.117 m,5.675 km/h,175.468765,8(10),     10.95 m,
+250,T,2008/01/27,14:34:16.000,SPS,57.698069,N,11.978688,E,62.031 m,4.371 km/h,175.468765,8(10),      8.90 m,
+251,T,2008/01/27,14:34:21.000,SPS,57.698117,N,11.978581,E,63.191 m,4.748 km/h,175.468765,8(10),      8.39 m,
+252,T,2008/01/27,14:34:26.000,SPS,57.698160,N,11.978480,E,63.152 m,4.791 km/h,175.468765,8(10),      7.70 m,
+253,T,2008/01/27,14:34:31.000,SPS,57.698224,N,11.978408,E,64.188 m,3.706 km/h,175.468765,8(10),      8.32 m,
+254,T,2008/01/27,14:34:36.000,SPS,57.698269,N,11.978333,E,62.523 m,4.638 km/h,175.468765,9(10),      7.00 m,
+255,T,2008/01/27,14:34:41.000,SPS,57.698344,N,11.978199,E,59.039 m,4.556 km/h,175.468765,8(10),     12.01 m,
+256,T,2008/01/27,14:34:46.000,SPS,57.698394,N,11.978093,E,58.767 m,5.073 km/h,175.468765,9(10),      8.45 m,
+257,T,2008/01/27,14:34:51.000,SPS,57.698437,N,11.978009,E,58.772 m,5.069 km/h,175.468765,8(10),      6.98 m,
+258,T,2008/01/27,14:34:56.000,SPS,57.698484,N,11.977918,E,59.631 m,5.502 km/h,175.468765,8(10),      7.57 m,
+259,T,2008/01/27,14:35:01.000,SPS,57.698542,N,11.977855,E,59.825 m,4.129 km/h,175.468765,8(10),      7.50 m,
+260,T,2008/01/27,14:35:06.000,SPS,57.698616,N,11.977818,E,59.702 m,4.785 km/h,175.468765,9(10),      8.44 m,
+261,T,2008/01/27,14:35:11.000,SPS,57.698663,N,11.977687,E,57.375 m,2.401 km/h,175.468765,8(10),      9.68 m,
+262,T,2008/01/27,14:35:16.000,SPS,57.698660,N,11.977696,E,57.712 m,0.124 km/h,175.468765,9(10),      0.68 m,
+263,T,2008/01/27,14:35:21.000,SPS,57.698660,N,11.977696,E,57.753 m,0.028 km/h,175.468765,8(10),      0.06 m,
+264,T,2008/01/27,14:35:26.000,SPS,57.698660,N,11.977697,E,57.740 m,0.029 km/h,175.468765,8(10),      0.03 m,
+265,T,2008/01/27,14:35:31.000,SPS,57.698666,N,11.977690,E,57.764 m,5.039 km/h,175.468765,9(10),      0.87 m,
+266,T,2008/01/27,14:35:36.000,SPS,57.698734,N,11.977587,E,56.159 m,6.733 km/h,175.468765,8(10),      9.86 m,
+267,T,2008/01/27,14:35:41.000,SPS,57.698815,N,11.977506,E,51.600 m,4.906 km/h,175.468765,9(10),     11.14 m,
+268,T,2008/01/27,14:35:46.000,SPS,57.698893,N,11.977435,E,50.687 m,6.568 km/h,175.468765,8(10),      9.76 m,
+269,T,2008/01/27,14:35:51.000,SPS,57.698960,N,11.977356,E,51.726 m,4.858 km/h,175.468765,8(10),      8.84 m,
+270,T,2008/01/27,14:35:56.000,SPS,57.699004,N,11.977275,E,53.612 m,5.514 km/h,175.468765,9(10),      7.12 m,
+271,T,2008/01/27,14:36:01.000,SPS,57.699043,N,11.977179,E,54.670 m,5.972 km/h,175.468765,8(10),      7.28 m,
+272,T,2008/01/27,14:36:06.000,SPS,57.699088,N,11.977114,E,56.635 m,6.510 km/h,175.468765,8(10),      6.66 m,
+273,T,2008/01/27,14:36:11.000,SPS,57.699135,N,11.977033,E,59.526 m,3.891 km/h,175.468765,9(10),      7.64 m,
+274,T,2008/01/27,14:36:16.000,SPS,57.699140,N,11.976915,E,61.831 m,5.391 km/h,175.468765,9(10),      7.47 m,
+275,T,2008/01/27,14:36:21.000,SPS,57.699183,N,11.976799,E,63.125 m,3.378 km/h,175.468765,8(10),      8.49 m,
+276,T,2008/01/27,14:36:26.000,SPS,57.699238,N,11.976728,E,65.140 m,7.040 km/h,175.468765,8(10),      7.74 m,
+277,T,2008/01/27,14:36:31.000,SPS,57.699323,N,11.976679,E,63.123 m,3.529 km/h,175.468765,8(10),     10.12 m,
+278,T,2008/01/27,14:36:36.000,SPS,57.699357,N,11.976650,E,63.095 m,2.025 km/h,175.468765,9(10),      4.18 m,
+279,T,2008/01/27,14:36:41.000,SPS,57.699361,N,11.976686,E,64.549 m,0.758 km/h,175.468765,9(10),      2.63 m,
+280,T,2008/01/27,14:36:46.000,SPS,57.699357,N,11.976696,E,65.330 m,0.328 km/h,175.468765,9(10),      1.06 m,
+281,T,2008/01/27,14:36:51.000,SPS,57.699353,N,11.976715,E,65.651 m,2.531 km/h,175.468765,8(10),      1.28 m,
+282,T,2008/01/27,14:36:56.000,SPS,57.699354,N,11.976777,E,65.963 m,2.095 km/h,175.468765,8(10),      3.71 m,
+283,T,2008/01/27,14:37:01.000,SPS,57.699353,N,11.976817,E,66.272 m,2.000 km/h,175.468765,8(10),      2.40 m,
+284,T,2008/01/27,14:37:06.000,SPS,57.699339,N,11.976852,E,66.537 m,2.305 km/h,175.468765,8(10),      2.64 m,
+285,T,2008/01/27,14:37:11.000,SPS,57.699336,N,11.976895,E,66.844 m,0.733 km/h,175.468765,8(10),      2.63 m,
+286,T,2008/01/27,14:37:16.000,SPS,57.699336,N,11.976902,E,66.999 m,0.190 km/h,175.468765,9(10),      0.45 m,
+287,T,2008/01/27,14:37:21.000,SPS,57.699337,N,11.976903,E,67.045 m,0.371 km/h,175.468765,8(10),      0.15 m,
+288,T,2008/01/27,14:37:26.000,SPS,57.699343,N,11.976884,E,67.063 m,1.609 km/h,175.468765,9(10),      1.28 m,
+289,T,2008/01/27,14:37:31.000,SPS,57.699353,N,11.976850,E,67.086 m,1.660 km/h,175.468765,9(10),      2.33 m,
+290,T,2008/01/27,14:37:36.000,SPS,57.699359,N,11.976833,E,67.109 m,0.692 km/h,175.468765,9(10),      1.21 m,
+291,T,2008/01/27,14:37:41.000,SPS,57.699364,N,11.976816,E,67.116 m,0.498 km/h,175.468765,9(10),      1.17 m,
+292,T,2008/01/27,14:37:46.000,SPS,57.699367,N,11.976811,E,67.123 m,0.457 km/h,175.468765,9(10),      0.46 m,
+293,T,2008/01/27,14:37:51.000,SPS,57.699376,N,11.976791,E,67.126 m,1.897 km/h,175.468765,9(10),      1.50 m,
+294,T,2008/01/27,14:37:56.000,SPS,57.699404,N,11.976773,E,67.146 m,3.128 km/h,175.468765,8(10),      3.34 m,
+295,T,2008/01/27,14:38:01.000,SPS,57.699441,N,11.976757,E,67.190 m,2.677 km/h,175.468765,8(10),      4.29 m,
+296,T,2008/01/27,14:38:06.000,SPS,57.699470,N,11.976756,E,67.275 m,2.140 km/h,175.468765,7(10),      3.17 m,
+297,T,2008/01/27,14:38:11.000,SPS,57.699496,N,11.976755,E,67.238 m,2.152 km/h,175.468765,7(10),      2.92 m,
+298,T,2008/01/27,14:38:16.000,SPS,57.699523,N,11.976775,E,67.197 m,2.287 km/h,175.468765,7(10),      3.25 m,
+299,T,2008/01/27,14:38:21.000,SPS,57.699554,N,11.976780,E,67.123 m,2.599 km/h,175.468765,8(10),      3.41 m,
+300,T,2008/01/27,14:38:26.000,SPS,57.699579,N,11.976773,E,67.029 m,1.833 km/h,175.468765,7(10),      2.83 m,
+301,T,2008/01/27,14:38:31.000,SPS,57.699588,N,11.976764,E,66.982 m,0.306 km/h,175.468765,7(10),      1.19 m,
+302,T,2008/01/27,14:38:36.000,SPS,57.699594,N,11.976795,E,66.995 m,1.683 km/h,175.468765,7(10),      1.94 m,
+303,T,2008/01/27,14:38:41.000,SPS,57.699594,N,11.976796,E,67.051 m,0.616 km/h,175.468765,8(10),      0.10 m,
+304,T,2008/01/27,14:38:46.000,SPS,57.699594,N,11.976800,E,67.175 m,0.933 km/h,175.468765,8(10),      0.27 m,
+305,T,2008/01/27,14:38:51.000,SPS,57.699596,N,11.976814,E,67.189 m,0.589 km/h,175.468765,8(10),      0.87 m,
+306,T,2008/01/27,14:38:56.000,SPS,57.699576,N,11.976767,E,67.108 m,3.395 km/h,175.468765,8(10),      3.55 m,
+307,T,2008/01/27,14:39:01.000,SPS,57.699566,N,11.976759,E,67.008 m,0.996 km/h,175.468765,8(10),      1.20 m,
+308,T,2008/01/27,14:39:06.000,SPS,57.699570,N,11.976760,E,66.902 m,0.474 km/h,175.468765,7(10),      0.42 m,
+309,T,2008/01/27,14:39:11.000,SPS,57.699573,N,11.976757,E,66.823 m,1.591 km/h,175.468765,8(10),      0.41 m,
+310,T,2008/01/27,14:39:16.000,SPS,57.699566,N,11.976722,E,66.704 m,2.013 km/h,175.468765,8(10),      2.22 m,
+311,T,2008/01/27,14:39:21.000,SPS,57.699556,N,11.976691,E,66.499 m,3.174 km/h,175.468765,8(10),      2.18 m,
+312,T,2008/01/27,14:39:26.000,SPS,57.699556,N,11.976631,E,66.373 m,4.101 km/h,175.468765,9(10),      3.56 m,
+313,T,2008/01/27,14:39:31.000,SPS,57.699554,N,11.976523,E,62.448 m,5.704 km/h,175.468765,9(10),      7.55 m,
+314,T,2008/01/27,14:39:36.000,SPS,57.699557,N,11.976459,E,63.711 m,1.936 km/h,175.468765,9(10),      4.04 m,
+315,T,2008/01/27,14:39:41.000,SPS,57.699589,N,11.976401,E,65.081 m,5.259 km/h,175.468765,8(10),      5.10 m,
+316,T,2008/01/27,14:39:46.000,SPS,57.699618,N,11.976313,E,65.332 m,1.698 km/h,175.468765,9(10),      6.13 m,
+317,T,2008/01/27,14:39:51.000,SPS,57.699658,N,11.976248,E,65.433 m,3.701 km/h,175.468765,9(10),      5.96 m,
+318,T,2008/01/27,14:39:56.000,SPS,57.699713,N,11.976241,E,68.670 m,3.926 km/h,175.468765,8(10),      6.90 m,
+319,T,2008/01/27,14:40:01.000,SPS,57.699776,N,11.976177,E,67.728 m,4.038 km/h,175.468765,8(10),      8.09 m,
+320,T,2008/01/27,14:40:06.000,SPS,57.699825,N,11.976082,E,67.210 m,4.399 km/h,175.468765,9(10),      7.83 m,
+321,T,2008/01/27,14:40:11.000,SPS,57.699890,N,11.975991,E,67.461 m,4.970 km/h,175.468765,9(10),      9.05 m,
+322,T,2008/01/27,14:40:16.000,SPS,57.699933,N,11.975902,E,67.407 m,4.824 km/h,175.468765,8(10),      7.11 m,
+323,T,2008/01/27,14:40:21.000,SPS,57.699982,N,11.975813,E,67.934 m,3.603 km/h,175.468765,9(10),      7.65 m,
+324,T,2008/01/27,14:40:26.000,SPS,57.700013,N,11.975730,E,68.325 m,4.033 km/h,175.468765,8(10),      6.07 m,
+325,T,2008/01/27,14:40:31.000,SPS,57.700051,N,11.975639,E,68.266 m,4.495 km/h,175.468765,8(11),      6.83 m,
+326,T,2008/01/27,14:40:36.000,SPS,57.700111,N,11.975515,E,66.728 m,7.484 km/h,312.802246,9(11),     10.12 m,
+327,T,2008/01/27,14:40:41.000,SPS,57.700148,N,11.975412,E,66.768 m,5.457 km/h,312.802246,9(10),      7.41 m,
+328,T,2008/01/27,14:40:46.000,SPS,57.700209,N,11.975290,E,64.711 m,4.795 km/h,313.321777,8(11),     10.16 m,
+329,T,2008/01/27,14:40:51.000,SPS,57.700288,N,11.975163,E,59.311 m,5.921 km/h,308.333649,8(11),     12.80 m,
+330,T,2008/01/27,14:40:56.000,SPS,57.700373,N,11.975093,E,55.797 m,5.683 km/h,308.333649,9(11),     10.90 m,
+331,T,2008/01/27,14:41:01.000,SPS,57.700438,N,11.975011,E,53.861 m,4.589 km/h,308.333649,8(11),      8.97 m,
+332,T,2008/01/27,14:41:06.000,SPS,57.700497,N,11.974938,E,53.176 m,4.847 km/h,308.138123,9(11),      7.86 m,
+333,T,2008/01/27,14:41:11.000,SPS,57.700559,N,11.974854,E,52.072 m,3.912 km/h,308.138123,8(11),      8.65 m,
+334,T,2008/01/27,14:41:16.000,SPS,57.700677,N,11.974866,E,48.708 m,5.864 km/h,308.138123,8(11),     13.57 m,
+335,T,2008/01/27,14:41:21.000,SPS,57.700746,N,11.974814,E,46.551 m,4.577 km/h,308.138123,8(11),      8.57 m,
+336,T,2008/01/27,14:41:26.000,SPS,57.700808,N,11.974717,E,45.545 m,5.492 km/h,308.138123,8(11),      9.07 m,
+337,T,2008/01/27,14:41:31.000,SPS,57.700870,N,11.974636,E,44.029 m,6.530 km/h,307.519714,8(11),      8.51 m,
+338,T,2008/01/27,14:41:36.000,SPS,57.700937,N,11.974539,E,43.179 m,5.834 km/h,307.519714,9(11),      9.53 m,
+339,T,2008/01/27,14:41:41.000,SPS,57.700976,N,11.974505,E,44.183 m,4.036 km/h,307.519714,9(11),      4.85 m,
+340,T,2008/01/27,14:41:46.000,SPS,57.701024,N,11.974409,E,44.197 m,4.866 km/h,307.519714,9(11),      7.86 m,
+341,T,2008/01/27,14:41:51.000,SPS,57.701062,N,11.974339,E,44.851 m,3.063 km/h,309.039703,9(10),      6.04 m,
+342,T,2008/01/27,14:41:56.000,SPS,57.701103,N,11.974260,E,46.545 m,3.451 km/h,312.476257,9(11),      6.71 m,
+343,T,2008/01/27,14:42:01.000,SPS,57.701145,N,11.974184,E,48.676 m,4.202 km/h,312.476257,9(11),      6.91 m,
+344,T,2008/01/27,14:42:06.000,SPS,57.701185,N,11.974109,E,51.464 m,4.515 km/h,313.447083,9(11),      6.87 m,
+345,T,2008/01/27,14:42:11.000,SPS,57.701257,N,11.974060,E,52.666 m,3.776 km/h,313.648682,9(11),      8.60 m,
+346,T,2008/01/27,14:42:16.000,SPS,57.701289,N,11.973956,E,54.016 m,5.350 km/h,313.648682,9(11),      7.29 m,
+347,T,2008/01/27,14:42:21.000,SPS,57.701320,N,11.973851,E,55.015 m,4.412 km/h,313.648682,9(11),      7.23 m,
+348,T,2008/01/27,14:42:26.000,SPS,57.701396,N,11.973794,E,55.862 m,5.184 km/h,313.648682,8(11),      9.12 m,
+349,T,2008/01/27,14:42:31.000,SPS,57.701411,N,11.973702,E,59.843 m,3.612 km/h,315.012482,10(11),      7.01 m,
+350,T,2008/01/27,14:42:36.000,SPS,57.701435,N,11.973617,E,62.617 m,3.938 km/h,315.592804,9(11),      6.37 m,
+351,T,2008/01/27,14:42:41.000,SPS,57.701444,N,11.973507,E,65.984 m,4.078 km/h,315.939636,9(11),      7.41 m,
+352,T,2008/01/27,14:42:46.000,SPS,57.701460,N,11.973434,E,68.956 m,4.906 km/h,315.939636,9(11),      5.56 m,
+353,T,2008/01/27,14:42:51.000,SPS,57.701617,N,11.973517,E,64.422 m,4.207 km/h,319.429626,9(11),     18.81 m,
+354,T,2008/01/27,14:42:56.000,SPS,57.701706,N,11.973372,E,57.507 m,3.937 km/h,319.429626,9(11),     14.86 m,
+355,T,2008/01/27,14:43:01.000,SPS,57.701753,N,11.973226,E,53.629 m,6.001 km/h,319.429626,9(11),     10.90 m,
+356,T,2008/01/27,14:43:06.000,SPS,57.701804,N,11.973084,E,51.208 m,4.103 km/h,319.429626,8(10),     10.46 m,
+357,T,2008/01/27,14:43:11.000,SPS,57.701858,N,11.972972,E,50.054 m,4.389 km/h,319.604919,8(11),      8.99 m,
+358,T,2008/01/27,14:43:16.000,SPS,57.701902,N,11.972925,E,51.181 m,4.323 km/h,319.773590,9(11),      5.81 m,
+359,T,2008/01/27,14:43:21.000,SPS,57.701974,N,11.972840,E,50.300 m,5.974 km/h,319.422302,9(11),      9.52 m,
+360,T,2008/01/27,14:43:26.000,SPS,57.702049,N,11.972744,E,47.162 m,4.477 km/h,319.306824,9(11),     10.63 m,
+361,T,2008/01/27,14:43:31.000,SPS,57.702130,N,11.972675,E,43.652 m,5.464 km/h,318.747681,9(11),     10.52 m,
+362,T,2008/01/27,14:43:36.000,SPS,57.702183,N,11.972622,E,41.517 m,6.473 km/h,321.181732,9(11),      6.98 m,
+363,T,2008/01/27,14:43:41.000,SPS,57.702257,N,11.972538,E,42.297 m,6.683 km/h,321.181732,8(11),      9.71 m,
+364,T,2008/01/27,14:43:46.000,SPS,57.702325,N,11.972445,E,41.170 m,5.209 km/h,330.178528,9(11),      9.46 m,
+365,T,2008/01/27,14:43:51.000,SPS,57.702383,N,11.972354,E,40.141 m,3.227 km/h,330.178528,9(11),      8.43 m,
+366,T,2008/01/27,14:43:56.000,SPS,57.702412,N,11.972289,E,41.489 m,4.234 km/h,331.304474,8(11),      5.28 m,
+367,T,2008/01/27,14:44:01.000,SPS,57.702438,N,11.972275,E,41.592 m,0.282 km/h,331.304474,9(11),      2.99 m,
+368,T,2008/01/27,14:44:06.000,SPS,57.702440,N,11.972273,E,41.805 m,0.492 km/h,331.304474,9(10),      0.36 m,
+369,T,2008/01/27,14:44:11.000,SPS,57.702441,N,11.972272,E,41.838 m,0.093 km/h,331.304474,8(11),      0.07 m,
+370,T,2008/01/27,14:44:16.000,SPS,57.702454,N,11.972234,E,41.977 m,5.925 km/h,331.304474,8(10),      2.71 m,
+371,T,2008/01/27,14:44:21.000,SPS,57.702500,N,11.972135,E,39.424 m,5.709 km/h,331.304474,9(11),      8.21 m,
+372,T,2008/01/27,14:44:26.000,SPS,57.702562,N,11.972116,E,39.249 m,6.026 km/h,331.304474,9(11),      7.03 m,
+373,T,2008/01/27,14:44:31.000,SPS,57.702616,N,11.972060,E,40.106 m,6.033 km/h,331.304474,9(11),      6.89 m,
+374,T,2008/01/27,14:44:36.000,SPS,57.702666,N,11.972001,E,40.622 m,4.647 km/h,332.742340,9(11),      6.63 m,
+375,T,2008/01/27,14:44:41.000,SPS,57.702736,N,11.971930,E,39.549 m,4.373 km/h,334.134705,9(11),      8.90 m,
+376,T,2008/01/27,14:44:46.000,SPS,57.702782,N,11.971835,E,39.688 m,4.830 km/h,334.134705,9(11),      7.67 m,
+377,T,2008/01/27,14:44:51.000,SPS,57.702843,N,11.971722,E,36.875 m,5.373 km/h,334.134705,9(11),     10.02 m,
+378,T,2008/01/27,14:44:56.000,SPS,57.702910,N,11.971636,E,37.305 m,7.077 km/h,329.513885,9(11),      9.04 m,
+379,T,2008/01/27,14:45:01.000,SPS,57.702970,N,11.971551,E,36.478 m,5.132 km/h,329.513885,9(11),      8.39 m,
+380,T,2008/01/27,14:45:06.000,SPS,57.703017,N,11.971462,E,37.679 m,6.665 km/h,329.513885,9(11),      7.53 m,
+381,T,2008/01/27,14:45:11.000,SPS,57.703071,N,11.971374,E,37.856 m,5.270 km/h,329.513885,9(11),      8.03 m,
+382,T,2008/01/27,14:45:16.000,SPS,57.703134,N,11.971307,E,38.441 m,7.068 km/h,330.639191,9(11),      8.09 m,
+383,T,2008/01/27,14:45:21.000,SPS,57.703188,N,11.971224,E,37.094 m,4.871 km/h,322.645264,9(11),      7.89 m,
+384,T,2008/01/27,14:45:26.000,SPS,57.703244,N,11.971135,E,38.461 m,6.000 km/h,321.540863,9(11),      8.28 m,
+385,T,2008/01/27,14:45:31.000,SPS,57.703298,N,11.971047,E,37.066 m,4.873 km/h,321.540863,9(11),      8.15 m,
+386,T,2008/01/27,14:45:36.000,SPS,57.703351,N,11.970981,E,37.422 m,6.283 km/h,321.540863,9(11),      7.10 m,
+387,T,2008/01/27,14:45:41.000,SPS,57.703404,N,11.970900,E,36.895 m,5.331 km/h,320.504150,9(11),      7.65 m,
+388,T,2008/01/27,14:45:46.000,SPS,57.703467,N,11.970806,E,36.325 m,5.001 km/h,319.068939,9(11),      9.01 m,
+389,T,2008/01/27,14:45:51.000,SPS,57.703511,N,11.970724,E,36.249 m,6.196 km/h,320.075500,9(11),      6.92 m,
+390,T,2008/01/27,14:45:56.000,SPS,57.703565,N,11.970629,E,34.937 m,4.656 km/h,320.075500,9(11),      8.33 m,
+391,T,2008/01/27,14:46:01.000,SPS,57.703616,N,11.970553,E,34.255 m,5.732 km/h,322.200470,9(11),      7.32 m,
+392,T,2008/01/27,14:46:06.000,SPS,57.703669,N,11.970463,E,34.248 m,5.980 km/h,320.091583,9(11),      7.93 m,
+393,T,2008/01/27,14:46:11.000,SPS,57.703734,N,11.970375,E,34.113 m,5.019 km/h,321.973114,9(11),      9.00 m,
+394,T,2008/01/27,14:46:16.000,SPS,57.703800,N,11.970325,E,34.821 m,5.381 km/h,321.973114,9(11),      7.91 m,
+395,T,2008/01/27,14:46:21.000,SPS,57.703856,N,11.970309,E,34.474 m,4.345 km/h,321.973114,9(11),      6.30 m,
+396,T,2008/01/27,14:46:26.000,SPS,57.703895,N,11.970388,E,34.815 m,5.410 km/h,321.973114,9(11),      6.47 m,
+397,T,2008/01/27,14:46:31.000,SPS,57.703939,N,11.970481,E,36.532 m,5.661 km/h,321.973114,8(11),      7.60 m,
+398,T,2008/01/27,14:46:36.000,SPS,57.703984,N,11.970577,E,35.942 m,5.200 km/h,321.973114,8(11),      7.63 m,
+399,T,2008/01/27,14:46:41.000,SPS,57.704017,N,11.970695,E,36.971 m,6.216 km/h,321.973114,8(11),      8.01 m,
+400,T,2008/01/27,14:46:46.000,SPS,57.704067,N,11.970783,E,36.621 m,4.963 km/h,321.973114,8(11),      7.62 m,
+401,T,2008/01/27,14:46:51.000,SPS,57.704115,N,11.970869,E,36.711 m,4.327 km/h,321.973114,8(11),      7.41 m,
+402,T,2008/01/27,14:46:56.000,SPS,57.704112,N,11.970976,E,38.266 m,5.899 km/h,321.973114,9(11),      6.60 m,
+403,T,2008/01/27,14:47:01.000,SPS,57.704100,N,11.971029,E,39.389 m,3.061 km/h,321.973114,8(11),      3.62 m,
+404,T,2008/01/27,14:47:06.000,SPS,57.704082,N,11.971095,E,41.071 m,4.254 km/h,321.973114,8(11),      4.68 m,
+405,T,2008/01/27,14:47:11.000,SPS,57.704055,N,11.971267,E,44.572 m,5.729 km/h,321.973114,8(11),     11.27 m,
+406,T,2008/01/27,14:47:16.000,SPS,57.704055,N,11.971487,E,45.150 m,6.854 km/h,103.814293,8(11),     13.13 m,
+407,T,2008/01/27,14:47:21.000,SPS,57.704049,N,11.971652,E,46.482 m,5.082 km/h,103.548470,8(11),      9.96 m,
+408,T,2008/01/27,14:47:26.000,SPS,57.704046,N,11.971775,E,47.728 m,4.991 km/h,103.548470,8(10),      7.41 m,
+409,T,2008/01/27,14:47:31.000,SPS,57.704030,N,11.971917,E,50.447 m,4.795 km/h,110.262627,8(10),      9.12 m,
+410,T,2008/01/27,14:47:36.000,SPS,57.704067,N,11.972014,E,50.488 m,6.293 km/h,110.262627,8(10),      7.09 m,
+411,T,2008/01/27,14:47:41.000,SPS,57.704103,N,11.972134,E,51.565 m,4.881 km/h,110.262627,8(10),      8.26 m,
+412,T,2008/01/27,14:47:46.000,SPS,57.704207,N,11.972209,E,45.682 m,4.360 km/h,110.262627,8(10),     13.78 m,
+413,T,2008/01/27,14:47:51.000,SPS,57.704288,N,11.972271,E,41.205 m,5.089 km/h,110.262627,8(10),     10.74 m,
+414,T,2008/01/27,14:47:56.000,SPS,57.704330,N,11.972347,E,41.815 m,4.597 km/h,110.262627,8(11),      6.56 m,
+415,T,2008/01/27,14:48:01.000,SPS,57.704373,N,11.972406,E,42.905 m,5.756 km/h,110.262627,8(10),      5.98 m,
+416,T,2008/01/27,14:48:06.000,SPS,57.704441,N,11.972453,E,42.048 m,6.233 km/h,110.262627,8(10),      8.18 m,
+417,T,2008/01/27,14:48:11.000,SPS,57.704514,N,11.972459,E,40.197 m,4.767 km/h,110.262627,7(10),      8.29 m,
+418,T,2008/01/27,14:48:16.000,SPS,57.704577,N,11.972472,E,37.296 m,4.874 km/h,110.262627,7(11),      7.71 m,
+419,T,2008/01/27,14:48:21.000,SPS,57.704643,N,11.972509,E,34.942 m,4.365 km/h,110.262627,7(10),      8.02 m,
+420,T,2008/01/27,14:48:26.000,SPS,57.704711,N,11.972519,E,31.462 m,5.425 km/h,110.262627,7(10),      8.32 m,
+421,T,2008/01/27,14:48:31.000,SPS,57.704789,N,11.972508,E,29.879 m,6.224 km/h,110.262627,8(10),      8.84 m,
+422,T,2008/01/27,14:48:36.000,SPS,57.704843,N,11.972505,E,28.687 m,3.555 km/h,110.262627,7(10),      6.15 m,
+423,T,2008/01/27,14:48:41.000,SPS,57.704922,N,11.972433,E,28.146 m,4.555 km/h,110.262627,8(10),      9.83 m,
+424,T,2008/01/27,14:48:46.000,SPS,57.705012,N,11.972304,E,30.671 m,6.612 km/h,110.262627,8(10),     12.83 m,
+425,T,2008/01/27,14:48:51.000,SPS,57.705060,N,11.972348,E,32.308 m,4.719 km/h,110.262627,7(10),      6.27 m,
+426,T,2008/01/27,14:48:56.000,SPS,57.705128,N,11.972349,E,32.629 m,5.842 km/h,110.262627,8(10),      7.55 m,
+427,T,2008/01/27,14:49:01.000,SPS,57.705203,N,11.972322,E,33.369 m,6.157 km/h,110.262627,8(10),      8.52 m,
+428,T,2008/01/27,14:49:06.000,SPS,57.705254,N,11.972357,E,34.297 m,3.953 km/h,110.262627,8(10),      6.10 m,
+429,T,2008/01/27,14:49:11.000,SPS,57.705307,N,11.972390,E,35.706 m,4.478 km/h,110.262627,8(10),      6.44 m,
+430,T,2008/01/27,14:49:16.000,SPS,57.705365,N,11.972434,E,37.491 m,4.326 km/h,110.262627,8(11),      7.15 m,
+431,T,2008/01/27,14:49:21.000,SPS,57.705435,N,11.972468,E,37.541 m,5.638 km/h,110.262627,7(10),      8.02 m,
+432,T,2008/01/27,14:49:26.000,SPS,57.705496,N,11.972519,E,38.153 m,4.778 km/h,110.262627,7(10),      7.47 m,
+433,T,2008/01/27,14:49:31.000,SPS,57.705556,N,11.972560,E,38.474 m,4.344 km/h,110.262627,8(10),      7.13 m,
+434,T,2008/01/27,14:49:36.000,SPS,57.705625,N,11.972578,E,38.569 m,5.770 km/h,110.262627,8(10),      7.79 m,
+435,T,2008/01/27,14:49:41.000,SPS,57.705683,N,11.972639,E,38.217 m,5.384 km/h,110.262627,8(10),      7.37 m,
+436,T,2008/01/27,14:49:46.000,SPS,57.705730,N,11.972712,E,38.042 m,4.277 km/h,110.262627,7(10),      6.82 m,
+437,T,2008/01/27,14:49:51.000,SPS,57.705797,N,11.972769,E,37.052 m,4.925 km/h,110.262627,7(10),      8.27 m,
+438,T,2008/01/27,14:49:56.000,SPS,57.705858,N,11.972806,E,36.223 m,6.551 km/h,110.262627,8(10),      7.21 m,
+439,T,2008/01/27,14:50:01.000,SPS,57.705898,N,11.972898,E,35.863 m,3.660 km/h,110.262627,10(10),      7.09 m,
+440,T,2008/01/27,14:50:06.000,SPS,57.705933,N,11.972997,E,37.348 m,4.766 km/h,110.262627,8(10),      7.19 m,
+441,T,2008/01/27,14:50:11.000,SPS,57.705968,N,11.973097,E,39.429 m,5.517 km/h,110.262627,8(10),      7.46 m,
+442,T,2008/01/27,14:50:16.000,SPS,57.706018,N,11.973184,E,38.590 m,4.015 km/h,110.262627,8(11),      7.64 m,
+443,T,2008/01/27,14:50:21.000,SPS,57.706065,N,11.973269,E,38.579 m,4.948 km/h,110.262627,8(10),      7.21 m,
+444,T,2008/01/27,14:50:26.000,SPS,57.706064,N,11.973371,E,41.595 m,4.483 km/h,110.262627,8(10),      6.80 m,
+445,T,2008/01/27,14:50:31.000,SPS,57.706097,N,11.973470,E,43.935 m,6.416 km/h,110.262627,8(10),      7.30 m,
+446,T,2008/01/27,14:50:36.000,SPS,57.706130,N,11.973579,E,46.569 m,5.292 km/h,110.262627,7(10),      7.90 m,
+447,T,2008/01/27,14:50:41.000,SPS,57.706154,N,11.973707,E,47.494 m,4.928 km/h,110.262627,7(10),      8.18 m,
+448,T,2008/01/27,14:50:46.000,SPS,57.706197,N,11.973811,E,48.136 m,5.145 km/h,110.262627,8(10),      7.88 m,
+449,T,2008/01/27,14:50:51.000,SPS,57.706239,N,11.973920,E,48.331 m,5.018 km/h,110.262627,7(10),      7.98 m,
+450,T,2008/01/27,14:50:56.000,SPS,57.706289,N,11.974031,E,47.542 m,4.549 km/h,110.262627,8(11),      8.67 m,
+451,T,2008/01/27,14:51:01.000,SPS,57.706375,N,11.974093,E,44.780 m,5.397 km/h,110.262627,8(10),     10.64 m,
+452,T,2008/01/27,14:51:06.000,SPS,57.706427,N,11.974187,E,43.078 m,5.529 km/h,110.262627,7(10),      8.22 m,
+453,T,2008/01/27,14:51:11.000,SPS,57.706508,N,11.974208,E,39.633 m,4.697 km/h,110.262627,7(10),      9.77 m,
+454,T,2008/01/27,14:51:16.000,SPS,57.706592,N,11.974215,E,36.936 m,5.887 km/h,110.262627,7(10),      9.82 m,
+455,T,2008/01/27,14:51:21.000,SPS,57.706672,N,11.974199,E,34.277 m,4.810 km/h,110.262627,7(10),      9.34 m,
+456,T,2008/01/27,14:51:26.000,SPS,57.706728,N,11.974145,E,31.133 m,4.537 km/h,110.262627,8(10),      7.66 m,
+457,T,2008/01/27,14:51:31.000,SPS,57.706804,N,11.974123,E,31.994 m,5.289 km/h,110.262627,8(11),      8.58 m,
+458,T,2008/01/27,14:51:36.000,SPS,57.706868,N,11.974119,E,31.122 m,7.407 km/h,350.169159,7(10),      7.24 m,
+459,T,2008/01/27,14:51:41.000,SPS,57.706938,N,11.974093,E,31.006 m,6.632 km/h,351.339142,7(10),      7.94 m,
+460,T,2008/01/27,14:51:46.000,SPS,57.707009,N,11.974071,E,31.925 m,4.432 km/h,348.956848,7(10),      8.03 m,
+461,T,2008/01/27,14:51:51.000,SPS,57.707066,N,11.974043,E,32.376 m,3.681 km/h,348.956848,7(10),      6.55 m,
+462,T,2008/01/27,14:51:56.000,SPS,57.707099,N,11.974033,E,32.349 m,5.761 km/h,348.956848,7(10),      3.78 m,
+463,T,2008/01/27,14:52:01.000,SPS,57.707190,N,11.974034,E,31.483 m,6.212 km/h,348.956848,7(10),     10.13 m,
+464,T,2008/01/27,14:52:06.000,SPS,57.707236,N,11.974080,E,34.507 m,3.521 km/h,348.956848,8(11),      6.54 m,
+465,T,2008/01/27,14:52:11.000,SPS,57.707303,N,11.974126,E,36.687 m,5.733 km/h,348.956848,8(10),      8.31 m,
+466,T,2008/01/27,14:52:16.000,SPS,57.707354,N,11.974068,E,35.163 m,5.569 km/h,348.956848,8(10),      6.81 m,
+467,T,2008/01/27,14:52:21.000,SPS,57.707403,N,11.974006,E,36.492 m,4.982 km/h,348.956848,8(10),      6.69 m,
+468,T,2008/01/27,14:52:26.000,SPS,57.707466,N,11.973938,E,36.348 m,6.117 km/h,348.956848,8(10),      8.08 m,
+469,T,2008/01/27,14:52:31.000,SPS,57.707508,N,11.973871,E,35.798 m,3.205 km/h,348.956848,8(10),      6.21 m,
+470,T,2008/01/27,14:52:36.000,SPS,57.707566,N,11.973811,E,35.214 m,5.114 km/h,348.930817,8(10),      7.37 m,
+471,T,2008/01/27,14:52:41.000,SPS,57.707633,N,11.973760,E,35.049 m,5.096 km/h,348.930817,8(10),      8.12 m,
+472,T,2008/01/27,14:52:46.000,SPS,57.707654,N,11.973644,E,34.685 m,5.321 km/h,348.930817,8(10),      7.29 m,
+473,T,2008/01/27,14:52:51.000,SPS,57.707663,N,11.973519,E,33.835 m,5.624 km/h,348.930817,8(10),      7.57 m,
+474,T,2008/01/27,14:52:56.000,SPS,57.707672,N,11.973407,E,33.943 m,4.579 km/h,348.930817,8(10),      6.78 m,
+475,T,2008/01/27,14:53:01.000,SPS,57.707657,N,11.973287,E,33.896 m,4.034 km/h,348.930817,8(10),      7.33 m,
+476,T,2008/01/27,14:53:06.000,SPS,57.707661,N,11.973211,E,32.793 m,0.167 km/h,348.930817,8(11),      4.70 m,
+477,T,2008/01/27,14:53:11.000,SPS,57.707662,N,11.973210,E,32.801 m,0.839 km/h,348.930817,8(10),      0.03 m,
+478,T,2008/01/27,14:53:16.000,SPS,57.707658,N,11.973270,E,32.809 m,3.912 km/h,348.930817,7(10),      3.56 m,
+479,T,2008/01/27,14:53:21.000,SPS,57.707666,N,11.973349,E,35.294 m,3.142 km/h,348.930817,7(10),      5.44 m,
+480,T,2008/01/27,14:53:26.000,SPS,57.707670,N,11.973404,E,36.033 m,0.290 km/h,348.930817,8(10),      3.34 m,
+481,T,2008/01/27,14:53:31.000,SPS,57.707672,N,11.973404,E,36.243 m,0.751 km/h,348.930817,8(10),      0.31 m,
+482,T,2008/01/27,14:53:36.000,SPS,57.707680,N,11.973401,E,36.258 m,0.575 km/h,348.930817,8(10),      0.85 m,
+483,T,2008/01/27,14:53:41.000,SPS,57.707684,N,11.973396,E,36.276 m,0.942 km/h,348.930817,8(10),      0.55 m,
+484,T,2008/01/27,14:53:46.000,SPS,57.707695,N,11.973377,E,36.169 m,1.862 km/h,348.930817,7(10),      1.64 m,
+485,T,2008/01/27,14:53:51.000,SPS,57.707701,N,11.973373,E,36.054 m,0.019 km/h,348.930817,8(10),      0.76 m,
+486,T,2008/01/27,14:53:56.000,SPS,57.707701,N,11.973373,E,36.035 m,2.235 km/h,348.930817,8(10),      0.02 m,
+487,T,2008/01/27,14:54:01.000,SPS,57.707701,N,11.973360,E,36.036 m,4.208 km/h,348.930817,8(10),      0.73 m,
+488,T,2008/01/27,14:54:06.000,SPS,57.707707,N,11.973363,E,36.143 m,0.233 km/h,348.930817,8(10),      0.73 m,
+489,T,2008/01/27,14:54:11.000,SPS,57.707716,N,11.973354,E,36.185 m,2.048 km/h,348.930817,7(10),      1.10 m,
+490,T,2008/01/27,14:54:16.000,SPS,57.707700,N,11.973299,E,35.454 m,2.305 km/h,348.930817,7(10),      3.80 m,
+491,T,2008/01/27,14:54:21.000,SPS,57.707700,N,11.973267,E,34.876 m,1.690 km/h,348.930817,6(10),      2.03 m,
+492,T,2008/01/27,14:54:26.000,SPS,57.707697,N,11.973274,E,34.765 m,0.173 km/h,348.930817,8(10),      0.59 m,
+493,T,2008/01/27,14:54:31.000,SPS,57.707696,N,11.973274,E,34.832 m,0.088 km/h,348.930817,8(10),      0.08 m,
+494,T,2008/01/27,14:54:36.000,SPS,57.707695,N,11.973275,E,34.959 m,0.099 km/h,348.930817,8(10),      0.21 m,
+495,T,2008/01/27,14:54:41.000,SPS,57.707695,N,11.973275,E,35.037 m,0.003 km/h,348.930817,7(10),      0.09 m,
+496,T,2008/01/27,14:54:46.000,SPS,57.707695,N,11.973275,E,35.045 m,0.011 km/h,348.930817,8(10),      0.02 m,
+497,T,2008/01/27,14:54:51.000,SPS,57.707695,N,11.973276,E,35.079 m,0.004 km/h,348.930817,8(10),      0.04 m,
+498,T,2008/01/27,14:54:56.000,SPS,57.707695,N,11.973277,E,35.115 m,0.006 km/h,348.930817,8(10),      0.07 m,
+499,T,2008/01/27,14:55:01.000,SPS,57.707695,N,11.973278,E,35.142 m,0.005 km/h,348.930817,7(10),      0.06 m,
+500,T,2008/01/27,14:55:06.000,SPS,57.707695,N,11.973278,E,35.152 m,0.010 km/h,348.930817,8(10),      0.02 m,
+501,T,2008/01/27,14:55:11.000,SPS,57.707695,N,11.973278,E,35.177 m,0.122 km/h,348.930817,7(10),      0.03 m,
+502,T,2008/01/27,14:55:16.000,SPS,57.707696,N,11.973279,E,35.209 m,0.019 km/h,348.930817,7(11),      0.09 m,
+503,T,2008/01/27,14:55:21.000,SPS,57.707693,N,11.973293,E,35.344 m,1.119 km/h,348.930817,6(10),      0.93 m,
+504,T,2008/01/27,14:55:26.000,SPS,57.707691,N,11.973298,E,35.398 m,0.006 km/h,348.930817,9(10),      0.34 m,
+505,T,2008/01/27,14:55:31.000,SPS,57.707691,N,11.973298,E,35.406 m,0.002 km/h,348.930817,8(11),      0.01 m,
+506,T,2008/01/27,14:55:36.000,SPS,57.707691,N,11.973299,E,35.387 m,0.024 km/h,348.930817,8(10),      0.07 m,
+507,T,2008/01/27,14:55:41.000,SPS,57.707691,N,11.973300,E,35.374 m,0.007 km/h,348.930817,8(10),      0.06 m,
+508,T,2008/01/27,14:55:46.000,SPS,57.707691,N,11.973300,E,35.371 m,0.007 km/h,348.930817,8(10),      0.02 m,
+509,T,2008/01/27,14:55:51.000,SPS,57.707690,N,11.973301,E,35.345 m,0.011 km/h,348.930817,9(10),      0.15 m,
+510,T,2008/01/27,14:55:56.000,SPS,57.707688,N,11.973304,E,35.337 m,0.329 km/h,348.930817,8(10),      0.23 m,
+511,T,2008/01/27,14:56:01.000,SPS,57.707684,N,11.973310,E,35.324 m,0.509 km/h,348.930817,7(10),      0.60 m,
+512,T,2008/01/27,14:56:06.000,SPS,57.707675,N,11.973319,E,35.344 m,0.811 km/h,348.930817,8(10),      1.09 m,
+513,T,2008/01/27,14:56:11.000,SPS,57.707666,N,11.973328,E,35.372 m,0.788 km/h,348.930817,8(11),      1.15 m,
+514,T,2008/01/27,14:56:16.000,SPS,57.707659,N,11.973335,E,35.406 m,0.852 km/h,348.930817,8(10),      0.87 m,
+515,T,2008/01/27,14:56:21.000,SPS,57.707650,N,11.973344,E,35.414 m,0.386 km/h,348.930817,7(10),      1.11 m,
+516,T,2008/01/27,14:56:26.000,SPS,57.707644,N,11.973349,E,35.431 m,3.547 km/h,348.930817,8(10),      0.79 m,
+517,T,2008/01/27,14:56:31.000,SPS,57.707609,N,11.973116,E,36.105 m,14.878 km/h,266.844727,8(10),     14.44 m,
+518,T,2008/01/27,14:56:36.000,SPS,57.707578,N,11.972758,E,37.404 m,16.099 km/h,259.185059,8(10),     21.66 m,
+519,T,2008/01/27,14:56:41.000,SPS,57.707540,N,11.972427,E,39.308 m,15.975 km/h,252.127563,7(11),     20.29 m,
+520,T,2008/01/27,14:56:46.000,SPS,57.707556,N,11.972102,E,39.680 m,13.810 km/h,251.846802,7(10),     19.43 m,
+521,T,2008/01/27,14:56:51.000,SPS,57.707435,N,11.971864,E,38.027 m,14.611 km/h,209.976074,8(10),     19.63 m,
+522,T,2008/01/27,14:56:56.000,SPS,57.707240,N,11.971689,E,39.717 m,16.520 km/h,204.307907,8(11),     24.20 m,
+523,T,2008/01/27,14:57:01.000,SPS,57.707070,N,11.971440,E,42.344 m,19.996 km/h,244.933319,9(10),     24.19 m,
+524,T,2008/01/27,14:57:06.000,SPS,57.706994,N,11.970922,E,47.921 m,19.498 km/h,259.753479,8(10),     32.52 m,
+525,T,2008/01/27,14:57:11.000,SPS,57.706961,N,11.970468,E,53.100 m,17.442 km/h,252.850159,8(10),     27.82 m,
+526,T,2008/01/27,14:57:16.000,SPS,57.706822,N,11.970166,E,59.028 m,17.971 km/h,252.758423,8(10),     24.51 m,
+527,T,2008/01/27,14:57:21.000,SPS,57.706789,N,11.969804,E,64.524 m,11.284 km/h,242.889435,9(10),     22.58 m,
+528,T,2008/01/27,14:57:26.000,SPS,57.706770,N,11.969482,E,70.054 m,9.351 km/h,256.679993,9(10),     20.05 m,
+529,T,2008/01/27,14:57:31.000,SPS,57.706723,N,11.969258,E,73.381 m,3.424 km/h,252.173355,9(10),     14.76 m,
+530,T,2008/01/27,14:57:36.000,SPS,57.706723,N,11.969213,E,74.317 m,0.331 km/h,252.173355,8(10),      2.80 m,
+531,T,2008/01/27,14:57:41.000,SPS,57.706723,N,11.969205,E,74.995 m,0.622 km/h,252.173355,9(10),      0.83 m,
+532,T,2008/01/27,14:57:46.000,SPS,57.706724,N,11.969197,E,75.341 m,0.463 km/h,252.173355,9(11),      0.62 m,
+533,T,2008/01/27,14:57:51.000,SPS,57.706725,N,11.969196,E,75.514 m,0.175 km/h,252.173355,8(10),      0.24 m,
+534,T,2008/01/27,14:57:56.000,SPS,57.706726,N,11.969194,E,75.591 m,0.211 km/h,252.173355,8(10),      0.18 m,
+535,T,2008/01/27,14:58:01.000,SPS,57.706726,N,11.969189,E,75.640 m,0.549 km/h,252.173355,9(10),      0.32 m,
+536,T,2008/01/27,14:58:06.000,SPS,57.706727,N,11.969191,E,75.699 m,0.860 km/h,252.173355,9(10),      0.17 m,
+537,T,2008/01/27,14:58:11.000,SPS,57.706729,N,11.969203,E,75.753 m,0.391 km/h,252.173355,8(10),      0.77 m,
+538,T,2008/01/27,14:58:16.000,SPS,57.706729,N,11.969201,E,75.710 m,1.665 km/h,252.173355,9(10),      0.14 m,
+539,T,2008/01/27,14:58:21.000,SPS,57.706703,N,11.969113,E,76.153 m,6.843 km/h,254.655457,8(10),      6.02 m,
+540,T,2008/01/27,14:58:26.000,SPS,57.706634,N,11.969038,E,76.254 m,4.150 km/h,254.655457,9(10),      8.91 m,
+541,T,2008/01/27,14:58:31.000,SPS,57.706621,N,11.968910,E,76.716 m,2.349 km/h,254.655457,9(10),      7.79 m,
+542,T,2008/01/27,14:58:36.000,SPS,57.706612,N,11.968854,E,75.835 m,0.496 km/h,254.655457,8(11),      3.61 m,
+543,T,2008/01/27,14:58:41.000,SPS,57.706611,N,11.968846,E,76.116 m,0.393 km/h,254.655457,8(10),      0.56 m,
+544,T,2008/01/27,14:58:46.000,SPS,57.706609,N,11.968839,E,76.290 m,1.470 km/h,254.655457,9(10),      0.47 m,
+545,T,2008/01/27,14:58:51.000,SPS,57.706582,N,11.968766,E,75.970 m,6.616 km/h,254.655457,9(10),      5.27 m,
+546,T,2008/01/27,14:58:56.000,SPS,57.706521,N,11.968529,E,77.610 m,10.487 km/h,235.926590,9(10),     15.78 m,
+547,T,2008/01/27,14:59:01.000,SPS,57.706388,N,11.968258,E,71.656 m,14.912 km/h,270.661957,8(10),     22.76 m,
+548,T,2008/01/27,14:59:06.000,SPS,57.706369,N,11.967760,E,71.099 m,21.889 km/h,250.093170,8(10),     29.76 m,
+549,T,2008/01/27,14:59:11.000,SPS,57.706290,N,11.967199,E,70.997 m,23.623 km/h,252.321228,9(10),     34.57 m,
+550,T,2008/01/27,14:59:16.000,SPS,57.706286,N,11.966613,E,69.959 m,24.498 km/h,257.005981,8(10),     34.98 m,
+551,T,2008/01/27,14:59:21.000,SPS,57.706224,N,11.966022,E,68.321 m,24.791 km/h,257.831085,8(10),     35.94 m,
+552,T,2008/01/27,14:59:26.000,SPS,57.706154,N,11.965410,E,66.697 m,26.431 km/h,254.512512,7(10),     37.35 m,
+553,T,2008/01/27,14:59:31.000,SPS,57.706046,N,11.964803,E,66.793 m,26.691 km/h,254.280838,8(10),     38.14 m,
+554,T,2008/01/27,14:59:36.000,SPS,57.705964,N,11.964192,E,64.471 m,24.476 km/h,252.652267,8(10),     37.61 m,
+555,T,2008/01/27,14:59:41.000,SPS,57.705943,N,11.963618,E,75.615 m,18.723 km/h,250.405945,8(10),     36.07 m,
+556,T,2008/01/27,14:59:46.000,SPS,57.705915,N,11.963257,E,87.301 m,15.208 km/h,243.778580,8(10),     24.69 m,
+557,T,2008/01/27,14:59:51.000,SPS,57.705843,N,11.962970,E,89.645 m,15.962 km/h,220.766418,8(10),     19.05 m,
+558,T,2008/01/27,14:59:56.000,SPS,57.705678,N,11.962896,E,89.482 m,10.259 km/h,160.027557,8(10),     18.94 m,
+559,T,2008/01/27,15:00:01.000,SPS,57.705521,N,11.963069,E,92.977 m,11.064 km/h,157.697861,8(10),     20.57 m,
+560,T,2008/01/27,15:00:06.000,SPS,57.705355,N,11.963202,E,92.839 m,10.321 km/h,156.207596,8(10),     20.13 m,
+561,T,2008/01/27,15:00:11.000,SPS,57.705197,N,11.963282,E,93.679 m,5.478 km/h,153.436081,8(10),     18.29 m,
+562,T,2008/01/27,15:00:16.000,SPS,57.705104,N,11.963321,E,93.570 m,3.800 km/h,152.649536,8(10),     10.51 m,
+563,T,2008/01/27,15:00:21.000,SPS,57.705001,N,11.963386,E,94.495 m,4.835 km/h,152.642792,8(10),     12.18 m,
+564,T,2008/01/27,15:00:26.000,SPS,57.704889,N,11.963494,E,94.902 m,7.083 km/h,152.777771,7(10),     14.09 m,
+565,T,2008/01/27,15:00:31.000,SPS,57.704679,N,11.963667,E,91.328 m,9.725 km/h,165.346649,8(10),     25.82 m,
+566,T,2008/01/27,15:00:36.000,SPS,57.704587,N,11.963857,E,88.451 m,3.263 km/h,161.263718,9(10),     15.49 m,
+567,T,2008/01/27,15:00:41.000,SPS,57.704618,N,11.963851,E,91.142 m,1.026 km/h,161.263718,8(10),      4.35 m,
+568,T,2008/01/27,15:00:46.000,SPS,57.704624,N,11.963855,E,92.173 m,0.533 km/h,161.263718,8(10),      1.24 m,
+569,T,2008/01/27,15:00:51.000,SPS,57.704618,N,11.963851,E,92.461 m,0.204 km/h,161.263718,8(10),      0.78 m,
+570,T,2008/01/27,15:00:56.000,SPS,57.704619,N,11.963853,E,92.557 m,0.080 km/h,161.263718,8(10),      0.20 m,
+571,T,2008/01/27,15:01:01.000,SPS,57.704615,N,11.963851,E,92.568 m,0.660 km/h,161.263718,8(10),      0.46 m,
+572,T,2008/01/27,15:01:06.000,SPS,57.704505,N,11.963850,E,92.271 m,18.015 km/h,164.544937,8(10),     12.24 m,
+573,T,2008/01/27,15:01:11.000,SPS,57.704211,N,11.963895,E,94.230 m,20.213 km/h,171.067032,8(9),     32.95 m,
+574,T,2008/01/27,15:01:16.000,SPS,57.703962,N,11.964081,E,94.349 m,18.572 km/h,156.786514,8(9),     29.89 m,
+575,T,2008/01/27,15:01:21.000,SPS,57.703689,N,11.964229,E,95.783 m,18.810 km/h,164.016251,8(9),     31.63 m,
+576,T,2008/01/27,15:01:26.000,SPS,57.703505,N,11.964306,E,96.110 m,5.936 km/h,153.969543,8(9),     21.05 m,
+577,T,2008/01/27,15:01:31.000,SPS,57.703375,N,11.964368,E,98.264 m,7.716 km/h,171.187561,8(9),     15.09 m,
+578,T,2008/01/27,15:01:36.000,SPS,57.703183,N,11.964365,E,101.903 m,11.962 km/h,199.763306,8(9),     21.66 m,
+579,T,2008/01/27,15:01:41.000,SPS,57.703022,N,11.964247,E,100.908 m,9.796 km/h,249.578110,8(9),     19.26 m,
+580,T,2008/01/27,15:01:46.000,SPS,57.702874,N,11.963993,E,98.441 m,6.107 km/h,224.093170,8(9),     22.49 m,
+581,T,2008/01/27,15:01:51.000,SPS,57.702809,N,11.963962,E,99.396 m,1.728 km/h,224.093170,8(9),      7.54 m,
+582,T,2008/01/27,15:01:56.000,SPS,57.702789,N,11.963976,E,101.544 m,1.196 km/h,224.093170,8(9),      3.20 m,
+583,T,2008/01/27,15:02:01.000,SPS,57.702774,N,11.963986,E,103.098 m,1.895 km/h,224.093170,8(9),      2.37 m,
+584,T,2008/01/27,15:02:06.000,SPS,57.702750,N,11.964037,E,104.490 m,2.379 km/h,224.093170,8(9),      4.32 m,
+585,T,2008/01/27,15:02:11.000,SPS,57.702526,N,11.963994,E,104.127 m,6.106 km/h,224.093170,8(9),     25.07 m,
+586,T,2008/01/27,15:02:16.000,SPS,57.702073,N,11.964102,E,96.356 m,17.463 km/h,235.937607,8(9),     51.40 m,
+587,T,2008/01/27,15:02:21.000,SPS,57.701924,N,11.963716,E,97.140 m,17.053 km/h,224.755081,8(9),     28.44 m,
+588,T,2008/01/27,15:02:26.000,SPS,57.701700,N,11.963590,E,104.117 m,22.174 km/h,173.331863,8(9),     26.96 m,
+589,T,2008/01/27,15:02:31.000,SPS,57.701395,N,11.963712,E,106.811 m,22.215 km/h,164.963943,8(9),     34.85 m,
+590,T,2008/01/27,15:02:36.000,SPS,57.701177,N,11.963957,E,106.015 m,29.594 km/h,155.442062,8(9),     28.29 m,
+591,T,2008/01/27,15:02:41.000,SPS,57.700984,N,11.964153,E,97.538 m,31.130 km/h,163.367905,7(9),     25.94 m,
+592,T,2008/01/27,15:02:46.000,SPS,57.700625,N,11.964369,E,82.295 m,23.681 km/h,163.726883,7(9),     44.66 m,
+593,T,2008/01/27,15:02:51.000,SPS,57.700461,N,11.964561,E,78.952 m,11.403 km/h,149.311813,8(9),     21.80 m,
+594,T,2008/01/27,15:02:56.000,SPS,57.700303,N,11.964644,E,77.491 m,10.581 km/h,163.787460,8(9),     18.34 m,
+595,T,2008/01/27,15:03:01.000,SPS,57.700128,N,11.964669,E,76.259 m,15.689 km/h,187.778702,8(9),     19.61 m,
+596,T,2008/01/27,15:03:06.000,SPS,57.699922,N,11.964396,E,73.744 m,15.722 km/h,232.966171,9(9),     28.23 m,
+597,T,2008/01/27,15:03:11.000,SPS,57.699828,N,11.964055,E,74.385 m,15.052 km/h,252.393066,8(9),     22.91 m,
+598,T,2008/01/27,15:03:16.000,SPS,57.699731,N,11.963685,E,74.801 m,14.217 km/h,252.462280,8(9),     24.56 m,
+599,T,2008/01/27,15:03:21.000,SPS,57.699674,N,11.963393,E,75.367 m,9.761 km/h,269.982666,8(9),     18.54 m,
+600,T,2008/01/27,15:03:26.000,SPS,57.699590,N,11.963112,E,72.100 m,7.401 km/h,293.740234,8(9),     19.46 m,
+601,T,2008/01/27,15:03:31.000,SPS,57.699510,N,11.962975,E,66.800 m,2.609 km/h,296.089447,8(9),     13.21 m,
+602,T,2008/01/27,15:03:36.000,SPS,57.699515,N,11.962946,E,64.158 m,0.495 km/h,296.089447,8(9),      3.18 m,
+603,T,2008/01/27,15:03:41.000,SPS,57.699518,N,11.962946,E,64.079 m,1.075 km/h,296.089447,8(9),      0.41 m,
+604,T,2008/01/27,15:03:46.000,SPS,57.699552,N,11.962808,E,63.929 m,6.936 km/h,284.483185,8(9),      9.00 m,
+605,T,2008/01/27,15:03:51.000,SPS,57.699558,N,11.962625,E,65.154 m,4.395 km/h,285.790466,8(9),     11.05 m,
+606,T,2008/01/27,15:03:56.000,SPS,57.699567,N,11.962460,E,64.654 m,1.630 km/h,285.790466,8(9),      9.87 m,
+607,T,2008/01/27,15:04:01.000,SPS,57.699556,N,11.962442,E,64.875 m,0.401 km/h,285.790466,8(9),      1.59 m,
+608,T,2008/01/27,15:04:06.000,SPS,57.699559,N,11.962441,E,64.961 m,0.891 km/h,285.790466,8(9),      0.26 m,
+609,T,2008/01/27,15:04:11.000,SPS,57.699568,N,11.962444,E,65.154 m,0.329 km/h,285.790466,8(9),      1.04 m,
+610,T,2008/01/27,15:04:16.000,SPS,57.699571,N,11.962444,E,65.226 m,0.369 km/h,285.790466,8(9),      0.37 m,
+611,T,2008/01/27,15:04:21.000,SPS,57.699574,N,11.962362,E,65.065 m,7.180 km/h,285.790466,8(9),      4.93 m,
+612,T,2008/01/27,15:04:26.000,SPS,57.699596,N,11.962082,E,63.407 m,8.877 km/h,277.764008,8(9),     16.95 m,
+613,T,2008/01/27,15:04:31.000,SPS,57.699492,N,11.961958,E,55.832 m,0.327 km/h,277.764008,8(9),     15.73 m,
+614,T,2008/01/27,15:04:36.000,SPS,57.699486,N,11.961933,E,53.711 m,0.198 km/h,277.764008,8(9),      2.68 m,
+615,T,2008/01/27,15:04:41.000,SPS,57.699490,N,11.961934,E,52.843 m,0.499 km/h,277.764008,8(9),      0.98 m,
+616,T,2008/01/27,15:04:46.000,SPS,57.699494,N,11.961936,E,52.361 m,0.197 km/h,277.764008,9(9),      0.70 m,
+617,T,2008/01/27,15:04:51.000,SPS,57.699494,N,11.961935,E,52.087 m,0.315 km/h,277.764008,9(9),      0.28 m,
+618,T,2008/01/27,15:04:56.000,SPS,57.699494,N,11.961935,E,51.984 m,0.101 km/h,277.764008,8(9),      0.11 m,
+619,T,2008/01/27,15:05:01.000,SPS,57.699493,N,11.961934,E,51.904 m,0.295 km/h,277.764008,8(9),      0.13 m,
+620,T,2008/01/27,15:05:06.000,SPS,57.699496,N,11.961935,E,51.772 m,0.396 km/h,277.764008,9(9),      0.35 m,
+621,T,2008/01/27,15:05:11.000,SPS,57.699502,N,11.961938,E,51.690 m,0.351 km/h,277.764008,9(9),      0.61 m,
+622,T,2008/01/27,15:05:16.000,SPS,57.699501,N,11.961938,E,51.794 m,0.253 km/h,277.764008,9(9),      0.12 m,
+623,T,2008/01/27,15:05:21.000,SPS,57.699517,N,11.961828,E,51.983 m,11.547 km/h,276.801270,8(9),      6.75 m,
+624,T,2008/01/27,15:05:26.000,SPS,57.699560,N,11.961280,E,51.772 m,28.712 km/h,275.905151,8(9),     33.05 m,
+625,T,2008/01/27,15:05:31.000,SPS,57.699546,N,11.960483,E,50.280 m,35.068 km/h,271.913940,8(9),     47.59 m,
+626,T,2008/01/27,15:05:36.000,SPS,57.699593,N,11.959534,E,48.527 m,40.307 km/h,277.201416,6(9),     56.86 m,
+627,T,2008/01/27,15:05:41.000,SPS,57.699642,N,11.958592,E,45.675 m,36.722 km/h,273.109436,8(9),     56.48 m,
+628,T,2008/01/27,15:05:46.000,SPS,57.699673,N,11.957906,E,43.749 m,25.046 km/h,275.711426,5(9),     41.07 m,
+629,T,2008/01/27,15:05:51.000,SPS,57.699676,N,11.957452,E,41.486 m,20.078 km/h,275.435974,8(9),     27.16 m,
+630,T,2008/01/27,15:05:56.000,SPS,57.699712,N,11.956897,E,42.652 m,26.526 km/h,273.934418,8(9),     33.34 m,
+631,T,2008/01/27,15:06:01.000,SPS,57.699719,N,11.956252,E,42.952 m,28.209 km/h,277.044312,8(9),     38.49 m,
+632,T,2008/01/27,15:06:06.000,SPS,57.699766,N,11.955614,E,41.938 m,23.372 km/h,284.357452,8(9),     38.43 m,
+633,T,2008/01/27,15:06:11.000,SPS,57.699812,N,11.955109,E,42.700 m,18.483 km/h,279.845184,7(9),     30.55 m,
+634,T,2008/01/27,15:06:16.000,SPS,57.699837,N,11.954683,E,42.643 m,18.200 km/h,279.834869,8(9),     25.55 m,
+635,T,2008/01/27,15:06:21.000,SPS,57.699884,N,11.954261,E,39.983 m,17.301 km/h,283.039490,8(9),     25.82 m,
+636,T,2008/01/27,15:06:26.000,SPS,57.699908,N,11.953873,E,39.923 m,15.994 km/h,281.840302,6(9),     23.31 m,
+637,T,2008/01/27,15:06:31.000,SPS,57.699890,N,11.953574,E,42.504 m,14.412 km/h,254.771011,8(9),     18.11 m,
+638,T,2008/01/27,15:06:36.000,SPS,57.699854,N,11.953451,E,54.257 m,5.352 km/h,217.023911,8(9),     14.42 m,
+639,T,2008/01/27,15:06:41.000,SPS,57.699876,N,11.953420,E,60.191 m,1.519 km/h,217.023911,9(9),      6.67 m,
+640,T,2008/01/27,15:06:46.000,SPS,57.699912,N,11.953465,E,60.932 m,2.586 km/h,217.023911,8(9),      4.89 m,
+641,T,2008/01/27,15:06:51.000,SPS,57.699927,N,11.953493,E,57.799 m,5.943 km/h,217.023911,8(9),      3.93 m,
+642,T,2008/01/27,15:06:56.000,SPS,57.699944,N,11.953428,E,56.949 m,2.345 km/h,217.023911,7(9),      4.36 m,
+643,T,2008/01/27,15:07:01.000,SPS,57.699939,N,11.953309,E,54.779 m,3.929 km/h,217.023911,8(9),      7.43 m,
+644,T,2008/01/27,15:07:06.000,SPS,57.699934,N,11.953216,E,53.242 m,1.618 km/h,218.496490,7(9),      5.82 m,
+645,T,2008/01/27,15:07:11.000,SPS,57.699944,N,11.953198,E,53.076 m,1.298 km/h,218.496490,8(9),      1.51 m,
+646,T,2008/01/27,15:07:16.000,SPS,57.699935,N,11.953148,E,52.867 m,1.903 km/h,218.496490,8(9),      3.11 m,
+647,T,2008/01/27,15:07:21.000,SPS,57.699927,N,11.953081,E,52.973 m,3.948 km/h,218.496490,8(9),      4.12 m,
+648,T,2008/01/27,15:07:26.000,SPS,57.699943,N,11.952983,E,53.538 m,2.253 km/h,218.496490,8(9),      6.17 m,
+649,T,2008/01/27,15:07:31.000,SPS,57.699942,N,11.952932,E,54.323 m,1.178 km/h,218.496490,7(9),      3.09 m,
+650,T,2008/01/27,15:07:36.000,SPS,57.699937,N,11.952929,E,54.677 m,0.068 km/h,218.496490,8(9),      0.70 m,
+651,T,2008/01/27,15:07:41.000,SPS,57.699936,N,11.952901,E,54.827 m,1.821 km/h,218.496490,8(9),      1.71 m,
+652,T,2008/01/27,15:07:46.000,SPS,57.699919,N,11.952914,E,55.053 m,1.557 km/h,218.496490,7(9),      2.14 m,
+653,T,2008/01/27,15:07:51.000,SPS,57.699920,N,11.952919,E,55.107 m,0.211 km/h,218.496490,7(9),      0.32 m,
+654,T,2008/01/27,15:07:56.000,SPS,57.699920,N,11.952924,E,55.117 m,0.024 km/h,218.496490,7(9),      0.26 m,
+655,T,2008/01/27,15:08:01.000,SPS,57.699920,N,11.952923,E,55.116 m,0.008 km/h,218.496490,7(9),      0.06 m,
+656,T,2008/01/27,15:08:06.000,SPS,57.699921,N,11.952922,E,55.117 m,0.007 km/h,218.496490,7(9),      0.09 m,
+657,T,2008/01/27,15:08:11.000,SPS,57.699921,N,11.952921,E,55.136 m,0.003 km/h,218.496490,7(9),      0.06 m,
+658,T,2008/01/27,15:08:16.000,SPS,57.699921,N,11.952920,E,55.148 m,0.027 km/h,218.496490,7(9),      0.05 m,
+659,T,2008/01/27,15:08:21.000,SPS,57.699921,N,11.952921,E,55.163 m,0.026 km/h,218.496490,7(9),      0.04 m,
+660,T,2008/01/27,15:08:26.000,SPS,57.699922,N,11.952923,E,55.205 m,0.168 km/h,218.496490,8(9),      0.16 m,
+661,T,2008/01/27,15:08:31.000,SPS,57.699922,N,11.952924,E,55.188 m,0.007 km/h,218.496490,8(9),      0.11 m,
+662,T,2008/01/27,15:08:36.000,SPS,57.699923,N,11.952925,E,55.159 m,0.001 km/h,218.496490,7(9),      0.06 m,
+663,T,2008/01/27,15:08:41.000,SPS,57.699923,N,11.952925,E,55.142 m,0.034 km/h,218.496490,6(9),      0.05 m,
+664,T,2008/01/27,15:08:46.000,SPS,57.699923,N,11.952925,E,55.137 m,0.006 km/h,218.496490,8(9),      0.03 m,
+665,T,2008/01/27,15:08:51.000,SPS,57.699924,N,11.952925,E,55.102 m,0.027 km/h,218.496490,7(9),      0.05 m,
+666,T,2008/01/27,15:08:56.000,SPS,57.699928,N,11.952920,E,55.135 m,0.970 km/h,218.496490,8(9),      0.59 m,
+667,T,2008/01/27,15:09:01.000,SPS,57.699939,N,11.952909,E,55.178 m,0.947 km/h,218.496490,7(9),      1.41 m,
+668,T,2008/01/27,15:09:06.000,SPS,57.699945,N,11.952898,E,55.160 m,0.011 km/h,218.496490,8(9),      0.87 m,
+669,T,2008/01/27,15:09:11.000,SPS,57.699945,N,11.952898,E,55.153 m,0.146 km/h,218.496490,8(9),      0.01 m,
+670,T,2008/01/27,15:09:16.000,SPS,57.699945,N,11.952900,E,55.264 m,0.018 km/h,218.496490,7(9),      0.18 m,
+671,T,2008/01/27,15:09:21.000,SPS,57.699945,N,11.952901,E,55.370 m,0.129 km/h,218.496490,7(9),      0.12 m,
+672,T,2008/01/27,15:09:26.000,SPS,57.699945,N,11.952903,E,55.427 m,0.017 km/h,218.496490,7(9),      0.12 m,
+673,T,2008/01/27,15:09:31.000,SPS,57.699946,N,11.952905,E,55.403 m,0.003 km/h,218.496490,7(9),      0.10 m,
+674,T,2008/01/27,15:09:36.000,SPS,57.699948,N,11.952907,E,55.452 m,0.007 km/h,218.496490,6(9),      0.27 m,
+675,T,2008/01/27,15:09:41.000,SPS,57.699949,N,11.952909,E,55.466 m,0.007 km/h,218.496490,7(9),      0.18 m,
+676,T,2008/01/27,15:09:46.000,SPS,57.699949,N,11.952910,E,55.429 m,0.007 km/h,218.496490,7(9),      0.09 m,
+677,T,2008/01/27,15:09:51.000,SPS,57.699949,N,11.952912,E,55.372 m,0.016 km/h,218.496490,8(9),      0.09 m,
+678,T,2008/01/27,15:09:56.000,SPS,57.699950,N,11.952912,E,55.368 m,0.005 km/h,218.496490,7(9),      0.08 m,
+679,T,2008/01/27,15:10:01.000,SPS,57.699950,N,11.952912,E,55.365 m,0.005 km/h,218.496490,7(9),      0.07 m,
+680,T,2008/01/27,15:10:06.000,SPS,57.699951,N,11.952913,E,55.387 m,0.007 km/h,218.496490,7(9),      0.08 m,
+681,T,2008/01/27,15:10:11.000,SPS,57.699951,N,11.952914,E,55.425 m,0.012 km/h,218.496490,7(9),      0.10 m,
+682,T,2008/01/27,15:10:16.000,SPS,57.699952,N,11.952914,E,55.468 m,0.006 km/h,218.496490,7(9),      0.06 m,
+683,T,2008/01/27,15:10:21.000,SPS,57.699952,N,11.952914,E,55.534 m,0.162 km/h,218.496490,8(9),      0.09 m,
+684,T,2008/01/27,15:10:26.000,SPS,57.699953,N,11.952915,E,55.540 m,0.005 km/h,218.496490,7(9),      0.14 m,
+685,T,2008/01/27,15:10:31.000,SPS,57.699954,N,11.952916,E,55.562 m,0.863 km/h,218.496490,7(9),      0.05 m,
+686,T,2008/01/27,15:10:36.000,SPS,57.699957,N,11.952943,E,55.626 m,0.709 km/h,218.496490,7(9),      1.70 m,
+687,T,2008/01/27,15:10:41.000,SPS,57.699957,N,11.952962,E,55.745 m,0.199 km/h,218.496490,8(9),      1.14 m,
+688,T,2008/01/27,15:10:46.000,SPS,57.699957,N,11.952961,E,55.884 m,0.183 km/h,218.496490,8(9),      0.16 m,
+689,T,2008/01/27,15:10:51.000,SPS,57.699956,N,11.952958,E,55.964 m,0.374 km/h,218.496490,6(9),      0.23 m,
+690,T,2008/01/27,15:10:56.000,SPS,57.699962,N,11.952964,E,56.061 m,0.428 km/h,218.496490,6(9),      0.82 m,
+691,T,2008/01/27,15:11:01.000,SPS,57.699963,N,11.952964,E,56.130 m,0.208 km/h,218.496490,6(9),      0.08 m,
+692,T,2008/01/27,15:11:06.000,SPS,57.699962,N,11.952965,E,56.174 m,0.213 km/h,218.496490,6(9),      0.10 m,
+693,T,2008/01/27,15:11:11.000,SPS,57.699963,N,11.952969,E,56.225 m,0.726 km/h,218.496490,8(9),      0.22 m,
+694,T,2008/01/27,15:11:16.000,SPS,57.699962,N,11.952960,E,56.230 m,1.432 km/h,218.496490,7(9),      0.51 m,
+695,T,2008/01/27,15:11:21.000,SPS,57.699956,N,11.952937,E,56.250 m,0.165 km/h,218.496490,7(9),      1.55 m,
+696,T,2008/01/27,15:11:26.000,SPS,57.699957,N,11.952938,E,56.406 m,0.355 km/h,218.496490,7(9),      0.21 m,
+697,T,2008/01/27,15:11:31.000,SPS,57.699957,N,11.952928,E,56.498 m,6.012 km/h,218.496490,7(9),      0.64 m,
+698,T,2008/01/27,15:11:36.000,SPS,57.699972,N,11.952892,E,56.564 m,0.709 km/h,218.496490,7(9),      2.75 m,
+699,T,2008/01/27,15:11:41.000,SPS,57.699970,N,11.952871,E,56.544 m,0.313 km/h,218.496490,8(9),      1.24 m,
+700,T,2008/01/27,15:11:46.000,SPS,57.699971,N,11.952879,E,56.581 m,0.854 km/h,218.496490,8(9),      0.46 m,
+701,T,2008/01/27,15:11:51.000,SPS,57.699974,N,11.952893,E,56.631 m,1.002 km/h,218.496490,8(9),      0.92 m,
+702,T,2008/01/27,15:11:56.000,SPS,57.699977,N,11.952909,E,56.685 m,0.607 km/h,218.496490,8(9),      0.98 m,
+703,T,2008/01/27,15:12:01.000,SPS,57.699976,N,11.952913,E,56.786 m,0.683 km/h,218.496490,7(9),      0.27 m,
+704,T,2008/01/27,15:12:06.000,SPS,57.699973,N,11.952896,E,56.875 m,0.741 km/h,218.496490,7(9),      1.03 m,
+705,T,2008/01/27,15:12:11.000,SPS,57.699971,N,11.952880,E,56.934 m,0.528 km/h,218.496490,7(9),      1.01 m,
+706,T,2008/01/27,15:12:16.000,SPS,57.699969,N,11.952865,E,56.986 m,0.736 km/h,218.496490,7(9),      0.92 m,
+707,T,2008/01/27,15:12:21.000,SPS,57.699968,N,11.952845,E,57.043 m,0.743 km/h,218.496490,7(9),      1.23 m,
+708,T,2008/01/27,15:12:26.000,SPS,57.699969,N,11.952848,E,57.112 m,1.026 km/h,218.496490,8(9),      0.24 m,
+709,T,2008/01/27,15:12:31.000,SPS,57.699974,N,11.952879,E,57.176 m,3.465 km/h,218.496490,8(9),      1.95 m,
+710,T,2008/01/27,15:12:36.000,SPS,57.699849,N,11.953253,E,56.506 m,19.849 km/h,86.427399,8(9),     26.26 m,
+711,T,2008/01/27,15:12:41.000,SPS,57.699865,N,11.953857,E,56.469 m,21.918 km/h,96.587524,8(9),     36.07 m,
+712,T,2008/01/27,15:12:46.000,SPS,57.699947,N,11.954557,E,58.682 m,28.527 km/h,99.175896,7(9),     42.77 m,
+713,T,2008/01/27,15:12:51.000,SPS,57.699934,N,11.955259,E,59.009 m,24.419 km/h,97.125023,8(9),     41.90 m,
+714,T,2008/01/27,15:12:56.000,SPS,57.699900,N,11.955946,E,58.753 m,28.569 km/h,98.056587,6(9),     41.12 m,
+715,T,2008/01/27,15:13:01.000,SPS,57.699845,N,11.956682,E,61.154 m,22.889 km/h,95.442360,7(9),     44.42 m,
+716,T,2008/01/27,15:13:06.000,SPS,57.699756,N,11.957161,E,58.161 m,13.081 km/h,100.822197,8(9),     30.34 m,
+717,T,2008/01/27,15:13:11.000,SPS,57.699721,N,11.957413,E,56.525 m,6.004 km/h,100.060211,7(9),     15.62 m,
+718,T,2008/01/27,15:13:16.000,SPS,57.699653,N,11.957520,E,51.498 m,3.404 km/h,100.060211,7(9),     11.10 m,
+719,T,2008/01/27,15:13:21.000,SPS,57.699639,N,11.957838,E,49.658 m,20.441 km/h,97.457619,6(9),     19.13 m,
+720,T,2008/01/27,15:13:26.000,SPS,57.699576,N,11.958570,E,47.382 m,31.414 km/h,97.820015,7(9),     44.26 m,
+721,T,2008/01/27,15:13:31.000,SPS,57.699543,N,11.959268,E,45.865 m,27.273 km/h,96.406525,6(9),     41.82 m,
+722,T,2008/01/27,15:13:36.000,SPS,57.699506,N,11.959894,E,44.151 m,22.753 km/h,99.171577,7(9),     37.57 m,
+723,T,2008/01/27,15:13:41.000,SPS,57.699466,N,11.960414,E,43.130 m,20.578 km/h,96.029564,6(9),     31.33 m,
+724,T,2008/01/27,15:13:46.000,SPS,57.699564,N,11.960882,E,42.656 m,18.675 km/h,87.960152,7(9),     29.97 m,
+725,T,2008/01/27,15:13:51.000,SPS,57.699614,N,11.961305,E,47.127 m,16.558 km/h,94.451820,7(9),     26.22 m,
+726,T,2008/01/27,15:13:56.000,SPS,57.699580,N,11.961679,E,45.114 m,5.820 km/h,89.539085,7(9),     22.72 m,
+727,T,2008/01/27,15:14:01.000,SPS,57.699556,N,11.961758,E,43.373 m,0.468 km/h,89.539085,8(9),      5.67 m,
+728,T,2008/01/27,15:14:06.000,SPS,57.699557,N,11.961768,E,42.927 m,0.137 km/h,89.539085,7(9),      0.78 m,
+729,T,2008/01/27,15:14:11.000,SPS,57.699557,N,11.961772,E,42.839 m,0.240 km/h,89.539085,6(9),      0.22 m,
+730,T,2008/01/27,15:14:16.000,SPS,57.699556,N,11.961769,E,42.809 m,0.118 km/h,89.539085,6(9),      0.20 m,
+731,T,2008/01/27,15:14:21.000,SPS,57.699546,N,11.961856,E,42.932 m,5.808 km/h,89.725197,7(10),      5.30 m,
+732,T,2008/01/27,15:14:26.000,SPS,57.699521,N,11.962033,E,42.629 m,6.690 km/h,76.366776,7(10),     10.92 m,
+733,T,2008/01/27,15:14:31.000,SPS,57.699462,N,11.962172,E,43.564 m,3.917 km/h,76.366776,6(9),     10.60 m,
+734,T,2008/01/27,15:14:36.000,SPS,57.699441,N,11.962247,E,43.327 m,1.204 km/h,76.366776,6(10),      5.05 m,
+735,T,2008/01/27,15:14:41.000,SPS,57.699439,N,11.962242,E,43.178 m,0.438 km/h,76.366776,6(10),      0.42 m,
+736,T,2008/01/27,15:14:46.000,SPS,57.699439,N,11.962253,E,43.119 m,0.649 km/h,76.366776,6(10),      0.66 m,
+737,T,2008/01/27,15:14:51.000,SPS,57.699438,N,11.962255,E,42.983 m,0.794 km/h,76.366776,6(10),      0.22 m,
+738,T,2008/01/27,15:14:56.000,SPS,57.699437,N,11.962260,E,42.937 m,0.755 km/h,76.366776,6(10),      0.34 m,
+739,T,2008/01/27,15:15:01.000,SPS,57.699437,N,11.962275,E,42.943 m,1.379 km/h,76.366776,6(10),      0.89 m,
+740,T,2008/01/27,15:15:06.000,SPS,57.699440,N,11.962306,E,42.980 m,1.929 km/h,76.366776,7(10),      1.91 m,
+741,T,2008/01/27,15:15:11.000,SPS,57.699436,N,11.962362,E,43.012 m,4.345 km/h,76.366776,7(10),      3.37 m,
+742,T,2008/01/27,15:15:16.000,SPS,57.699433,N,11.962761,E,43.785 m,8.805 km/h,49.888649,7(10),     23.79 m,
+743,T,2008/01/27,15:15:21.000,SPS,57.699514,N,11.963014,E,43.212 m,5.290 km/h,52.977341,7(10),     17.61 m,
+744,T,2008/01/27,15:15:26.000,SPS,57.699556,N,11.963182,E,42.773 m,3.284 km/h,52.977341,6(10),     11.04 m,
+745,T,2008/01/27,15:15:31.000,SPS,57.699584,N,11.963254,E,42.346 m,3.743 km/h,54.474190,7(9),      5.34 m,
+746,T,2008/01/27,15:15:36.000,SPS,57.699627,N,11.963502,E,41.846 m,9.011 km/h,75.363075,7(10),     15.59 m,
+747,T,2008/01/27,15:15:41.000,SPS,57.699844,N,11.964098,E,41.465 m,14.512 km/h,18.042631,7(10),     42.93 m,
+748,T,2008/01/27,15:15:46.000,SPS,57.700103,N,11.964226,E,39.202 m,18.820 km/h,350.312469,7(10),     29.92 m,
+749,T,2008/01/27,15:15:51.000,SPS,57.700418,N,11.964098,E,34.906 m,25.929 km/h,338.893219,7(9),     36.27 m,
+750,T,2008/01/27,15:15:56.000,SPS,57.700756,N,11.963999,E,29.182 m,26.718 km/h,342.903381,7(10),     38.44 m,
+751,T,2008/01/27,15:16:01.000,SPS,57.701148,N,11.963834,E,26.026 m,31.251 km/h,338.657623,7(10),     44.89 m,
+752,T,2008/01/27,15:16:06.000,SPS,57.701490,N,11.963610,E,24.059 m,23.423 km/h,341.594208,7(10),     40.46 m,
+753,T,2008/01/27,15:16:11.000,SPS,57.701792,N,11.963399,E,24.504 m,18.191 km/h,334.948120,7(9),     35.85 m,
+754,T,2008/01/27,15:16:16.000,SPS,57.702045,N,11.963253,E,21.750 m,17.075 km/h,339.453552,7(10),     29.67 m,
+755,T,2008/01/27,15:16:21.000,SPS,57.702263,N,11.963226,E,21.275 m,13.436 km/h,21.269533,7(10),     24.32 m,
+756,T,2008/01/27,15:16:26.000,SPS,57.702456,N,11.963406,E,24.930 m,9.682 km/h,57.253983,7(10),     24.27 m,
+757,T,2008/01/27,15:16:31.000,SPS,57.702516,N,11.963538,E,23.572 m,2.071 km/h,57.935402,7(10),     10.47 m,
+758,T,2008/01/27,15:16:36.000,SPS,57.702541,N,11.963530,E,21.759 m,0.982 km/h,57.935402,7(10),      3.33 m,
+759,T,2008/01/27,15:16:41.000,SPS,57.702547,N,11.963526,E,20.468 m,0.271 km/h,57.935402,7(10),      1.49 m,
+760,T,2008/01/27,15:16:46.000,SPS,57.702546,N,11.963526,E,20.075 m,0.253 km/h,57.935402,7(10),      0.40 m,
+761,T,2008/01/27,15:16:51.000,SPS,57.702555,N,11.963521,E,19.932 m,2.570 km/h,57.935402,7(9),      1.03 m,
+762,T,2008/01/27,15:16:56.000,SPS,57.702602,N,11.963766,E,20.843 m,11.270 km/h,63.193348,7(10),     15.56 m,
+763,T,2008/01/27,15:17:01.000,SPS,57.702688,N,11.964083,E,21.650 m,12.392 km/h,68.431618,7(10),     21.16 m,
+764,T,2008/01/27,15:17:06.000,SPS,57.702856,N,11.964402,E,25.562 m,12.100 km/h,32.924171,7(10),     26.94 m,
+765,T,2008/01/27,15:17:11.000,SPS,57.703016,N,11.964420,E,26.969 m,15.517 km/h,344.355225,7(10),     17.92 m,
+766,T,2008/01/27,15:17:16.000,SPS,57.703240,N,11.964281,E,27.406 m,18.274 km/h,341.821838,7(10),     26.25 m,
+767,T,2008/01/27,15:17:21.000,SPS,57.703472,N,11.964122,E,27.536 m,15.869 km/h,339.747223,7(10),     27.59 m,
+768,T,2008/01/27,15:17:26.000,SPS,57.703719,N,11.964036,E,28.155 m,16.465 km/h,341.113464,7(9),     27.92 m,
+769,T,2008/01/27,15:17:31.000,SPS,57.704018,N,11.963951,E,24.247 m,14.687 km/h,339.732819,7(10),     33.91 m,
+770,T,2008/01/27,15:17:36.000,SPS,57.704236,N,11.963845,E,23.304 m,5.752 km/h,339.514862,7(10),     25.17 m,
+771,T,2008/01/27,15:17:41.000,SPS,57.704273,N,11.963828,E,24.946 m,0.564 km/h,339.514862,7(10),      4.54 m,
+772,T,2008/01/27,15:17:46.000,SPS,57.704274,N,11.963826,E,24.590 m,0.512 km/h,339.514862,7(10),      0.38 m,
+773,T,2008/01/27,15:17:51.000,SPS,57.704285,N,11.963818,E,24.536 m,1.297 km/h,339.514862,7(10),      1.37 m,
+774,T,2008/01/27,15:17:56.000,SPS,57.704305,N,11.963806,E,24.427 m,1.302 km/h,339.514862,7(10),      2.25 m,
+775,T,2008/01/27,15:18:01.000,SPS,57.704318,N,11.963799,E,24.243 m,1.554 km/h,339.514862,7(10),      1.62 m,
+776,T,2008/01/27,15:18:06.000,SPS,57.704341,N,11.963786,E,24.084 m,1.999 km/h,339.514862,7(10),      2.58 m,
+777,T,2008/01/27,15:18:11.000,SPS,57.704430,N,11.963723,E,24.228 m,12.317 km/h,346.195099,7(10),     10.71 m,
+778,T,2008/01/27,15:18:16.000,SPS,57.704655,N,11.963559,E,24.551 m,18.428 km/h,332.352997,7(10),     26.81 m,
+779,T,2008/01/27,15:18:21.000,SPS,57.704830,N,11.963399,E,24.790 m,16.992 km/h,339.528839,7(10),     21.68 m,
+780,T,2008/01/27,15:18:26.000,SPS,57.705047,N,11.963266,E,24.882 m,14.147 km/h,337.760681,7(10),     25.51 m,
+781,T,2008/01/27,15:18:31.000,SPS,57.705213,N,11.963117,E,24.886 m,11.453 km/h,326.768158,7(9),     20.53 m,
+782,T,2008/01/27,15:18:36.000,SPS,57.705493,N,11.963112,E,22.894 m,17.446 km/h,36.511124,7(9),     31.22 m,
+783,T,2008/01/27,15:18:41.000,SPS,57.705665,N,11.963496,E,21.995 m,21.406 km/h,62.685516,7(10),     29.85 m,
+784,T,2008/01/27,15:18:46.000,SPS,57.705844,N,11.963943,E,20.402 m,21.921 km/h,61.447033,7(10),     33.28 m,
+785,T,2008/01/27,15:18:51.000,SPS,57.706063,N,11.964529,E,18.012 m,25.727 km/h,70.627136,7(10),     42.72 m,
+786,T,2008/01/27,15:18:56.000,SPS,57.706222,N,11.964977,E,16.479 m,20.545 km/h,72.116966,7(10),     32.10 m,
+787,T,2008/01/27,15:19:01.000,SPS,57.706334,N,11.965581,E,15.728 m,24.058 km/h,72.860649,6(10),     38.11 m,
+788,T,2008/01/27,15:19:06.000,SPS,57.706398,N,11.966139,E,13.502 m,19.170 km/h,74.065750,6(10),     34.06 m,
+789,T,2008/01/27,15:19:11.000,SPS,57.706418,N,11.966595,E,12.321 m,13.260 km/h,81.119461,6(10),     27.28 m,
+790,T,2008/01/27,15:19:16.000,SPS,57.706455,N,11.966899,E,11.192 m,10.546 km/h,75.343231,6(9),     18.64 m,
+791,T,2008/01/27,15:19:21.000,SPS,57.706396,N,11.967249,E,9.392 m,9.148 km/h,69.857574,6(8),     21.92 m,
+792,T,2008/01/27,15:19:26.000,SPS,57.706404,N,11.967522,E,7.393 m,10.857 km/h,95.088768,7(9),     16.43 m,
+793,T,2008/01/27,15:19:31.000,SPS,57.706431,N,11.967937,E,11.171 m,7.636 km/h,48.301205,7(9),     25.24 m,
+794,T,2008/01/27,15:19:36.000,SPS,57.706615,N,11.968097,E,16.153 m,11.160 km/h,345.122620,7(9),     23.13 m,
+795,T,2008/01/27,15:19:41.000,SPS,57.706757,N,11.968033,E,15.430 m,13.394 km/h,349.252014,6(9),     16.29 m,
+796,T,2008/01/27,15:19:46.000,SPS,57.706944,N,11.968147,E,18.443 m,14.874 km/h,49.279705,7(9),     22.11 m,
+797,T,2008/01/27,15:19:51.000,SPS,57.707026,N,11.968484,E,17.724 m,16.191 km/h,70.644554,7(8),     22.09 m,
+798,T,2008/01/27,15:19:56.000,SPS,57.707104,N,11.968838,E,16.861 m,11.892 km/h,64.961960,7(9),     22.86 m,
+799,T,2008/01/27,15:20:01.000,SPS,57.707146,N,11.968940,E,16.343 m,0.603 km/h,57.725773,7(9),      7.67 m,
+800,T,2008/01/27,15:20:06.000,SPS,57.707140,N,11.968924,E,17.903 m,0.299 km/h,57.725773,7(8),      1.94 m,
+801,T,2008/01/27,15:20:11.000,SPS,57.707141,N,11.968931,E,17.819 m,0.581 km/h,57.725773,7(9),      0.43 m,
+802,T,2008/01/27,15:20:16.000,SPS,57.707144,N,11.968944,E,17.828 m,0.471 km/h,57.725773,7(9),      0.85 m,
+803,T,2008/01/27,15:20:21.000,SPS,57.707147,N,11.968951,E,17.853 m,0.246 km/h,57.725773,7(9),      0.48 m,
+804,T,2008/01/27,15:20:26.000,SPS,57.707150,N,11.968959,E,17.842 m,0.660 km/h,57.725773,7(9),      0.62 m,
+805,T,2008/01/27,15:20:31.000,SPS,57.707154,N,11.968966,E,17.869 m,0.703 km/h,57.725773,6(9),      0.64 m,
+806,T,2008/01/27,15:20:36.000,SPS,57.707162,N,11.968979,E,17.898 m,0.899 km/h,57.725773,6(9),      1.12 m,
+807,T,2008/01/27,15:20:41.000,SPS,57.707166,N,11.968988,E,17.911 m,0.987 km/h,57.725773,6(9),      0.73 m,
+808,T,2008/01/27,15:20:46.000,SPS,57.707168,N,11.968992,E,17.954 m,0.717 km/h,57.725773,6(9),      0.37 m,
+809,T,2008/01/27,15:20:51.000,SPS,57.707169,N,11.968990,E,18.036 m,0.222 km/h,57.725773,6(9),      0.18 m,
+810,T,2008/01/27,15:20:56.000,SPS,57.707171,N,11.968995,E,18.050 m,0.836 km/h,57.725773,6(9),      0.36 m,
+811,T,2008/01/27,15:21:01.000,SPS,57.707206,N,11.969191,E,18.316 m,18.892 km/h,68.676346,6(9),     12.29 m,
+812,T,2008/01/27,15:21:06.000,SPS,57.707278,N,11.969675,E,20.202 m,21.727 km/h,77.141609,6(9),     30.02 m,
+813,T,2008/01/27,15:21:11.000,SPS,57.707349,N,11.970167,E,21.015 m,21.947 km/h,79.136803,7(9),     30.37 m,
+814,T,2008/01/27,15:21:16.000,SPS,57.707424,N,11.970710,E,22.754 m,20.998 km/h,73.930702,7(9),     33.54 m,
+815,B,2008/01/27,15:21:20.000,SPS,57.707448,N,11.971055,E,25.731 m,16.147 km/h,76.704651,7(9),     20.96 m,
+816,T,2008/01/27,18:13:26.129,No fix,57.707409,N,11.971354,E,29.133 m,0.000 km/h,0.000000,0(0),     18.63 m,
+817,T,2008/01/27,18:13:31.929,No fix,57.707409,N,11.971354,E,29.133 m,0.000 km/h,0.000000,0(4),      0.00 m,
diff --git a/reference/track/mtk_logger.gpx b/reference/track/mtk_logger.gpx
new file mode 100644 (file)
index 0000000..56fa96e
--- /dev/null
@@ -0,0 +1,7391 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<bounds minlat="57.697088223" minlon="11.952844574" maxlat="57.719580948" maxlon="12.016372082"/>
+<wpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T13:03:24.836Z</time>
+  <name>WP0001</name>
+  <cmt>WP0001</cmt>
+  <desc>WP0001</desc>
+  <fix>none</fix>
+</wpt>
+<wpt lat="57.707192070" lon="11.967000049">
+  <ele>34.319580</ele>
+<time>2008-01-27T14:15:09Z</time>
+  <name>WP0002</name>
+  <cmt>WP0002</cmt>
+  <desc>WP0002</desc>
+  <fix>3d</fix>
+  <sat>8</sat>
+</wpt>
+<wpt lat="57.697093407" lon="11.979470029">
+  <ele>96.420593</ele>
+<time>2008-01-27T14:32:31Z</time>
+  <name>WP0003</name>
+  <cmt>WP0003</cmt>
+  <desc>WP0003</desc>
+  <fix>3d</fix>
+  <sat>8</sat>
+</wpt>
+<wpt lat="57.707448325" lon="11.971055495">
+  <ele>25.730627</ele>
+<time>2008-01-27T15:21:20Z</time>
+  <name>WP0004</name>
+  <cmt>WP0004</cmt>
+  <desc>WP0004</desc>
+  <fix>3d</fix>
+  <sat>7</sat>
+</wpt>
+<trk>
+  <desc>Log every 5 sec, 100 m, 0 km/h</desc>
+<trkseg>
+<trkpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T13:03:22.836Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0001</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T13:03:24.836Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0002</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T14:13:51.012Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0003</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T14:13:56.812Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0004</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T14:14:01.812Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0005</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T14:14:07.532Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0006</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T14:14:12.532Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0007</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T14:14:17.532Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0008</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T14:14:22.532Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0009</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.719580948" lon="12.016372082">
+  <ele>98.469612</ele>
+<time>2008-01-27T14:14:27.532Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0010</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.705088749" lon="11.996373004">
+  <ele>98.408684</ele>
+<time>2008-01-27T14:14:28.531Z</time>
+  <course>0.000000</course>
+  <speed>0.595044</speed>
+  <name>TP0011</name>
+  <fix>none</fix>
+  <sat>2</sat>
+</trkpt>
+<trkpt lat="57.704939213" lon="11.996336270">
+  <ele>98.469284</ele>
+<time>2008-01-27T14:14:34Z</time>
+  <course>0.000000</course>
+  <speed>0.303619</speed>
+  <name>TP0012</name>
+  <fix>none</fix>
+  <sat>2</sat>
+</trkpt>
+<trkpt lat="57.707240157" lon="11.967281203">
+  <ele>22.479507</ele>
+<time>2008-01-27T14:14:35Z</time>
+  <course>0.000000</course>
+  <speed>1.202394</speed>
+  <name>TP0013</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707219764" lon="11.967150788">
+  <ele>32.486053</ele>
+<time>2008-01-27T14:14:40Z</time>
+  <course>0.000000</course>
+  <speed>1.078671</speed>
+  <name>TP0014</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707208911" lon="11.967052609">
+  <ele>34.286411</ele>
+<time>2008-01-27T14:14:45Z</time>
+  <course>0.000000</course>
+  <speed>1.052290</speed>
+  <name>TP0015</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707201360" lon="11.966969623">
+  <ele>33.625595</ele>
+<time>2008-01-27T14:14:50Z</time>
+  <course>0.000000</course>
+  <speed>0.991739</speed>
+  <name>TP0016</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707198262" lon="11.966947690">
+  <ele>34.133461</ele>
+<time>2008-01-27T14:14:55Z</time>
+  <course>0.000000</course>
+  <speed>0.441197</speed>
+  <name>TP0017</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707198896" lon="11.966980387">
+  <ele>34.461449</ele>
+<time>2008-01-27T14:15:00Z</time>
+  <course>0.000000</course>
+  <speed>0.581685</speed>
+  <name>TP0018</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707202317" lon="11.966987938">
+  <ele>34.240189</ele>
+<time>2008-01-27T14:15:05Z</time>
+  <course>0.000000</course>
+  <speed>0.083656</speed>
+  <name>TP0019</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.707192070" lon="11.967000049">
+  <ele>34.319580</ele>
+<time>2008-01-27T14:15:09Z</time>
+  <course>0.000000</course>
+  <speed>0.332716</speed>
+  <name>TP0020</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707179823" lon="11.967054232">
+  <ele>34.183079</ele>
+<time>2008-01-27T14:15:14Z</time>
+  <course>0.000000</course>
+  <speed>0.529361</speed>
+  <name>TP0021</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707140723" lon="11.967152239">
+  <ele>34.388592</ele>
+<time>2008-01-27T14:15:19Z</time>
+  <course>0.000000</course>
+  <speed>1.338508</speed>
+  <name>TP0022</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.707081687" lon="11.967244378">
+  <ele>34.792522</ele>
+<time>2008-01-27T14:15:24Z</time>
+  <course>0.000000</course>
+  <speed>1.624839</speed>
+  <name>TP0023</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.707027601" lon="11.967342311">
+  <ele>35.034256</ele>
+<time>2008-01-27T14:15:29Z</time>
+  <course>0.000000</course>
+  <speed>1.647150</speed>
+  <name>TP0024</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706993080" lon="11.967462347">
+  <ele>35.393795</ele>
+<time>2008-01-27T14:15:34Z</time>
+  <course>0.000000</course>
+  <speed>1.380853</speed>
+  <name>TP0025</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706920227" lon="11.967555755">
+  <ele>34.952080</ele>
+<time>2008-01-27T14:15:39Z</time>
+  <course>145.024078</course>
+  <speed>1.745507</speed>
+  <name>TP0026</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706864560" lon="11.967651461">
+  <ele>36.920841</ele>
+<time>2008-01-27T14:15:44Z</time>
+  <course>142.223740</course>
+  <speed>1.848763</speed>
+  <name>TP0027</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706812031" lon="11.967755893">
+  <ele>36.358654</ele>
+<time>2008-01-27T14:15:49Z</time>
+  <course>144.998688</course>
+  <speed>1.514581</speed>
+  <name>TP0028</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706746343" lon="11.967810275">
+  <ele>35.561657</ele>
+<time>2008-01-27T14:15:54Z</time>
+  <course>144.998688</course>
+  <speed>1.358067</speed>
+  <name>TP0029</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706676855" lon="11.967837324">
+  <ele>35.367092</ele>
+<time>2008-01-27T14:15:59Z</time>
+  <course>144.998688</course>
+  <speed>1.377709</speed>
+  <name>TP0030</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706618042" lon="11.967878110">
+  <ele>35.278236</ele>
+<time>2008-01-27T14:16:04Z</time>
+  <course>144.998688</course>
+  <speed>1.568756</speed>
+  <name>TP0031</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706547458" lon="11.967902545">
+  <ele>34.554344</ele>
+<time>2008-01-27T14:16:09Z</time>
+  <course>144.998688</course>
+  <speed>1.633001</speed>
+  <name>TP0032</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706513431" lon="11.967904576">
+  <ele>35.263260</ele>
+<time>2008-01-27T14:16:14Z</time>
+  <course>144.998688</course>
+  <speed>0.050764</speed>
+  <name>TP0033</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706515415" lon="11.967899731">
+  <ele>35.184391</ele>
+<time>2008-01-27T14:16:19Z</time>
+  <course>144.998688</course>
+  <speed>0.427177</speed>
+  <name>TP0034</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706514736" lon="11.967898481">
+  <ele>35.184006</ele>
+<time>2008-01-27T14:16:24Z</time>
+  <course>144.998688</course>
+  <speed>0.030582</speed>
+  <name>TP0035</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706514435" lon="11.967898229">
+  <ele>35.194073</ele>
+<time>2008-01-27T14:16:29Z</time>
+  <course>144.998688</course>
+  <speed>0.004273</speed>
+  <name>TP0036</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706514179" lon="11.967897821">
+  <ele>35.194149</ele>
+<time>2008-01-27T14:16:34Z</time>
+  <course>144.998688</course>
+  <speed>0.007845</speed>
+  <name>TP0037</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706513479" lon="11.967897582">
+  <ele>35.195225</ele>
+<time>2008-01-27T14:16:39Z</time>
+  <course>144.998688</course>
+  <speed>0.008956</speed>
+  <name>TP0038</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706493026" lon="11.967903904">
+  <ele>35.154613</ele>
+<time>2008-01-27T14:16:44Z</time>
+  <course>144.998688</course>
+  <speed>1.449671</speed>
+  <name>TP0039</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706432005" lon="11.967965905">
+  <ele>36.225224</ele>
+<time>2008-01-27T14:16:49Z</time>
+  <course>148.006943</course>
+  <speed>1.417506</speed>
+  <name>TP0040</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706373418" lon="11.968041215">
+  <ele>35.693150</ele>
+<time>2008-01-27T14:16:54Z</time>
+  <course>145.174026</course>
+  <speed>1.316705</speed>
+  <name>TP0041</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706330044" lon="11.968088815">
+  <ele>36.124382</ele>
+<time>2008-01-27T14:16:59Z</time>
+  <course>145.174026</course>
+  <speed>0.666859</speed>
+  <name>TP0042</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706290973" lon="11.968096204">
+  <ele>34.864819</ele>
+<time>2008-01-27T14:17:04Z</time>
+  <course>145.174026</course>
+  <speed>0.295886</speed>
+  <name>TP0043</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706252210" lon="11.968083270">
+  <ele>34.707458</ele>
+<time>2008-01-27T14:17:09Z</time>
+  <course>145.174026</course>
+  <speed>0.823240</speed>
+  <name>TP0044</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706197128" lon="11.968101655">
+  <ele>35.034626</ele>
+<time>2008-01-27T14:17:14Z</time>
+  <course>145.174026</course>
+  <speed>1.485445</speed>
+  <name>TP0045</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706131745" lon="11.968131812">
+  <ele>35.846035</ele>
+<time>2008-01-27T14:17:19Z</time>
+  <course>145.174026</course>
+  <speed>1.036942</speed>
+  <name>TP0046</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706048357" lon="11.968162518">
+  <ele>36.722980</ele>
+<time>2008-01-27T14:17:24Z</time>
+  <course>193.604065</course>
+  <speed>2.036720</speed>
+  <name>TP0047</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706020735" lon="11.968162755">
+  <ele>36.815575</ele>
+<time>2008-01-27T14:17:29Z</time>
+  <course>193.604065</course>
+  <speed>0.033974</speed>
+  <name>TP0048</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706022825" lon="11.968161295">
+  <ele>36.775021</ele>
+<time>2008-01-27T14:17:34Z</time>
+  <course>193.604065</course>
+  <speed>0.102273</speed>
+  <name>TP0049</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706017476" lon="11.968170326">
+  <ele>36.755974</ele>
+<time>2008-01-27T14:17:39Z</time>
+  <course>193.604065</course>
+  <speed>0.336602</speed>
+  <name>TP0050</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706004844" lon="11.968187652">
+  <ele>36.742401</ele>
+<time>2008-01-27T14:17:44Z</time>
+  <course>193.604065</course>
+  <speed>0.485956</speed>
+  <name>TP0051</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705990081" lon="11.968205939">
+  <ele>36.739773</ele>
+<time>2008-01-27T14:17:49Z</time>
+  <course>193.604065</course>
+  <speed>0.192314</speed>
+  <name>TP0052</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706006725" lon="11.968193613">
+  <ele>36.762974</ele>
+<time>2008-01-27T14:17:54Z</time>
+  <course>193.604065</course>
+  <speed>1.067858</speed>
+  <name>TP0053</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706114584" lon="11.968265592">
+  <ele>36.767914</ele>
+<time>2008-01-27T14:17:59Z</time>
+  <course>351.843750</course>
+  <speed>2.428406</speed>
+  <name>TP0054</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706185747" lon="11.968516327">
+  <ele>37.722569</ele>
+<time>2008-01-27T14:18:04Z</time>
+  <course>2.294798</course>
+  <speed>0.254981</speed>
+  <name>TP0055</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706125307" lon="11.968584464">
+  <ele>38.270573</ele>
+<time>2008-01-27T14:18:09Z</time>
+  <course>2.294798</course>
+  <speed>0.739139</speed>
+  <name>TP0056</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706084100" lon="11.968609224">
+  <ele>39.400570</ele>
+<time>2008-01-27T14:18:14Z</time>
+  <course>2.294798</course>
+  <speed>1.418809</speed>
+  <name>TP0057</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705972397" lon="11.968670286">
+  <ele>42.657951</ele>
+<time>2008-01-27T14:18:19Z</time>
+  <course>2.294798</course>
+  <speed>1.219950</speed>
+  <name>TP0058</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705860388" lon="11.968734035">
+  <ele>44.570877</ele>
+<time>2008-01-27T14:18:24Z</time>
+  <course>143.381439</course>
+  <speed>1.271205</speed>
+  <name>TP0059</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705777256" lon="11.968797278">
+  <ele>46.084393</ele>
+<time>2008-01-27T14:18:29Z</time>
+  <course>143.381439</course>
+  <speed>1.521001</speed>
+  <name>TP0060</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705688083" lon="11.968830142">
+  <ele>47.521702</ele>
+<time>2008-01-27T14:18:34Z</time>
+  <course>143.381439</course>
+  <speed>1.205074</speed>
+  <name>TP0061</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705562387" lon="11.968854241">
+  <ele>46.846340</ele>
+<time>2008-01-27T14:18:39Z</time>
+  <course>140.877411</course>
+  <speed>1.394174</speed>
+  <name>TP0062</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705428991" lon="11.968857420">
+  <ele>42.743946</ele>
+<time>2008-01-27T14:18:44Z</time>
+  <course>140.877411</course>
+  <speed>1.373265</speed>
+  <name>TP0063</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705335307" lon="11.968907520">
+  <ele>41.074448</ele>
+<time>2008-01-27T14:18:49Z</time>
+  <course>140.877411</course>
+  <speed>1.949689</speed>
+  <name>TP0064</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705285456" lon="11.968813814">
+  <ele>53.912285</ele>
+<time>2008-01-27T14:18:54Z</time>
+  <course>142.614777</course>
+  <speed>1.026324</speed>
+  <name>TP0065</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705249968" lon="11.968785850">
+  <ele>57.604111</ele>
+<time>2008-01-27T14:18:59Z</time>
+  <course>142.614777</course>
+  <speed>1.223418</speed>
+  <name>TP0066</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705180542" lon="11.968788409">
+  <ele>59.425282</ele>
+<time>2008-01-27T14:19:04Z</time>
+  <course>144.389893</course>
+  <speed>1.751635</speed>
+  <name>TP0067</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.705107236" lon="11.968812930">
+  <ele>59.241436</ele>
+<time>2008-01-27T14:19:09Z</time>
+  <course>144.389893</course>
+  <speed>1.294486</speed>
+  <name>TP0068</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705026737" lon="11.968818995">
+  <ele>56.955845</ele>
+<time>2008-01-27T14:19:14Z</time>
+  <course>144.389893</course>
+  <speed>1.647364</speed>
+  <name>TP0069</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704950515" lon="11.968824494">
+  <ele>55.168156</ele>
+<time>2008-01-27T14:19:19Z</time>
+  <course>144.389893</course>
+  <speed>1.607520</speed>
+  <name>TP0070</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704891436" lon="11.968841337">
+  <ele>52.903522</ele>
+<time>2008-01-27T14:19:24Z</time>
+  <course>142.798004</course>
+  <speed>1.142946</speed>
+  <name>TP0071</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704841009" lon="11.968863818">
+  <ele>52.243340</ele>
+<time>2008-01-27T14:19:29Z</time>
+  <course>142.798004</course>
+  <speed>1.183903</speed>
+  <name>TP0072</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.704798400" lon="11.968901884">
+  <ele>53.329205</ele>
+<time>2008-01-27T14:19:34Z</time>
+  <course>142.798004</course>
+  <speed>0.747410</speed>
+  <name>TP0073</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.704765119" lon="11.968932591">
+  <ele>51.154198</ele>
+<time>2008-01-27T14:19:39Z</time>
+  <course>142.798004</course>
+  <speed>1.393951</speed>
+  <name>TP0074</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.704710293" lon="11.969005709">
+  <ele>50.982079</ele>
+<time>2008-01-27T14:19:44Z</time>
+  <course>142.061447</course>
+  <speed>0.568036</speed>
+  <name>TP0075</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.704649014" lon="11.969040109">
+  <ele>50.856762</ele>
+<time>2008-01-27T14:19:49Z</time>
+  <course>142.061447</course>
+  <speed>1.264928</speed>
+  <name>TP0076</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704526080" lon="11.969103073">
+  <ele>49.895744</ele>
+<time>2008-01-27T14:19:54Z</time>
+  <course>142.061447</course>
+  <speed>1.597790</speed>
+  <name>TP0077</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704421007" lon="11.969261517">
+  <ele>46.709484</ele>
+<time>2008-01-27T14:19:59Z</time>
+  <course>152.146713</course>
+  <speed>1.557961</speed>
+  <name>TP0078</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704346631" lon="11.969332368">
+  <ele>43.882195</ele>
+<time>2008-01-27T14:20:04Z</time>
+  <course>153.529343</course>
+  <speed>1.451341</speed>
+  <name>TP0079</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704288454" lon="11.969263529">
+  <ele>41.683334</ele>
+<time>2008-01-27T14:20:09Z</time>
+  <course>153.529343</course>
+  <speed>1.783310</speed>
+  <name>TP0080</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704252070" lon="11.969199905">
+  <ele>42.076900</ele>
+<time>2008-01-27T14:20:14Z</time>
+  <course>153.663147</course>
+  <speed>1.164113</speed>
+  <name>TP0081</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.704212533" lon="11.969242656">
+  <ele>40.519577</ele>
+<time>2008-01-27T14:20:19Z</time>
+  <course>153.663147</course>
+  <speed>1.421694</speed>
+  <name>TP0082</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704157032" lon="11.969264292">
+  <ele>40.441086</ele>
+<time>2008-01-27T14:20:24Z</time>
+  <course>150.640991</course>
+  <speed>1.617561</speed>
+  <name>TP0083</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.704115604" lon="11.969268722">
+  <ele>38.741417</ele>
+<time>2008-01-27T14:20:29Z</time>
+  <course>150.640991</course>
+  <speed>1.615349</speed>
+  <name>TP0084</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704060348" lon="11.969300391">
+  <ele>40.093151</ele>
+<time>2008-01-27T14:20:34Z</time>
+  <course>149.428802</course>
+  <speed>1.545561</speed>
+  <name>TP0085</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704002173" lon="11.969344400">
+  <ele>43.699978</ele>
+<time>2008-01-27T14:20:39Z</time>
+  <course>149.875687</course>
+  <speed>1.716336</speed>
+  <name>TP0086</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703946079" lon="11.969419174">
+  <ele>45.618553</ele>
+<time>2008-01-27T14:20:44Z</time>
+  <course>152.252014</course>
+  <speed>1.283200</speed>
+  <name>TP0087</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703872688" lon="11.969493610">
+  <ele>45.382668</ele>
+<time>2008-01-27T14:20:49Z</time>
+  <course>152.252014</course>
+  <speed>1.692029</speed>
+  <name>TP0088</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703824544" lon="11.969619901">
+  <ele>43.774300</ele>
+<time>2008-01-27T14:20:54Z</time>
+  <course>152.252014</course>
+  <speed>1.408383</speed>
+  <name>TP0089</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703768699" lon="11.969732487">
+  <ele>42.711369</ele>
+<time>2008-01-27T14:20:59Z</time>
+  <course>149.309753</course>
+  <speed>1.432592</speed>
+  <name>TP0090</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703739438" lon="11.969839353">
+  <ele>41.587543</ele>
+<time>2008-01-27T14:21:04Z</time>
+  <course>149.309753</course>
+  <speed>1.508936</speed>
+  <name>TP0091</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703712494" lon="11.969976441">
+  <ele>39.019386</ele>
+<time>2008-01-27T14:21:09Z</time>
+  <course>149.309753</course>
+  <speed>1.569397</speed>
+  <name>TP0092</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703657739" lon="11.970096890">
+  <ele>37.535275</ele>
+<time>2008-01-27T14:21:14Z</time>
+  <course>149.309753</course>
+  <speed>1.275553</speed>
+  <name>TP0093</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703608218" lon="11.970196014">
+  <ele>37.183327</ele>
+<time>2008-01-27T14:21:19Z</time>
+  <course>149.309753</course>
+  <speed>1.765915</speed>
+  <name>TP0094</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703552606" lon="11.970281588">
+  <ele>35.909645</ele>
+<time>2008-01-27T14:21:24Z</time>
+  <course>145.645874</course>
+  <speed>1.477868</speed>
+  <name>TP0095</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703497189" lon="11.970365313">
+  <ele>36.647190</ele>
+<time>2008-01-27T14:21:29Z</time>
+  <course>148.902954</course>
+  <speed>1.543354</speed>
+  <name>TP0096</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703447588" lon="11.970437069">
+  <ele>35.835602</ele>
+<time>2008-01-27T14:21:34Z</time>
+  <course>144.122391</course>
+  <speed>1.388543</speed>
+  <name>TP0097</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703386143" lon="11.970509635">
+  <ele>35.017097</ele>
+<time>2008-01-27T14:21:39Z</time>
+  <course>146.880249</course>
+  <speed>1.644109</speed>
+  <name>TP0098</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703320274" lon="11.970583355">
+  <ele>35.753429</ele>
+<time>2008-01-27T14:21:44Z</time>
+  <course>148.921082</course>
+  <speed>1.730035</speed>
+  <name>TP0099</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703251694" lon="11.970651626">
+  <ele>35.330765</ele>
+<time>2008-01-27T14:21:49Z</time>
+  <course>150.968842</course>
+  <speed>1.515581</speed>
+  <name>TP0100</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703203313" lon="11.970722402">
+  <ele>36.076145</ele>
+<time>2008-01-27T14:21:54Z</time>
+  <course>150.968842</course>
+  <speed>1.840335</speed>
+  <name>TP0101</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703141435" lon="11.970776319">
+  <ele>35.706478</ele>
+<time>2008-01-27T14:21:59Z</time>
+  <course>148.422119</course>
+  <speed>1.373394</speed>
+  <name>TP0102</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703072283" lon="11.970803700">
+  <ele>35.922268</ele>
+<time>2008-01-27T14:22:04Z</time>
+  <course>148.422119</course>
+  <speed>1.590267</speed>
+  <name>TP0103</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703019946" lon="11.970877007">
+  <ele>36.544731</ele>
+<time>2008-01-27T14:22:09Z</time>
+  <course>151.107529</course>
+  <speed>1.409475</speed>
+  <name>TP0104</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702965944" lon="11.970963907">
+  <ele>36.327339</ele>
+<time>2008-01-27T14:22:14Z</time>
+  <course>151.107529</course>
+  <speed>1.554864</speed>
+  <name>TP0105</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702905745" lon="11.971040173">
+  <ele>37.919357</ele>
+<time>2008-01-27T14:22:19Z</time>
+  <course>151.477859</course>
+  <speed>1.751008</speed>
+  <name>TP0106</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702841025" lon="11.971125418">
+  <ele>37.317135</ele>
+<time>2008-01-27T14:22:24Z</time>
+  <course>151.477859</course>
+  <speed>1.522876</speed>
+  <name>TP0107</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702773725" lon="11.971214696">
+  <ele>37.531166</ele>
+<time>2008-01-27T14:22:29Z</time>
+  <course>151.477859</course>
+  <speed>1.714622</speed>
+  <name>TP0108</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702716196" lon="11.971302538">
+  <ele>36.046326</ele>
+<time>2008-01-27T14:22:34Z</time>
+  <course>152.840408</course>
+  <speed>1.502839</speed>
+  <name>TP0109</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702654459" lon="11.971376446">
+  <ele>35.769428</ele>
+<time>2008-01-27T14:22:39Z</time>
+  <course>149.361832</course>
+  <speed>1.327224</speed>
+  <name>TP0110</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702598166" lon="11.971459569">
+  <ele>36.368031</ele>
+<time>2008-01-27T14:22:44Z</time>
+  <course>152.900650</course>
+  <speed>1.765702</speed>
+  <name>TP0111</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702544066" lon="11.971540002">
+  <ele>36.278912</ele>
+<time>2008-01-27T14:22:49Z</time>
+  <course>151.154800</course>
+  <speed>1.519747</speed>
+  <name>TP0112</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702491036" lon="11.971608046">
+  <ele>36.259140</ele>
+<time>2008-01-27T14:22:54Z</time>
+  <course>147.538422</course>
+  <speed>1.362496</speed>
+  <name>TP0113</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702441306" lon="11.971677658">
+  <ele>37.068027</ele>
+<time>2008-01-27T14:22:59Z</time>
+  <course>147.538422</course>
+  <speed>1.420440</speed>
+  <name>TP0114</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702396565" lon="11.971744821">
+  <ele>37.290741</ele>
+<time>2008-01-27T14:23:04Z</time>
+  <course>147.538422</course>
+  <speed>1.322631</speed>
+  <name>TP0115</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702389118" lon="11.971776216">
+  <ele>36.767784</ele>
+<time>2008-01-27T14:23:09Z</time>
+  <course>147.538422</course>
+  <speed>0.003731</speed>
+  <name>TP0116</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702389089" lon="11.971776247">
+  <ele>36.756531</ele>
+<time>2008-01-27T14:23:14Z</time>
+  <course>147.538422</course>
+  <speed>0.005525</speed>
+  <name>TP0117</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702387348" lon="11.971778732">
+  <ele>36.756294</ele>
+<time>2008-01-27T14:23:19Z</time>
+  <course>147.538422</course>
+  <speed>0.357651</speed>
+  <name>TP0118</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702382070" lon="11.971772215">
+  <ele>36.850208</ele>
+<time>2008-01-27T14:23:24Z</time>
+  <course>147.538422</course>
+  <speed>0.008619</speed>
+  <name>TP0119</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702359711" lon="11.971812942">
+  <ele>36.804157</ele>
+<time>2008-01-27T14:23:29Z</time>
+  <course>147.397430</course>
+  <speed>1.517090</speed>
+  <name>TP0120</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702310411" lon="11.971900017">
+  <ele>37.637447</ele>
+<time>2008-01-27T14:23:34Z</time>
+  <course>146.144302</course>
+  <speed>1.761965</speed>
+  <name>TP0121</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702262314" lon="11.971989028">
+  <ele>37.108601</ele>
+<time>2008-01-27T14:23:39Z</time>
+  <course>146.144302</course>
+  <speed>1.467335</speed>
+  <name>TP0122</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702204678" lon="11.972076904">
+  <ele>36.777046</ele>
+<time>2008-01-27T14:23:44Z</time>
+  <course>142.318588</course>
+  <speed>1.496280</speed>
+  <name>TP0123</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702166989" lon="11.972155059">
+  <ele>36.541397</ele>
+<time>2008-01-27T14:23:49Z</time>
+  <course>141.388947</course>
+  <speed>1.330305</speed>
+  <name>TP0124</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702114436" lon="11.972224781">
+  <ele>37.536469</ele>
+<time>2008-01-27T14:23:54Z</time>
+  <course>143.495270</course>
+  <speed>1.198822</speed>
+  <name>TP0125</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702075050" lon="11.972305473">
+  <ele>38.682537</ele>
+<time>2008-01-27T14:23:59Z</time>
+  <course>143.495270</course>
+  <speed>1.067729</speed>
+  <name>TP0126</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702030648" lon="11.972358288">
+  <ele>40.179867</ele>
+<time>2008-01-27T14:24:04Z</time>
+  <course>143.495270</course>
+  <speed>1.624703</speed>
+  <name>TP0127</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702004709" lon="11.972404728">
+  <ele>40.463760</ele>
+<time>2008-01-27T14:24:09Z</time>
+  <course>143.495270</course>
+  <speed>0.698972</speed>
+  <name>TP0128</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701940868" lon="11.972474947">
+  <ele>40.150234</ele>
+<time>2008-01-27T14:24:14Z</time>
+  <course>142.500504</course>
+  <speed>1.356076</speed>
+  <name>TP0129</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701902172" lon="11.972564791">
+  <ele>41.289188</ele>
+<time>2008-01-27T14:24:19Z</time>
+  <course>142.500504</course>
+  <speed>1.253808</speed>
+  <name>TP0130</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701853823" lon="11.972631270">
+  <ele>43.596752</ele>
+<time>2008-01-27T14:24:24Z</time>
+  <course>142.500504</course>
+  <speed>1.438421</speed>
+  <name>TP0131</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701805618" lon="11.972703599">
+  <ele>45.536652</ele>
+<time>2008-01-27T14:24:29Z</time>
+  <course>144.574066</course>
+  <speed>1.567921</speed>
+  <name>TP0132</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701764563" lon="11.972797043">
+  <ele>46.517883</ele>
+<time>2008-01-27T14:24:34Z</time>
+  <course>144.574066</course>
+  <speed>1.231057</speed>
+  <name>TP0133</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701718769" lon="11.972896298">
+  <ele>47.777119</ele>
+<time>2008-01-27T14:24:39Z</time>
+  <course>144.574066</course>
+  <speed>1.233039</speed>
+  <name>TP0134</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701651896" lon="11.972960223">
+  <ele>47.737053</ele>
+<time>2008-01-27T14:24:44Z</time>
+  <course>139.446564</course>
+  <speed>1.574051</speed>
+  <name>TP0135</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701601603" lon="11.973009237">
+  <ele>48.639462</ele>
+<time>2008-01-27T14:24:49Z</time>
+  <course>139.909683</course>
+  <speed>1.701256</speed>
+  <name>TP0136</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.701563759" lon="11.973088284">
+  <ele>49.968063</ele>
+<time>2008-01-27T14:24:54Z</time>
+  <course>139.909683</course>
+  <speed>1.306830</speed>
+  <name>TP0137</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701514573" lon="11.973171478">
+  <ele>52.496399</ele>
+<time>2008-01-27T14:24:59Z</time>
+  <course>140.883011</course>
+  <speed>1.270463</speed>
+  <name>TP0138</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701464577" lon="11.973251720">
+  <ele>55.388054</ele>
+<time>2008-01-27T14:25:04Z</time>
+  <course>142.145920</course>
+  <speed>1.708128</speed>
+  <name>TP0139</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701427698" lon="11.973333153">
+  <ele>57.298538</ele>
+<time>2008-01-27T14:25:09Z</time>
+  <course>141.485916</course>
+  <speed>1.370716</speed>
+  <name>TP0140</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701378261" lon="11.973415913">
+  <ele>58.614559</ele>
+<time>2008-01-27T14:25:14Z</time>
+  <course>139.331635</course>
+  <speed>1.306925</speed>
+  <name>TP0141</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701333370" lon="11.973494698">
+  <ele>61.026787</ele>
+<time>2008-01-27T14:25:19Z</time>
+  <course>140.293564</course>
+  <speed>1.095566</speed>
+  <name>TP0142</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701295032" lon="11.973585350">
+  <ele>63.130711</ele>
+<time>2008-01-27T14:25:24Z</time>
+  <course>142.518753</course>
+  <speed>1.669077</speed>
+  <name>TP0143</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701252499" lon="11.973650169">
+  <ele>64.941925</ele>
+<time>2008-01-27T14:25:29Z</time>
+  <course>142.518753</course>
+  <speed>1.363789</speed>
+  <name>TP0144</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701195830" lon="11.973733411">
+  <ele>65.995216</ele>
+<time>2008-01-27T14:25:34Z</time>
+  <course>143.172440</course>
+  <speed>1.436229</speed>
+  <name>TP0145</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701144577" lon="11.973814160">
+  <ele>66.960083</ele>
+<time>2008-01-27T14:25:39Z</time>
+  <course>143.604630</course>
+  <speed>1.676285</speed>
+  <name>TP0146</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701097062" lon="11.973898350">
+  <ele>66.496315</ele>
+<time>2008-01-27T14:25:44Z</time>
+  <course>143.604630</course>
+  <speed>1.599863</speed>
+  <name>TP0147</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701038351" lon="11.973963964">
+  <ele>66.284981</ele>
+<time>2008-01-27T14:25:49Z</time>
+  <course>144.729324</course>
+  <speed>1.224165</speed>
+  <name>TP0148</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700891774" lon="11.974022099">
+  <ele>54.863914</ele>
+<time>2008-01-27T14:25:54Z</time>
+  <course>141.792358</course>
+  <speed>1.480727</speed>
+  <name>TP0149</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700807355" lon="11.974076908">
+  <ele>49.538685</ele>
+<time>2008-01-27T14:25:59Z</time>
+  <course>141.792358</course>
+  <speed>1.367680</speed>
+  <name>TP0150</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700763096" lon="11.974153435">
+  <ele>48.265648</ele>
+<time>2008-01-27T14:26:04Z</time>
+  <course>138.983597</course>
+  <speed>1.635845</speed>
+  <name>TP0151</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700701583" lon="11.974226627">
+  <ele>46.361546</ele>
+<time>2008-01-27T14:26:09Z</time>
+  <course>154.235672</course>
+  <speed>2.004167</speed>
+  <name>TP0152</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700652036" lon="11.974286590">
+  <ele>45.062138</ele>
+<time>2008-01-27T14:26:14Z</time>
+  <course>152.009735</course>
+  <speed>1.570184</speed>
+  <name>TP0153</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.700596248" lon="11.974367304">
+  <ele>45.015408</ele>
+<time>2008-01-27T14:26:19Z</time>
+  <course>152.009735</course>
+  <speed>1.360496</speed>
+  <name>TP0154</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700538963" lon="11.974445216">
+  <ele>46.407997</ele>
+<time>2008-01-27T14:26:24Z</time>
+  <course>146.927551</course>
+  <speed>1.442805</speed>
+  <name>TP0155</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700501306" lon="11.974527630">
+  <ele>48.431839</ele>
+<time>2008-01-27T14:26:29Z</time>
+  <course>144.441391</course>
+  <speed>1.576182</speed>
+  <name>TP0156</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700449376" lon="11.974600517">
+  <ele>50.567123</ele>
+<time>2008-01-27T14:26:34Z</time>
+  <course>148.208267</course>
+  <speed>1.192787</speed>
+  <name>TP0157</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700399095" lon="11.974682395">
+  <ele>51.602558</ele>
+<time>2008-01-27T14:26:39Z</time>
+  <course>148.208267</course>
+  <speed>1.119605</speed>
+  <name>TP0158</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700364538" lon="11.974766954">
+  <ele>53.745941</ele>
+<time>2008-01-27T14:26:44Z</time>
+  <course>148.208267</course>
+  <speed>1.571468</speed>
+  <name>TP0159</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700315878" lon="11.974831610">
+  <ele>56.361366</ele>
+<time>2008-01-27T14:26:49Z</time>
+  <course>148.971863</course>
+  <speed>1.579011</speed>
+  <name>TP0160</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700283045" lon="11.974907986">
+  <ele>58.787598</ele>
+<time>2008-01-27T14:26:54Z</time>
+  <course>146.601395</course>
+  <speed>1.278249</speed>
+  <name>TP0161</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700239882" lon="11.974999706">
+  <ele>60.957695</ele>
+<time>2008-01-27T14:26:59Z</time>
+  <course>148.007050</course>
+  <speed>1.162211</speed>
+  <name>TP0162</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.700172418" lon="11.975046275">
+  <ele>63.889812</ele>
+<time>2008-01-27T14:27:04Z</time>
+  <course>148.007050</course>
+  <speed>1.649157</speed>
+  <name>TP0163</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.700144249" lon="11.975124321">
+  <ele>67.956284</ele>
+<time>2008-01-27T14:27:09Z</time>
+  <course>149.515228</course>
+  <speed>1.289196</speed>
+  <name>TP0164</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700102653" lon="11.975198223">
+  <ele>71.878624</ele>
+<time>2008-01-27T14:27:14Z</time>
+  <course>149.515228</course>
+  <speed>1.561889</speed>
+  <name>TP0165</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.700063491" lon="11.975268429">
+  <ele>74.785545</ele>
+<time>2008-01-27T14:27:19Z</time>
+  <course>149.515228</course>
+  <speed>1.305686</speed>
+  <name>TP0166</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.700009802" lon="11.975334032">
+  <ele>77.086639</ele>
+<time>2008-01-27T14:27:24Z</time>
+  <course>149.515228</course>
+  <speed>1.195862</speed>
+  <name>TP0167</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699976082" lon="11.975420704">
+  <ele>78.694016</ele>
+<time>2008-01-27T14:27:29Z</time>
+  <course>147.837906</course>
+  <speed>1.020726</speed>
+  <name>TP0168</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699933344" lon="11.975551448">
+  <ele>74.406738</ele>
+<time>2008-01-27T14:27:34Z</time>
+  <course>147.837906</course>
+  <speed>0.907884</speed>
+  <name>TP0169</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699860840" lon="11.975623321">
+  <ele>70.901184</ele>
+<time>2008-01-27T14:27:39Z</time>
+  <course>147.837906</course>
+  <speed>1.467844</speed>
+  <name>TP0170</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699765808" lon="11.975626676">
+  <ele>69.342346</ele>
+<time>2008-01-27T14:27:44Z</time>
+  <course>148.045532</course>
+  <speed>1.515221</speed>
+  <name>TP0171</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699713502" lon="11.975700578">
+  <ele>69.502632</ele>
+<time>2008-01-27T14:27:49Z</time>
+  <course>148.045532</course>
+  <speed>1.191063</speed>
+  <name>TP0172</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699677377" lon="11.975772104">
+  <ele>74.142738</ele>
+<time>2008-01-27T14:27:54Z</time>
+  <course>148.045532</course>
+  <speed>1.293753</speed>
+  <name>TP0173</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699630075" lon="11.975831470">
+  <ele>77.762215</ele>
+<time>2008-01-27T14:27:59Z</time>
+  <course>146.587997</course>
+  <speed>1.302800</speed>
+  <name>TP0174</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699587474" lon="11.975906304">
+  <ele>82.254944</ele>
+<time>2008-01-27T14:28:04Z</time>
+  <course>146.587997</course>
+  <speed>1.213632</speed>
+  <name>TP0175</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699522853" lon="11.975944915">
+  <ele>86.902519</ele>
+<time>2008-01-27T14:28:09Z</time>
+  <course>146.587997</course>
+  <speed>1.156784</speed>
+  <name>TP0176</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699489087" lon="11.976030325">
+  <ele>91.039124</ele>
+<time>2008-01-27T14:28:14Z</time>
+  <course>146.587997</course>
+  <speed>0.765005</speed>
+  <name>TP0177</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699445057" lon="11.976073458">
+  <ele>95.986641</ele>
+<time>2008-01-27T14:28:19Z</time>
+  <course>146.587997</course>
+  <speed>1.417850</speed>
+  <name>TP0178</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699388989" lon="11.976111811">
+  <ele>101.368256</ele>
+<time>2008-01-27T14:28:24Z</time>
+  <course>146.587997</course>
+  <speed>1.227613</speed>
+  <name>TP0179</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699328949" lon="11.976171280">
+  <ele>108.444229</ele>
+<time>2008-01-27T14:28:29Z</time>
+  <course>148.233871</course>
+  <speed>1.070183</speed>
+  <name>TP0180</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699293504" lon="11.976243593">
+  <ele>112.981300</ele>
+<time>2008-01-27T14:28:34Z</time>
+  <course>148.233871</course>
+  <speed>0.820349</speed>
+  <name>TP0181</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699263741" lon="11.976337310">
+  <ele>119.031311</ele>
+<time>2008-01-27T14:28:39Z</time>
+  <course>150.412949</course>
+  <speed>0.733967</speed>
+  <name>TP0182</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699210161" lon="11.976447031">
+  <ele>124.015923</ele>
+<time>2008-01-27T14:28:44Z</time>
+  <course>150.412949</course>
+  <speed>0.964730</speed>
+  <name>TP0183</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699173256" lon="11.976572500">
+  <ele>128.919205</ele>
+<time>2008-01-27T14:28:49Z</time>
+  <course>149.867859</course>
+  <speed>1.578155</speed>
+  <name>TP0184</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699138990" lon="11.976670232">
+  <ele>135.981369</ele>
+<time>2008-01-27T14:28:54Z</time>
+  <course>149.867859</course>
+  <speed>0.857911</speed>
+  <name>TP0185</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699092949" lon="11.976752692">
+  <ele>142.060516</ele>
+<time>2008-01-27T14:28:59Z</time>
+  <course>152.427673</course>
+  <speed>1.470509</speed>
+  <name>TP0186</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699046121" lon="11.976872896">
+  <ele>145.621017</ele>
+<time>2008-01-27T14:29:04Z</time>
+  <course>152.427673</course>
+  <speed>1.155793</speed>
+  <name>TP0187</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698988822" lon="11.976972503">
+  <ele>147.339279</ele>
+<time>2008-01-27T14:29:09Z</time>
+  <course>152.427673</course>
+  <speed>1.291424</speed>
+  <name>TP0188</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698959267" lon="11.977001535">
+  <ele>147.914948</ele>
+<time>2008-01-27T14:29:14Z</time>
+  <course>152.427673</course>
+  <speed>0.295060</speed>
+  <name>TP0189</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698951927" lon="11.977010782">
+  <ele>149.005646</ele>
+<time>2008-01-27T14:29:19Z</time>
+  <course>152.427673</course>
+  <speed>0.184193</speed>
+  <name>TP0190</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698944931" lon="11.977020741">
+  <ele>149.274536</ele>
+<time>2008-01-27T14:29:24Z</time>
+  <course>152.427673</course>
+  <speed>0.232211</speed>
+  <name>TP0191</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698937213" lon="11.977025553">
+  <ele>149.182236</ele>
+<time>2008-01-27T14:29:29Z</time>
+  <course>152.427673</course>
+  <speed>0.211573</speed>
+  <name>TP0192</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698931196" lon="11.977031012">
+  <ele>148.905640</ele>
+<time>2008-01-27T14:29:34Z</time>
+  <course>152.427673</course>
+  <speed>0.075801</speed>
+  <name>TP0193</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698924588" lon="11.977038349">
+  <ele>148.809921</ele>
+<time>2008-01-27T14:29:39Z</time>
+  <course>152.427673</course>
+  <speed>1.196584</speed>
+  <name>TP0194</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698785688" lon="11.977052619">
+  <ele>135.016083</ele>
+<time>2008-01-27T14:29:44Z</time>
+  <course>152.427673</course>
+  <speed>0.852625</speed>
+  <name>TP0195</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698688344" lon="11.977180267">
+  <ele>127.506874</ele>
+<time>2008-01-27T14:29:49Z</time>
+  <course>151.834854</course>
+  <speed>0.630221</speed>
+  <name>TP0196</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698672360" lon="11.977272663">
+  <ele>125.575233</ele>
+<time>2008-01-27T14:29:54Z</time>
+  <course>151.834854</course>
+  <speed>1.000494</speed>
+  <name>TP0197</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698642222" lon="11.977301992">
+  <ele>124.096199</ele>
+<time>2008-01-27T14:29:59Z</time>
+  <course>151.834854</course>
+  <speed>0.736805</speed>
+  <name>TP0198</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698615170" lon="11.977346211">
+  <ele>125.293076</ele>
+<time>2008-01-27T14:30:04Z</time>
+  <course>151.834854</course>
+  <speed>1.544690</speed>
+  <name>TP0199</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698578743" lon="11.977430343">
+  <ele>126.160484</ele>
+<time>2008-01-27T14:30:09Z</time>
+  <course>151.834854</course>
+  <speed>1.657514</speed>
+  <name>TP0200</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698530989" lon="11.977505932">
+  <ele>126.888947</ele>
+<time>2008-01-27T14:30:14Z</time>
+  <course>151.834854</course>
+  <speed>1.238977</speed>
+  <name>TP0201</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698480794" lon="11.977542398">
+  <ele>127.783066</ele>
+<time>2008-01-27T14:30:19Z</time>
+  <course>151.834854</course>
+  <speed>1.162266</speed>
+  <name>TP0202</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698439060" lon="11.977616986">
+  <ele>127.161171</ele>
+<time>2008-01-27T14:30:24Z</time>
+  <course>151.834854</course>
+  <speed>0.525801</speed>
+  <name>TP0203</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698406234" lon="11.977693155">
+  <ele>127.212303</ele>
+<time>2008-01-27T14:30:29Z</time>
+  <course>151.709610</course>
+  <speed>0.841543</speed>
+  <name>TP0204</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698368525" lon="11.977842391">
+  <ele>122.669693</ele>
+<time>2008-01-27T14:30:34Z</time>
+  <course>150.292557</course>
+  <speed>1.061839</speed>
+  <name>TP0205</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698331535" lon="11.977958914">
+  <ele>119.508095</ele>
+<time>2008-01-27T14:30:39Z</time>
+  <course>150.292557</course>
+  <speed>1.193486</speed>
+  <name>TP0206</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698290589" lon="11.978064542">
+  <ele>118.256752</ele>
+<time>2008-01-27T14:30:44Z</time>
+  <course>152.138992</course>
+  <speed>0.891211</speed>
+  <name>TP0207</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698250554" lon="11.978478056">
+  <ele>114.822960</ele>
+<time>2008-01-27T14:30:49Z</time>
+  <course>152.138992</course>
+  <speed>1.624389</speed>
+  <name>TP0208</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698180437" lon="11.978643601">
+  <ele>109.670013</ele>
+<time>2008-01-27T14:30:54Z</time>
+  <course>152.138992</course>
+  <speed>1.206295</speed>
+  <name>TP0209</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698128641" lon="11.978756941">
+  <ele>105.505707</ele>
+<time>2008-01-27T14:30:59Z</time>
+  <course>151.187805</course>
+  <speed>1.535839</speed>
+  <name>TP0210</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698061097" lon="11.978835139">
+  <ele>103.665871</ele>
+<time>2008-01-27T14:31:04Z</time>
+  <course>149.160706</course>
+  <speed>1.349027</speed>
+  <name>TP0211</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697994645" lon="11.978816482">
+  <ele>105.252121</ele>
+<time>2008-01-27T14:31:09Z</time>
+  <course>147.681824</course>
+  <speed>1.299929</speed>
+  <name>TP0212</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697932789" lon="11.978761567">
+  <ele>106.092033</ele>
+<time>2008-01-27T14:31:14Z</time>
+  <course>147.681824</course>
+  <speed>1.171165</speed>
+  <name>TP0213</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697841563" lon="11.978775556">
+  <ele>104.699776</ele>
+<time>2008-01-27T14:31:19Z</time>
+  <course>147.681824</course>
+  <speed>1.726084</speed>
+  <name>TP0214</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697783530" lon="11.978807906">
+  <ele>104.697060</ele>
+<time>2008-01-27T14:31:24Z</time>
+  <course>147.681824</course>
+  <speed>1.279907</speed>
+  <name>TP0215</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697712263" lon="11.978872127">
+  <ele>106.037743</ele>
+<time>2008-01-27T14:31:29Z</time>
+  <course>144.817627</course>
+  <speed>1.258147</speed>
+  <name>TP0216</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.697683391" lon="11.978893475">
+  <ele>103.740364</ele>
+<time>2008-01-27T14:31:34Z</time>
+  <course>143.690689</course>
+  <speed>1.579578</speed>
+  <name>TP0217</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697664652" lon="11.978942526">
+  <ele>100.027649</ele>
+<time>2008-01-27T14:31:39Z</time>
+  <course>143.690689</course>
+  <speed>1.073990</speed>
+  <name>TP0218</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697600471" lon="11.979011675">
+  <ele>96.331116</ele>
+<time>2008-01-27T14:31:44Z</time>
+  <course>171.598877</course>
+  <speed>1.557547</speed>
+  <name>TP0219</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697474178" lon="11.978968585">
+  <ele>89.904938</ele>
+<time>2008-01-27T14:31:49Z</time>
+  <course>175.468765</course>
+  <speed>1.955361</speed>
+  <name>TP0220</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.697367381" lon="11.979000294">
+  <ele>84.426712</ele>
+<time>2008-01-27T14:31:54Z</time>
+  <course>175.468765</course>
+  <speed>1.291836</speed>
+  <name>TP0221</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697308048" lon="11.979088374">
+  <ele>83.600838</ele>
+<time>2008-01-27T14:31:59Z</time>
+  <course>175.468765</course>
+  <speed>1.551400</speed>
+  <name>TP0222</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697290761" lon="11.979183666">
+  <ele>86.592972</ele>
+<time>2008-01-27T14:32:04Z</time>
+  <course>175.468765</course>
+  <speed>1.283579</speed>
+  <name>TP0223</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697274335" lon="11.979309774">
+  <ele>89.464699</ele>
+<time>2008-01-27T14:32:09Z</time>
+  <course>175.468765</course>
+  <speed>1.505165</speed>
+  <name>TP0224</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697218815" lon="11.979413353">
+  <ele>87.773705</ele>
+<time>2008-01-27T14:32:14Z</time>
+  <course>175.468765</course>
+  <speed>1.161298</speed>
+  <name>TP0225</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697166241" lon="11.979433877">
+  <ele>95.692902</ele>
+<time>2008-01-27T14:32:19Z</time>
+  <course>175.468765</course>
+  <speed>1.088356</speed>
+  <name>TP0226</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697098067" lon="11.979491174">
+  <ele>92.201309</ele>
+<time>2008-01-27T14:32:24Z</time>
+  <course>175.468765</course>
+  <speed>0.362650</speed>
+  <name>TP0227</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697097600" lon="11.979480647">
+  <ele>95.842636</ele>
+<time>2008-01-27T14:32:29Z</time>
+  <course>175.468765</course>
+  <speed>0.377014</speed>
+  <name>TP0228</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697093407" lon="11.979470029">
+  <ele>96.420593</ele>
+<time>2008-01-27T14:32:31Z</time>
+  <course>175.468765</course>
+  <speed>0.340517</speed>
+  <name>TP0229</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697089203" lon="11.979459378">
+  <ele>97.553391</ele>
+<time>2008-01-27T14:32:36Z</time>
+  <course>175.468765</course>
+  <speed>0.096594</speed>
+  <name>TP0230</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697088223" lon="11.979459323">
+  <ele>97.997795</ele>
+<time>2008-01-27T14:32:41Z</time>
+  <course>175.468765</course>
+  <speed>0.206676</speed>
+  <name>TP0231</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697103888" lon="11.979504147">
+  <ele>96.477997</ele>
+<time>2008-01-27T14:32:46Z</time>
+  <course>175.468765</course>
+  <speed>1.065818</speed>
+  <name>TP0232</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697152015" lon="11.979573879">
+  <ele>89.552612</ele>
+<time>2008-01-27T14:32:51Z</time>
+  <course>175.468765</course>
+  <speed>1.232277</speed>
+  <name>TP0233</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697205060" lon="11.979565464">
+  <ele>83.425354</ele>
+<time>2008-01-27T14:32:56Z</time>
+  <course>175.468765</course>
+  <speed>1.217340</speed>
+  <name>TP0234</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697265526" lon="11.979543292">
+  <ele>79.042557</ele>
+<time>2008-01-27T14:33:01Z</time>
+  <course>175.468765</course>
+  <speed>1.393529</speed>
+  <name>TP0235</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697335449" lon="11.979516625">
+  <ele>75.905380</ele>
+<time>2008-01-27T14:33:06Z</time>
+  <course>175.468765</course>
+  <speed>1.738409</speed>
+  <name>TP0236</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697396194" lon="11.979552749">
+  <ele>72.990585</ele>
+<time>2008-01-27T14:33:11Z</time>
+  <course>175.468765</course>
+  <speed>1.682981</speed>
+  <name>TP0237</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697457105" lon="11.979551956">
+  <ele>69.762535</ele>
+<time>2008-01-27T14:33:16Z</time>
+  <course>175.468765</course>
+  <speed>1.189377</speed>
+  <name>TP0238</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697529700" lon="11.979501025">
+  <ele>64.873619</ele>
+<time>2008-01-27T14:33:21Z</time>
+  <course>175.468765</course>
+  <speed>1.531558</speed>
+  <name>TP0239</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697577206" lon="11.979440395">
+  <ele>61.687244</ele>
+<time>2008-01-27T14:33:26Z</time>
+  <course>175.468765</course>
+  <speed>1.349966</speed>
+  <name>TP0240</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697611483" lon="11.979335495">
+  <ele>60.878510</ele>
+<time>2008-01-27T14:33:31Z</time>
+  <course>175.468765</course>
+  <speed>1.811747</speed>
+  <name>TP0241</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697650924" lon="11.979255036">
+  <ele>60.912205</ele>
+<time>2008-01-27T14:33:36Z</time>
+  <course>175.468765</course>
+  <speed>1.351255</speed>
+  <name>TP0242</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.697683410" lon="11.979185396">
+  <ele>61.898537</ele>
+<time>2008-01-27T14:33:41Z</time>
+  <course>175.468765</course>
+  <speed>1.227153</speed>
+  <name>TP0243</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697710477" lon="11.979115377">
+  <ele>64.165245</ele>
+<time>2008-01-27T14:33:46Z</time>
+  <course>175.468765</course>
+  <speed>1.598597</speed>
+  <name>TP0244</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697734781" lon="11.979055225">
+  <ele>68.273476</ele>
+<time>2008-01-27T14:33:51Z</time>
+  <course>175.468765</course>
+  <speed>0.935148</speed>
+  <name>TP0245</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697783259" lon="11.978979021">
+  <ele>69.860306</ele>
+<time>2008-01-27T14:33:56Z</time>
+  <course>175.468765</course>
+  <speed>1.053721</speed>
+  <name>TP0246</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697851998" lon="11.978977596">
+  <ele>69.197311</ele>
+<time>2008-01-27T14:34:01Z</time>
+  <course>175.468765</course>
+  <speed>0.918024</speed>
+  <name>TP0247</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.697931310" lon="11.978880222">
+  <ele>66.017838</ele>
+<time>2008-01-27T14:34:06Z</time>
+  <course>175.468765</course>
+  <speed>1.308921</speed>
+  <name>TP0248</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698014469" lon="11.978795031">
+  <ele>63.116501</ele>
+<time>2008-01-27T14:34:11Z</time>
+  <course>175.468765</course>
+  <speed>1.576381</speed>
+  <name>TP0249</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698069479" lon="11.978688396">
+  <ele>62.031185</ele>
+<time>2008-01-27T14:34:16Z</time>
+  <course>175.468765</course>
+  <speed>1.214055</speed>
+  <name>TP0250</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698116732" lon="11.978580605">
+  <ele>63.191040</ele>
+<time>2008-01-27T14:34:21Z</time>
+  <course>175.468765</course>
+  <speed>1.318986</speed>
+  <name>TP0251</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698160138" lon="11.978480008">
+  <ele>63.152187</ele>
+<time>2008-01-27T14:34:26Z</time>
+  <course>175.468765</course>
+  <speed>1.330799</speed>
+  <name>TP0252</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698223581" lon="11.978408333">
+  <ele>64.187660</ele>
+<time>2008-01-27T14:34:31Z</time>
+  <course>175.468765</course>
+  <speed>1.029365</speed>
+  <name>TP0253</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698269395" lon="11.978332976">
+  <ele>62.522697</ele>
+<time>2008-01-27T14:34:36Z</time>
+  <course>175.468765</course>
+  <speed>1.288271</speed>
+  <name>TP0254</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698343689" lon="11.978199321">
+  <ele>59.038860</ele>
+<time>2008-01-27T14:34:41Z</time>
+  <course>175.468765</course>
+  <speed>1.265553</speed>
+  <name>TP0255</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698393910" lon="11.978093275">
+  <ele>58.767090</ele>
+<time>2008-01-27T14:34:46Z</time>
+  <course>175.468765</course>
+  <speed>1.409092</speed>
+  <name>TP0256</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698437345" lon="11.978008810">
+  <ele>58.772144</ele>
+<time>2008-01-27T14:34:51Z</time>
+  <course>175.468765</course>
+  <speed>1.408163</speed>
+  <name>TP0257</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698484284" lon="11.977918077">
+  <ele>59.631092</ele>
+<time>2008-01-27T14:34:56Z</time>
+  <course>175.468765</course>
+  <speed>1.528380</speed>
+  <name>TP0258</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698542462" lon="11.977854872">
+  <ele>59.825020</ele>
+<time>2008-01-27T14:35:01Z</time>
+  <course>175.468765</course>
+  <speed>1.146875</speed>
+  <name>TP0259</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698615593" lon="11.977817548">
+  <ele>59.702190</ele>
+<time>2008-01-27T14:35:06Z</time>
+  <course>175.468765</course>
+  <speed>1.329110</speed>
+  <name>TP0260</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698662980" lon="11.977687275">
+  <ele>57.374817</ele>
+<time>2008-01-27T14:35:11Z</time>
+  <course>175.468765</course>
+  <speed>0.666853</speed>
+  <name>TP0261</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698659976" lon="11.977695536">
+  <ele>57.712070</ele>
+<time>2008-01-27T14:35:16Z</time>
+  <course>175.468765</course>
+  <speed>0.034337</speed>
+  <name>TP0262</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698659709" lon="11.977696191">
+  <ele>57.753304</ele>
+<time>2008-01-27T14:35:21Z</time>
+  <course>175.468765</course>
+  <speed>0.007648</speed>
+  <name>TP0263</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698659626" lon="11.977696659">
+  <ele>57.740093</ele>
+<time>2008-01-27T14:35:26Z</time>
+  <course>175.468765</course>
+  <speed>0.008052</speed>
+  <name>TP0264</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698666420" lon="11.977689514">
+  <ele>57.764366</ele>
+<time>2008-01-27T14:35:31Z</time>
+  <course>175.468765</course>
+  <speed>1.399782</speed>
+  <name>TP0265</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698734299" lon="11.977586736">
+  <ele>56.159416</ele>
+<time>2008-01-27T14:35:36Z</time>
+  <course>175.468765</course>
+  <speed>1.870218</speed>
+  <name>TP0266</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698814822" lon="11.977506458">
+  <ele>51.599651</ele>
+<time>2008-01-27T14:35:41Z</time>
+  <course>175.468765</course>
+  <speed>1.362844</speed>
+  <name>TP0267</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.698893266" lon="11.977435207">
+  <ele>50.687393</ele>
+<time>2008-01-27T14:35:46Z</time>
+  <course>175.468765</course>
+  <speed>1.824428</speed>
+  <name>TP0268</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.698959722" lon="11.977356103">
+  <ele>51.726231</ele>
+<time>2008-01-27T14:35:51Z</time>
+  <course>175.468765</course>
+  <speed>1.349397</speed>
+  <name>TP0269</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699003516" lon="11.977275097">
+  <ele>53.611576</ele>
+<time>2008-01-27T14:35:56Z</time>
+  <course>175.468765</course>
+  <speed>1.531711</speed>
+  <name>TP0270</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699042955" lon="11.977179276">
+  <ele>54.669785</ele>
+<time>2008-01-27T14:36:01Z</time>
+  <course>175.468765</course>
+  <speed>1.658979</speed>
+  <name>TP0271</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699088102" lon="11.977113951">
+  <ele>56.635204</ele>
+<time>2008-01-27T14:36:06Z</time>
+  <course>175.468765</course>
+  <speed>1.808275</speed>
+  <name>TP0272</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699134709" lon="11.977033398">
+  <ele>59.525986</ele>
+<time>2008-01-27T14:36:11Z</time>
+  <course>175.468765</course>
+  <speed>1.080695</speed>
+  <name>TP0273</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699139590" lon="11.976914650">
+  <ele>61.831104</ele>
+<time>2008-01-27T14:36:16Z</time>
+  <course>175.468765</course>
+  <speed>1.497532</speed>
+  <name>TP0274</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699182903" lon="11.976799455">
+  <ele>63.125233</ele>
+<time>2008-01-27T14:36:21Z</time>
+  <course>175.468765</course>
+  <speed>0.938251</speed>
+  <name>TP0275</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699237930" lon="11.976727861">
+  <ele>65.140114</ele>
+<time>2008-01-27T14:36:26Z</time>
+  <course>175.468765</course>
+  <speed>1.955553</speed>
+  <name>TP0276</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699323052" lon="11.976678988">
+  <ele>63.122700</ele>
+<time>2008-01-27T14:36:31Z</time>
+  <course>175.468765</course>
+  <speed>0.980393</speed>
+  <name>TP0277</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699357256" lon="11.976650031">
+  <ele>63.094830</ele>
+<time>2008-01-27T14:36:36Z</time>
+  <course>175.468765</course>
+  <speed>0.562485</speed>
+  <name>TP0278</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699360940" lon="11.976686135">
+  <ele>64.548813</ele>
+<time>2008-01-27T14:36:41Z</time>
+  <course>175.468765</course>
+  <speed>0.210463</speed>
+  <name>TP0279</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699356927" lon="11.976695524">
+  <ele>65.330444</ele>
+<time>2008-01-27T14:36:46Z</time>
+  <course>175.468765</course>
+  <speed>0.091049</speed>
+  <name>TP0280</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699353111" lon="11.976715026">
+  <ele>65.650665</ele>
+<time>2008-01-27T14:36:51Z</time>
+  <course>175.468765</course>
+  <speed>0.703038</speed>
+  <name>TP0281</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699354243" lon="11.976776929">
+  <ele>65.962677</ele>
+<time>2008-01-27T14:36:56Z</time>
+  <course>175.468765</course>
+  <speed>0.581965</speed>
+  <name>TP0282</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699353150" lon="11.976816863">
+  <ele>66.271774</ele>
+<time>2008-01-27T14:37:01Z</time>
+  <course>175.468765</course>
+  <speed>0.555606</speed>
+  <name>TP0283</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699338601" lon="11.976851630">
+  <ele>66.537361</ele>
+<time>2008-01-27T14:37:06Z</time>
+  <course>175.468765</course>
+  <speed>0.640316</speed>
+  <name>TP0284</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699336455" lon="11.976895312">
+  <ele>66.843864</ele>
+<time>2008-01-27T14:37:11Z</time>
+  <course>175.468765</course>
+  <speed>0.203543</speed>
+  <name>TP0285</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699335906" lon="11.976902403">
+  <ele>66.999008</ele>
+<time>2008-01-27T14:37:16Z</time>
+  <course>175.468765</course>
+  <speed>0.052765</speed>
+  <name>TP0286</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699337137" lon="11.976902951">
+  <ele>67.045273</ele>
+<time>2008-01-27T14:37:21Z</time>
+  <course>175.468765</course>
+  <speed>0.103190</speed>
+  <name>TP0287</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699342706" lon="11.976884233">
+  <ele>67.063019</ele>
+<time>2008-01-27T14:37:26Z</time>
+  <course>175.468765</course>
+  <speed>0.446828</speed>
+  <name>TP0288</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699353236" lon="11.976850448">
+  <ele>67.085609</ele>
+<time>2008-01-27T14:37:31Z</time>
+  <course>175.468765</course>
+  <speed>0.461187</speed>
+  <name>TP0289</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699358544" lon="11.976832802">
+  <ele>67.109024</ele>
+<time>2008-01-27T14:37:36Z</time>
+  <course>175.468765</course>
+  <speed>0.192227</speed>
+  <name>TP0290</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699363988" lon="11.976816076">
+  <ele>67.115768</ele>
+<time>2008-01-27T14:37:41Z</time>
+  <course>175.468765</course>
+  <speed>0.138321</speed>
+  <name>TP0291</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699367088" lon="11.976810946">
+  <ele>67.122627</ele>
+<time>2008-01-27T14:37:46Z</time>
+  <course>175.468765</course>
+  <speed>0.126840</speed>
+  <name>TP0292</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699375503" lon="11.976791240">
+  <ele>67.126030</ele>
+<time>2008-01-27T14:37:51Z</time>
+  <course>175.468765</course>
+  <speed>0.526896</speed>
+  <name>TP0293</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699403780" lon="11.976772607">
+  <ele>67.145798</ele>
+<time>2008-01-27T14:37:56Z</time>
+  <course>175.468765</course>
+  <speed>0.868801</speed>
+  <name>TP0294</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699441321" lon="11.976756819">
+  <ele>67.190155</ele>
+<time>2008-01-27T14:38:01Z</time>
+  <course>175.468765</course>
+  <speed>0.743607</speed>
+  <name>TP0295</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699469744" lon="11.976756271">
+  <ele>67.274750</ele>
+<time>2008-01-27T14:38:06Z</time>
+  <course>175.468765</course>
+  <speed>0.594341</speed>
+  <name>TP0296</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699495975" lon="11.976755207">
+  <ele>67.238174</ele>
+<time>2008-01-27T14:38:11Z</time>
+  <course>175.468765</course>
+  <speed>0.597670</speed>
+  <name>TP0297</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699523223" lon="11.976774770">
+  <ele>67.196770</ele>
+<time>2008-01-27T14:38:16Z</time>
+  <course>175.468765</course>
+  <speed>0.635388</speed>
+  <name>TP0298</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699553760" lon="11.976779780">
+  <ele>67.123039</ele>
+<time>2008-01-27T14:38:21Z</time>
+  <course>175.468765</course>
+  <speed>0.721896</speed>
+  <name>TP0299</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699578854" lon="11.976772597">
+  <ele>67.029480</ele>
+<time>2008-01-27T14:38:26Z</time>
+  <course>175.468765</course>
+  <speed>0.509246</speed>
+  <name>TP0300</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699588424" lon="11.976763894">
+  <ele>66.982285</ele>
+<time>2008-01-27T14:38:31Z</time>
+  <course>175.468765</course>
+  <speed>0.084961</speed>
+  <name>TP0301</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699594272" lon="11.976794546">
+  <ele>66.994843</ele>
+<time>2008-01-27T14:38:36Z</time>
+  <course>175.468765</course>
+  <speed>0.467561</speed>
+  <name>TP0302</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699594459" lon="11.976795947">
+  <ele>67.050613</ele>
+<time>2008-01-27T14:38:41Z</time>
+  <course>175.468765</course>
+  <speed>0.171006</speed>
+  <name>TP0303</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699593589" lon="11.976799676">
+  <ele>67.175125</ele>
+<time>2008-01-27T14:38:46Z</time>
+  <course>175.468765</course>
+  <speed>0.259222</speed>
+  <name>TP0304</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699595710" lon="11.976813631">
+  <ele>67.189331</ele>
+<time>2008-01-27T14:38:51Z</time>
+  <course>175.468765</course>
+  <speed>0.163483</speed>
+  <name>TP0305</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699575810" lon="11.976767065">
+  <ele>67.107552</ele>
+<time>2008-01-27T14:38:56Z</time>
+  <course>175.468765</course>
+  <speed>0.943069</speed>
+  <name>TP0306</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699566034" lon="11.976758894">
+  <ele>67.007812</ele>
+<time>2008-01-27T14:39:01Z</time>
+  <course>175.468765</course>
+  <speed>0.276720</speed>
+  <name>TP0307</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699569668" lon="11.976760085">
+  <ele>66.901794</ele>
+<time>2008-01-27T14:39:06Z</time>
+  <course>175.468765</course>
+  <speed>0.131728</speed>
+  <name>TP0308</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699572789" lon="11.976756697">
+  <ele>66.823387</ele>
+<time>2008-01-27T14:39:11Z</time>
+  <course>175.468765</course>
+  <speed>0.441979</speed>
+  <name>TP0309</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699565541" lon="11.976722054">
+  <ele>66.704353</ele>
+<time>2008-01-27T14:39:16Z</time>
+  <course>175.468765</course>
+  <speed>0.559136</speed>
+  <name>TP0310</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699555816" lon="11.976690550">
+  <ele>66.499146</ele>
+<time>2008-01-27T14:39:21Z</time>
+  <course>175.468765</course>
+  <speed>0.881640</speed>
+  <name>TP0311</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699555786" lon="11.976630906">
+  <ele>66.373116</ele>
+<time>2008-01-27T14:39:26Z</time>
+  <course>175.468765</course>
+  <speed>1.139266</speed>
+  <name>TP0312</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699554338" lon="11.976522706">
+  <ele>62.448307</ele>
+<time>2008-01-27T14:39:31Z</time>
+  <course>175.468765</course>
+  <speed>1.584432</speed>
+  <name>TP0313</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699557343" lon="11.976458559">
+  <ele>63.711189</ele>
+<time>2008-01-27T14:39:36Z</time>
+  <course>175.468765</course>
+  <speed>0.537779</speed>
+  <name>TP0314</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699588714" lon="11.976400600">
+  <ele>65.081207</ele>
+<time>2008-01-27T14:39:41Z</time>
+  <course>175.468765</course>
+  <speed>1.460763</speed>
+  <name>TP0315</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699617726" lon="11.976313366">
+  <ele>65.331810</ele>
+<time>2008-01-27T14:39:46Z</time>
+  <course>175.468765</course>
+  <speed>0.471566</speed>
+  <name>TP0316</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699658406" lon="11.976248375">
+  <ele>65.433136</ele>
+<time>2008-01-27T14:39:51Z</time>
+  <course>175.468765</course>
+  <speed>1.028151</speed>
+  <name>TP0317</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699712957" lon="11.976240572">
+  <ele>68.669930</ele>
+<time>2008-01-27T14:39:56Z</time>
+  <course>175.468765</course>
+  <speed>1.090684</speed>
+  <name>TP0318</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699776426" lon="11.976176622">
+  <ele>67.727882</ele>
+<time>2008-01-27T14:40:01Z</time>
+  <course>175.468765</course>
+  <speed>1.121583</speed>
+  <name>TP0319</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699825113" lon="11.976082324">
+  <ele>67.210159</ele>
+<time>2008-01-27T14:40:06Z</time>
+  <course>175.468765</course>
+  <speed>1.221953</speed>
+  <name>TP0320</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699889840" lon="11.975990528">
+  <ele>67.460991</ele>
+<time>2008-01-27T14:40:11Z</time>
+  <course>175.468765</course>
+  <speed>1.380647</speed>
+  <name>TP0321</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699932777" lon="11.975902191">
+  <ele>67.406555</ele>
+<time>2008-01-27T14:40:16Z</time>
+  <course>175.468765</course>
+  <speed>1.339889</speed>
+  <name>TP0322</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699981799" lon="11.975812877">
+  <ele>67.934387</ele>
+<time>2008-01-27T14:40:21Z</time>
+  <course>175.468765</course>
+  <speed>1.000727</speed>
+  <name>TP0323</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.700013347" lon="11.975730024">
+  <ele>68.325150</ele>
+<time>2008-01-27T14:40:26Z</time>
+  <course>175.468765</course>
+  <speed>1.120354</speed>
+  <name>TP0324</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700050590" lon="11.975639119">
+  <ele>68.265938</ele>
+<time>2008-01-27T14:40:31Z</time>
+  <course>175.468765</course>
+  <speed>1.248476</speed>
+  <name>TP0325</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700111120" lon="11.975515145">
+  <ele>66.727936</ele>
+<time>2008-01-27T14:40:36Z</time>
+  <course>312.802246</course>
+  <speed>2.078804</speed>
+  <name>TP0326</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.700148250" lon="11.975412067">
+  <ele>66.767967</ele>
+<time>2008-01-27T14:40:41Z</time>
+  <course>312.802246</course>
+  <speed>1.515785</speed>
+  <name>TP0327</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.700209443" lon="11.975290447">
+  <ele>64.711159</ele>
+<time>2008-01-27T14:40:46Z</time>
+  <course>313.321777</course>
+  <speed>1.331840</speed>
+  <name>TP0328</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700288350" lon="11.975163260">
+  <ele>59.310825</ele>
+<time>2008-01-27T14:40:51Z</time>
+  <course>308.333649</course>
+  <speed>1.644789</speed>
+  <name>TP0329</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700373120" lon="11.975093425">
+  <ele>55.797432</ele>
+<time>2008-01-27T14:40:56Z</time>
+  <course>308.333649</course>
+  <speed>1.578672</speed>
+  <name>TP0330</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.700438259" lon="11.975011198">
+  <ele>53.861481</ele>
+<time>2008-01-27T14:41:01Z</time>
+  <course>308.333649</course>
+  <speed>1.274700</speed>
+  <name>TP0331</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700496737" lon="11.974938388">
+  <ele>53.175739</ele>
+<time>2008-01-27T14:41:06Z</time>
+  <course>308.138123</course>
+  <speed>1.346282</speed>
+  <name>TP0332</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.700559212" lon="11.974854201">
+  <ele>52.071518</ele>
+<time>2008-01-27T14:41:11Z</time>
+  <course>308.138123</course>
+  <speed>1.086786</speed>
+  <name>TP0333</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700677040" lon="11.974866246">
+  <ele>48.707954</ele>
+<time>2008-01-27T14:41:16Z</time>
+  <course>308.138123</course>
+  <speed>1.628884</speed>
+  <name>TP0334</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700746074" lon="11.974814115">
+  <ele>46.551117</ele>
+<time>2008-01-27T14:41:21Z</time>
+  <course>308.138123</course>
+  <speed>1.271425</speed>
+  <name>TP0335</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700808240" lon="11.974717378">
+  <ele>45.544510</ele>
+<time>2008-01-27T14:41:26Z</time>
+  <course>308.138123</course>
+  <speed>1.525444</speed>
+  <name>TP0336</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700869523" lon="11.974635891">
+  <ele>44.028717</ele>
+<time>2008-01-27T14:41:31Z</time>
+  <course>307.519714</course>
+  <speed>1.813896</speed>
+  <name>TP0337</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700937030" lon="11.974538614">
+  <ele>43.179455</ele>
+<time>2008-01-27T14:41:36Z</time>
+  <course>307.519714</course>
+  <speed>1.620501</speed>
+  <name>TP0338</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.700975767" lon="11.974505376">
+  <ele>44.183289</ele>
+<time>2008-01-27T14:41:41Z</time>
+  <course>307.519714</course>
+  <speed>1.121122</speed>
+  <name>TP0339</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701023667" lon="11.974408623">
+  <ele>44.197002</ele>
+<time>2008-01-27T14:41:46Z</time>
+  <course>307.519714</course>
+  <speed>1.351534</speed>
+  <name>TP0340</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701062417" lon="11.974338713">
+  <ele>44.851364</ele>
+<time>2008-01-27T14:41:51Z</time>
+  <course>309.039703</course>
+  <speed>0.850725</speed>
+  <name>TP0341</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701102836" lon="11.974260171">
+  <ele>46.545170</ele>
+<time>2008-01-27T14:41:56Z</time>
+  <course>312.476257</course>
+  <speed>0.958556</speed>
+  <name>TP0342</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701145407" lon="11.974183931">
+  <ele>48.676037</ele>
+<time>2008-01-27T14:42:01Z</time>
+  <course>312.476257</course>
+  <speed>1.167243</speed>
+  <name>TP0343</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701185230" lon="11.974109388">
+  <ele>51.464268</ele>
+<time>2008-01-27T14:42:06Z</time>
+  <course>313.447083</course>
+  <speed>1.254220</speed>
+  <name>TP0344</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701257014" lon="11.974060320">
+  <ele>52.665562</ele>
+<time>2008-01-27T14:42:11Z</time>
+  <course>313.648682</course>
+  <speed>1.048820</speed>
+  <name>TP0345</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701289299" lon="11.973956467">
+  <ele>54.015507</ele>
+<time>2008-01-27T14:42:16Z</time>
+  <course>313.648682</course>
+  <speed>1.486100</speed>
+  <name>TP0346</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701320403" lon="11.973851309">
+  <ele>55.014637</ele>
+<time>2008-01-27T14:42:21Z</time>
+  <course>313.648682</course>
+  <speed>1.225496</speed>
+  <name>TP0347</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701396004" lon="11.973794493">
+  <ele>55.862492</ele>
+<time>2008-01-27T14:42:26Z</time>
+  <course>313.648682</course>
+  <speed>1.440006</speed>
+  <name>TP0348</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701411099" lon="11.973701916">
+  <ele>59.842957</ele>
+<time>2008-01-27T14:42:31Z</time>
+  <course>315.012482</course>
+  <speed>1.003200</speed>
+  <name>TP0349</name>
+  <fix>3d</fix>
+  <sat>10</sat>
+</trkpt>
+<trkpt lat="57.701434889" lon="11.973616650">
+  <ele>62.616528</ele>
+<time>2008-01-27T14:42:36Z</time>
+  <course>315.592804</course>
+  <speed>1.093873</speed>
+  <name>TP0350</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701443875" lon="11.973507195">
+  <ele>65.984482</ele>
+<time>2008-01-27T14:42:41Z</time>
+  <course>315.939636</course>
+  <speed>1.132645</speed>
+  <name>TP0351</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701459713" lon="11.973434155">
+  <ele>68.956490</ele>
+<time>2008-01-27T14:42:46Z</time>
+  <course>315.939636</course>
+  <speed>1.362898</speed>
+  <name>TP0352</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701617441" lon="11.973517449">
+  <ele>64.422302</ele>
+<time>2008-01-27T14:42:51Z</time>
+  <course>319.429626</course>
+  <speed>1.168481</speed>
+  <name>TP0353</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701706355" lon="11.973372195">
+  <ele>57.506542</ele>
+<time>2008-01-27T14:42:56Z</time>
+  <course>319.429626</course>
+  <speed>1.093485</speed>
+  <name>TP0354</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701753350" lon="11.973225693">
+  <ele>53.629463</ele>
+<time>2008-01-27T14:43:01Z</time>
+  <course>319.429626</course>
+  <speed>1.666819</speed>
+  <name>TP0355</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701804183" lon="11.973083845">
+  <ele>51.207535</ele>
+<time>2008-01-27T14:43:06Z</time>
+  <course>319.429626</course>
+  <speed>1.139789</speed>
+  <name>TP0356</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701857533" lon="11.972972439">
+  <ele>50.054111</ele>
+<time>2008-01-27T14:43:11Z</time>
+  <course>319.604919</course>
+  <speed>1.219204</speed>
+  <name>TP0357</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701901987" lon="11.972924949">
+  <ele>51.180580</ele>
+<time>2008-01-27T14:43:16Z</time>
+  <course>319.773590</course>
+  <speed>1.200754</speed>
+  <name>TP0358</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.701973830" lon="11.972839822">
+  <ele>50.299816</ele>
+<time>2008-01-27T14:43:21Z</time>
+  <course>319.422302</course>
+  <speed>1.659349</speed>
+  <name>TP0359</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702049028" lon="11.972743604">
+  <ele>47.162354</ele>
+<time>2008-01-27T14:43:26Z</time>
+  <course>319.306824</course>
+  <speed>1.243625</speed>
+  <name>TP0360</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702130183" lon="11.972675066">
+  <ele>43.651794</ele>
+<time>2008-01-27T14:43:31Z</time>
+  <course>318.747681</course>
+  <speed>1.517840</speed>
+  <name>TP0361</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702182571" lon="11.972621793">
+  <ele>41.516739</ele>
+<time>2008-01-27T14:43:36Z</time>
+  <course>321.181732</course>
+  <speed>1.798075</speed>
+  <name>TP0362</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702256949" lon="11.972537899">
+  <ele>42.297428</ele>
+<time>2008-01-27T14:43:41Z</time>
+  <course>321.181732</course>
+  <speed>1.856496</speed>
+  <name>TP0363</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702324992" lon="11.972444765">
+  <ele>41.169773</ele>
+<time>2008-01-27T14:43:46Z</time>
+  <course>330.178528</course>
+  <speed>1.447083</speed>
+  <name>TP0364</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702382531" lon="11.972354438">
+  <ele>40.141083</ele>
+<time>2008-01-27T14:43:51Z</time>
+  <course>330.178528</course>
+  <speed>0.896336</speed>
+  <name>TP0365</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702412180" lon="11.972289031">
+  <ele>41.489315</ele>
+<time>2008-01-27T14:43:56Z</time>
+  <course>331.304474</course>
+  <speed>1.176047</speed>
+  <name>TP0366</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702437956" lon="11.972275231">
+  <ele>41.591541</ele>
+<time>2008-01-27T14:44:01Z</time>
+  <course>331.304474</course>
+  <speed>0.078315</speed>
+  <name>TP0367</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702440291" lon="11.972272868">
+  <ele>41.805412</ele>
+<time>2008-01-27T14:44:06Z</time>
+  <course>331.304474</course>
+  <speed>0.136545</speed>
+  <name>TP0368</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702440766" lon="11.972272494">
+  <ele>41.838428</ele>
+<time>2008-01-27T14:44:11Z</time>
+  <course>331.304474</course>
+  <speed>0.025752</speed>
+  <name>TP0369</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702453971" lon="11.972234419">
+  <ele>41.977230</ele>
+<time>2008-01-27T14:44:16Z</time>
+  <course>331.304474</course>
+  <speed>1.645710</speed>
+  <name>TP0370</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702499710" lon="11.972135178">
+  <ele>39.424427</ele>
+<time>2008-01-27T14:44:21Z</time>
+  <course>331.304474</course>
+  <speed>1.585729</speed>
+  <name>TP0371</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702561943" lon="11.972115533">
+  <ele>39.248688</ele>
+<time>2008-01-27T14:44:26Z</time>
+  <course>331.304474</course>
+  <speed>1.673960</speed>
+  <name>TP0372</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702615537" lon="11.972059751">
+  <ele>40.105923</ele>
+<time>2008-01-27T14:44:31Z</time>
+  <course>331.304474</course>
+  <speed>1.675777</speed>
+  <name>TP0373</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702665985" lon="11.972001254">
+  <ele>40.622498</ele>
+<time>2008-01-27T14:44:36Z</time>
+  <course>332.742340</course>
+  <speed>1.290782</speed>
+  <name>TP0374</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702735687" lon="11.971930449">
+  <ele>39.549179</ele>
+<time>2008-01-27T14:44:41Z</time>
+  <course>334.134705</course>
+  <speed>1.214838</speed>
+  <name>TP0375</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702781795" lon="11.971834852">
+  <ele>39.688271</ele>
+<time>2008-01-27T14:44:46Z</time>
+  <course>334.134705</course>
+  <speed>1.341584</speed>
+  <name>TP0376</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702843395" lon="11.971721872">
+  <ele>36.874863</ele>
+<time>2008-01-27T14:44:51Z</time>
+  <course>334.134705</course>
+  <speed>1.492571</speed>
+  <name>TP0377</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702910251" lon="11.971636250">
+  <ele>37.305058</ele>
+<time>2008-01-27T14:44:56Z</time>
+  <course>329.513885</course>
+  <speed>1.965910</speed>
+  <name>TP0378</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.702969668" lon="11.971550884">
+  <ele>36.478157</ele>
+<time>2008-01-27T14:45:01Z</time>
+  <course>329.513885</course>
+  <speed>1.425542</speed>
+  <name>TP0379</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703016551" lon="11.971462134">
+  <ele>37.679001</ele>
+<time>2008-01-27T14:45:06Z</time>
+  <course>329.513885</course>
+  <speed>1.851270</speed>
+  <name>TP0380</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703071141" lon="11.971374125">
+  <ele>37.855843</ele>
+<time>2008-01-27T14:45:11Z</time>
+  <course>329.513885</course>
+  <speed>1.464016</speed>
+  <name>TP0381</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703133970" lon="11.971306767">
+  <ele>38.440704</ele>
+<time>2008-01-27T14:45:16Z</time>
+  <course>330.639191</course>
+  <speed>1.963235</speed>
+  <name>TP0382</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703188017" lon="11.971224229">
+  <ele>37.094051</ele>
+<time>2008-01-27T14:45:21Z</time>
+  <course>322.645264</course>
+  <speed>1.353058</speed>
+  <name>TP0383</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703243528" lon="11.971134750">
+  <ele>38.460693</ele>
+<time>2008-01-27T14:45:26Z</time>
+  <course>321.540863</course>
+  <speed>1.666589</speed>
+  <name>TP0384</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703298423" lon="11.971047352">
+  <ele>37.066402</ele>
+<time>2008-01-27T14:45:31Z</time>
+  <course>321.540863</course>
+  <speed>1.353564</speed>
+  <name>TP0385</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703351396" lon="11.970981304">
+  <ele>37.422005</ele>
+<time>2008-01-27T14:45:36Z</time>
+  <course>321.540863</course>
+  <speed>1.745178</speed>
+  <name>TP0386</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703404240" lon="11.970899800">
+  <ele>36.895084</ele>
+<time>2008-01-27T14:45:41Z</time>
+  <course>320.504150</course>
+  <speed>1.480854</speed>
+  <name>TP0387</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703467367" lon="11.970805750">
+  <ele>36.325195</ele>
+<time>2008-01-27T14:45:46Z</time>
+  <course>319.068939</course>
+  <speed>1.389258</speed>
+  <name>TP0388</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703511479" lon="11.970723914">
+  <ele>36.249111</ele>
+<time>2008-01-27T14:45:51Z</time>
+  <course>320.075500</course>
+  <speed>1.720982</speed>
+  <name>TP0389</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703565002" lon="11.970628899">
+  <ele>34.936836</ele>
+<time>2008-01-27T14:45:56Z</time>
+  <course>320.075500</course>
+  <speed>1.293412</speed>
+  <name>TP0390</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703616230" lon="11.970552717">
+  <ele>34.254780</ele>
+<time>2008-01-27T14:46:01Z</time>
+  <course>322.200470</course>
+  <speed>1.592284</speed>
+  <name>TP0391</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703668665" lon="11.970462788">
+  <ele>34.248177</ele>
+<time>2008-01-27T14:46:06Z</time>
+  <course>320.091583</course>
+  <speed>1.661003</speed>
+  <name>TP0392</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703734339" lon="11.970374753">
+  <ele>34.113022</ele>
+<time>2008-01-27T14:46:11Z</time>
+  <course>321.973114</course>
+  <speed>1.394113</speed>
+  <name>TP0393</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703799899" lon="11.970325330">
+  <ele>34.821335</ele>
+<time>2008-01-27T14:46:16Z</time>
+  <course>321.973114</course>
+  <speed>1.494689</speed>
+  <name>TP0394</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703855630" lon="11.970308618">
+  <ele>34.473961</ele>
+<time>2008-01-27T14:46:21Z</time>
+  <course>321.973114</course>
+  <speed>1.207032</speed>
+  <name>TP0395</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703895194" lon="11.970387946">
+  <ele>34.814793</ele>
+<time>2008-01-27T14:46:26Z</time>
+  <course>321.973114</course>
+  <speed>1.502668</speed>
+  <name>TP0396</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.703939196" lon="11.970481079">
+  <ele>36.531628</ele>
+<time>2008-01-27T14:46:31Z</time>
+  <course>321.973114</course>
+  <speed>1.572504</speed>
+  <name>TP0397</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703984326" lon="11.970576822">
+  <ele>35.942066</ele>
+<time>2008-01-27T14:46:36Z</time>
+  <course>321.973114</course>
+  <speed>1.444465</speed>
+  <name>TP0398</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704017186" lon="11.970695042">
+  <ele>36.970840</ele>
+<time>2008-01-27T14:46:41Z</time>
+  <course>321.973114</course>
+  <speed>1.726603</speed>
+  <name>TP0399</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704066750" lon="11.970782903">
+  <ele>36.620956</ele>
+<time>2008-01-27T14:46:46Z</time>
+  <course>321.973114</course>
+  <speed>1.378629</speed>
+  <name>TP0400</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704114963" lon="11.970868642">
+  <ele>36.710541</ele>
+<time>2008-01-27T14:46:51Z</time>
+  <course>321.973114</course>
+  <speed>1.201835</speed>
+  <name>TP0401</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704112015" lon="11.970976090">
+  <ele>38.266098</ele>
+<time>2008-01-27T14:46:56Z</time>
+  <course>321.973114</course>
+  <speed>1.638500</speed>
+  <name>TP0402</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.704099607" lon="11.971028954">
+  <ele>39.388645</ele>
+<time>2008-01-27T14:47:01Z</time>
+  <course>321.973114</course>
+  <speed>0.850153</speed>
+  <name>TP0403</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704082150" lon="11.971094574">
+  <ele>41.071198</ele>
+<time>2008-01-27T14:47:06Z</time>
+  <course>321.973114</course>
+  <speed>1.181594</speed>
+  <name>TP0404</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704054991" lon="11.971266884">
+  <ele>44.571972</ele>
+<time>2008-01-27T14:47:11Z</time>
+  <course>321.973114</course>
+  <speed>1.591521</speed>
+  <name>TP0405</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704054851" lon="11.971486968">
+  <ele>45.149620</ele>
+<time>2008-01-27T14:47:16Z</time>
+  <course>103.814293</course>
+  <speed>1.903993</speed>
+  <name>TP0406</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704049107" lon="11.971652223">
+  <ele>46.482353</ele>
+<time>2008-01-27T14:47:21Z</time>
+  <course>103.548470</course>
+  <speed>1.411737</speed>
+  <name>TP0407</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704046218" lon="11.971774609">
+  <ele>47.727573</ele>
+<time>2008-01-27T14:47:26Z</time>
+  <course>103.548470</course>
+  <speed>1.386361</speed>
+  <name>TP0408</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704029550" lon="11.971917343">
+  <ele>50.446995</ele>
+<time>2008-01-27T14:47:31Z</time>
+  <course>110.262627</course>
+  <speed>1.331973</speed>
+  <name>TP0409</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704066705" lon="11.972013969">
+  <ele>50.487560</ele>
+<time>2008-01-27T14:47:36Z</time>
+  <course>110.262627</course>
+  <speed>1.747993</speed>
+  <name>TP0410</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704102563" lon="11.972133857">
+  <ele>51.564754</ele>
+<time>2008-01-27T14:47:41Z</time>
+  <course>110.262627</course>
+  <speed>1.355807</speed>
+  <name>TP0411</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704207093" lon="11.972208616">
+  <ele>45.682472</ele>
+<time>2008-01-27T14:47:46Z</time>
+  <course>110.262627</course>
+  <speed>1.210973</speed>
+  <name>TP0412</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704288162" lon="11.972270911">
+  <ele>41.204666</ele>
+<time>2008-01-27T14:47:51Z</time>
+  <course>110.262627</course>
+  <speed>1.413509</speed>
+  <name>TP0413</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704330365" lon="11.972346978">
+  <ele>41.814583</ele>
+<time>2008-01-27T14:47:56Z</time>
+  <course>110.262627</course>
+  <speed>1.276915</speed>
+  <name>TP0414</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704372684" lon="11.972406015">
+  <ele>42.905079</ele>
+<time>2008-01-27T14:48:01Z</time>
+  <course>110.262627</course>
+  <speed>1.598764</speed>
+  <name>TP0415</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704441213" lon="11.972453465">
+  <ele>42.048431</ele>
+<time>2008-01-27T14:48:06Z</time>
+  <course>110.262627</course>
+  <speed>1.731465</speed>
+  <name>TP0416</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704513690" lon="11.972459435">
+  <ele>40.197262</ele>
+<time>2008-01-27T14:48:11Z</time>
+  <course>110.262627</course>
+  <speed>1.324286</speed>
+  <name>TP0417</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704577450" lon="11.972472115">
+  <ele>37.296478</ele>
+<time>2008-01-27T14:48:16Z</time>
+  <course>110.262627</course>
+  <speed>1.353854</speed>
+  <name>TP0418</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704643339" lon="11.972509230">
+  <ele>34.941608</ele>
+<time>2008-01-27T14:48:21Z</time>
+  <course>110.262627</course>
+  <speed>1.212386</speed>
+  <name>TP0419</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704711030" lon="11.972518676">
+  <ele>31.461550</ele>
+<time>2008-01-27T14:48:26Z</time>
+  <course>110.262627</course>
+  <speed>1.507033</speed>
+  <name>TP0420</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704788881" lon="11.972507637">
+  <ele>29.878866</ele>
+<time>2008-01-27T14:48:31Z</time>
+  <course>110.262627</course>
+  <speed>1.728915</speed>
+  <name>TP0421</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704843000" lon="11.972505243">
+  <ele>28.686647</ele>
+<time>2008-01-27T14:48:36Z</time>
+  <course>110.262627</course>
+  <speed>0.987423</speed>
+  <name>TP0422</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704922117" lon="11.972432623">
+  <ele>28.145824</ele>
+<time>2008-01-27T14:48:41Z</time>
+  <course>110.262627</course>
+  <speed>1.265162</speed>
+  <name>TP0423</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705011508" lon="11.972303649">
+  <ele>30.670811</ele>
+<time>2008-01-27T14:48:46Z</time>
+  <course>110.262627</course>
+  <speed>1.836553</speed>
+  <name>TP0424</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705060320" lon="11.972348345">
+  <ele>32.307770</ele>
+<time>2008-01-27T14:48:51Z</time>
+  <course>110.262627</course>
+  <speed>1.310898</speed>
+  <name>TP0425</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705128083" lon="11.972348656">
+  <ele>32.628761</ele>
+<time>2008-01-27T14:48:56Z</time>
+  <course>110.262627</course>
+  <speed>1.622816</speed>
+  <name>TP0426</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705202987" lon="11.972322296">
+  <ele>33.369404</ele>
+<time>2008-01-27T14:49:01Z</time>
+  <course>110.262627</course>
+  <speed>1.710149</speed>
+  <name>TP0427</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705253851" lon="11.972356937">
+  <ele>34.297184</ele>
+<time>2008-01-27T14:49:06Z</time>
+  <course>110.262627</course>
+  <speed>1.097964</speed>
+  <name>TP0428</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705307339" lon="11.972390305">
+  <ele>35.706226</ele>
+<time>2008-01-27T14:49:11Z</time>
+  <course>110.262627</course>
+  <speed>1.243773</speed>
+  <name>TP0429</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705365021" lon="11.972433816">
+  <ele>37.490696</ele>
+<time>2008-01-27T14:49:16Z</time>
+  <course>110.262627</course>
+  <speed>1.201586</speed>
+  <name>TP0430</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705434649" lon="11.972468383">
+  <ele>37.541157</ele>
+<time>2008-01-27T14:49:21Z</time>
+  <course>110.262627</course>
+  <speed>1.565976</speed>
+  <name>TP0431</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705495649" lon="11.972519343">
+  <ele>38.153469</ele>
+<time>2008-01-27T14:49:26Z</time>
+  <course>110.262627</course>
+  <speed>1.327252</speed>
+  <name>TP0432</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705555729" lon="11.972560366">
+  <ele>38.474022</ele>
+<time>2008-01-27T14:49:31Z</time>
+  <course>110.262627</course>
+  <speed>1.206724</speed>
+  <name>TP0433</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705625054" lon="11.972577976">
+  <ele>38.568634</ele>
+<time>2008-01-27T14:49:36Z</time>
+  <course>110.262627</course>
+  <speed>1.602677</speed>
+  <name>TP0434</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705682553" lon="11.972639048">
+  <ele>38.217030</ele>
+<time>2008-01-27T14:49:41Z</time>
+  <course>110.262627</course>
+  <speed>1.495651</speed>
+  <name>TP0435</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705729828" lon="11.972711766">
+  <ele>38.042328</ele>
+<time>2008-01-27T14:49:46Z</time>
+  <course>110.262627</course>
+  <speed>1.188114</speed>
+  <name>TP0436</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705796837" lon="11.972769261">
+  <ele>37.052139</ele>
+<time>2008-01-27T14:49:51Z</time>
+  <course>110.262627</course>
+  <speed>1.367975</speed>
+  <name>TP0437</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705858054" lon="11.972806102">
+  <ele>36.222900</ele>
+<time>2008-01-27T14:49:56Z</time>
+  <course>110.262627</course>
+  <speed>1.819672</speed>
+  <name>TP0438</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705898174" lon="11.972898244">
+  <ele>35.862713</ele>
+<time>2008-01-27T14:50:01Z</time>
+  <course>110.262627</course>
+  <speed>1.016674</speed>
+  <name>TP0439</name>
+  <fix>3d</fix>
+  <sat>10</sat>
+</trkpt>
+<trkpt lat="57.705932924" lon="11.972996816">
+  <ele>37.347980</ele>
+<time>2008-01-27T14:50:06Z</time>
+  <course>110.262627</course>
+  <speed>1.323934</speed>
+  <name>TP0440</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705968210" lon="11.973097295">
+  <ele>39.428635</ele>
+<time>2008-01-27T14:50:11Z</time>
+  <course>110.262627</course>
+  <speed>1.532402</speed>
+  <name>TP0441</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706017952" lon="11.973184497">
+  <ele>38.590481</ele>
+<time>2008-01-27T14:50:16Z</time>
+  <course>110.262627</course>
+  <speed>1.115400</speed>
+  <name>TP0442</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706064519" lon="11.973268530">
+  <ele>38.579144</ele>
+<time>2008-01-27T14:50:21Z</time>
+  <course>110.262627</course>
+  <speed>1.374582</speed>
+  <name>TP0443</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706064484" lon="11.973370787">
+  <ele>41.594685</ele>
+<time>2008-01-27T14:50:26Z</time>
+  <course>110.262627</course>
+  <speed>1.245201</speed>
+  <name>TP0444</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706096907" lon="11.973469752">
+  <ele>43.934750</ele>
+<time>2008-01-27T14:50:31Z</time>
+  <course>110.262627</course>
+  <speed>1.782246</speed>
+  <name>TP0445</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706129514" lon="11.973578808">
+  <ele>46.569092</ele>
+<time>2008-01-27T14:50:36Z</time>
+  <course>110.262627</course>
+  <speed>1.470096</speed>
+  <name>TP0446</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706154301" lon="11.973707098">
+  <ele>47.493629</ele>
+<time>2008-01-27T14:50:41Z</time>
+  <course>110.262627</course>
+  <speed>1.368854</speed>
+  <name>TP0447</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706197485" lon="11.973811192">
+  <ele>48.136349</ele>
+<time>2008-01-27T14:50:46Z</time>
+  <course>110.262627</course>
+  <speed>1.429163</speed>
+  <name>TP0448</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706239257" lon="11.973919899">
+  <ele>48.331181</ele>
+<time>2008-01-27T14:50:51Z</time>
+  <course>110.262627</course>
+  <speed>1.393897</speed>
+  <name>TP0449</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706288950" lon="11.974031007">
+  <ele>47.542187</ele>
+<time>2008-01-27T14:50:56Z</time>
+  <course>110.262627</course>
+  <speed>1.263732</speed>
+  <name>TP0450</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706375132" lon="11.974092504">
+  <ele>44.780071</ele>
+<time>2008-01-27T14:51:01Z</time>
+  <course>110.262627</course>
+  <speed>1.499232</speed>
+  <name>TP0451</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706426517" lon="11.974187165">
+  <ele>43.078159</ele>
+<time>2008-01-27T14:51:06Z</time>
+  <course>110.262627</course>
+  <speed>1.535867</speed>
+  <name>TP0452</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706507780" lon="11.974208417">
+  <ele>39.632629</ele>
+<time>2008-01-27T14:51:11Z</time>
+  <course>110.262627</course>
+  <speed>1.304739</speed>
+  <name>TP0453</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706592488" lon="11.974214642">
+  <ele>36.935654</ele>
+<time>2008-01-27T14:51:16Z</time>
+  <course>110.262627</course>
+  <speed>1.635283</speed>
+  <name>TP0454</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706672467" lon="11.974198739">
+  <ele>34.277405</ele>
+<time>2008-01-27T14:51:21Z</time>
+  <course>110.262627</course>
+  <speed>1.336167</speed>
+  <name>TP0455</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706728165" lon="11.974144771">
+  <ele>31.132778</ele>
+<time>2008-01-27T14:51:26Z</time>
+  <course>110.262627</course>
+  <speed>1.260236</speed>
+  <name>TP0456</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706803901" lon="11.974122527">
+  <ele>31.994057</ele>
+<time>2008-01-27T14:51:31Z</time>
+  <course>110.262627</course>
+  <speed>1.469296</speed>
+  <name>TP0457</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706868446" lon="11.974119242">
+  <ele>31.122032</ele>
+<time>2008-01-27T14:51:36Z</time>
+  <course>350.169159</course>
+  <speed>2.057511</speed>
+  <name>TP0458</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706938327" lon="11.974092748">
+  <ele>31.005985</ele>
+<time>2008-01-27T14:51:41Z</time>
+  <course>351.339142</course>
+  <speed>1.842231</speed>
+  <name>TP0459</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707008974" lon="11.974071205">
+  <ele>31.925455</ele>
+<time>2008-01-27T14:51:46Z</time>
+  <course>348.956848</course>
+  <speed>1.231063</speed>
+  <name>TP0460</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707065698" lon="11.974043404">
+  <ele>32.375824</ele>
+<time>2008-01-27T14:51:51Z</time>
+  <course>348.956848</course>
+  <speed>1.022590</speed>
+  <name>TP0461</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707099164" lon="11.974032899">
+  <ele>32.349483</ele>
+<time>2008-01-27T14:51:56Z</time>
+  <course>348.956848</course>
+  <speed>1.600391</speed>
+  <name>TP0462</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707189752" lon="11.974033519">
+  <ele>31.482601</ele>
+<time>2008-01-27T14:52:01Z</time>
+  <course>348.956848</course>
+  <speed>1.725673</speed>
+  <name>TP0463</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707235578" lon="11.974079670">
+  <ele>34.507126</ele>
+<time>2008-01-27T14:52:06Z</time>
+  <course>348.956848</course>
+  <speed>0.978169</speed>
+  <name>TP0464</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707303243" lon="11.974125750">
+  <ele>36.687382</ele>
+<time>2008-01-27T14:52:11Z</time>
+  <course>348.956848</course>
+  <speed>1.592462</speed>
+  <name>TP0465</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707354088" lon="11.974067679">
+  <ele>35.163441</ele>
+<time>2008-01-27T14:52:16Z</time>
+  <course>348.956848</course>
+  <speed>1.546907</speed>
+  <name>TP0466</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707402992" lon="11.974006332">
+  <ele>36.491611</ele>
+<time>2008-01-27T14:52:21Z</time>
+  <course>348.956848</course>
+  <speed>1.383988</speed>
+  <name>TP0467</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707465538" lon="11.973937849">
+  <ele>36.348030</ele>
+<time>2008-01-27T14:52:26Z</time>
+  <course>348.956848</course>
+  <speed>1.699179</speed>
+  <name>TP0468</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707508101" lon="11.973871088">
+  <ele>35.798428</ele>
+<time>2008-01-27T14:52:31Z</time>
+  <course>348.956848</course>
+  <speed>0.890414</speed>
+  <name>TP0469</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707565743" lon="11.973811050">
+  <ele>35.214291</ele>
+<time>2008-01-27T14:52:36Z</time>
+  <course>348.930817</course>
+  <speed>1.420595</speed>
+  <name>TP0470</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707633293" lon="11.973759878">
+  <ele>35.049137</ele>
+<time>2008-01-27T14:52:41Z</time>
+  <course>348.930817</course>
+  <speed>1.415599</speed>
+  <name>TP0471</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707654458" lon="11.973644351">
+  <ele>34.685078</ele>
+<time>2008-01-27T14:52:46Z</time>
+  <course>348.930817</course>
+  <speed>1.477946</speed>
+  <name>TP0472</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707663474" lon="11.973519278">
+  <ele>33.834579</ele>
+<time>2008-01-27T14:52:51Z</time>
+  <course>348.930817</course>
+  <speed>1.562345</speed>
+  <name>TP0473</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707672012" lon="11.973406648">
+  <ele>33.943275</ele>
+<time>2008-01-27T14:52:56Z</time>
+  <course>348.930817</course>
+  <speed>1.272014</speed>
+  <name>TP0474</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707657396" lon="11.973286827">
+  <ele>33.895531</ele>
+<time>2008-01-27T14:53:01Z</time>
+  <course>348.930817</course>
+  <speed>1.120622</speed>
+  <name>TP0475</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707661366" lon="11.973210583">
+  <ele>32.792637</ele>
+<time>2008-01-27T14:53:06Z</time>
+  <course>348.930817</course>
+  <speed>0.046271</speed>
+  <name>TP0476</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707661591" lon="11.973210248">
+  <ele>32.800762</ele>
+<time>2008-01-27T14:53:11Z</time>
+  <course>348.930817</course>
+  <speed>0.233082</speed>
+  <name>TP0477</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707658114" lon="11.973269601">
+  <ele>32.808544</ele>
+<time>2008-01-27T14:53:16Z</time>
+  <course>348.930817</course>
+  <speed>1.086615</speed>
+  <name>TP0478</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707666094" lon="11.973349431">
+  <ele>35.294174</ele>
+<time>2008-01-27T14:53:21Z</time>
+  <course>348.930817</course>
+  <speed>0.872653</speed>
+  <name>TP0479</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707670149" lon="11.973403578">
+  <ele>36.032829</ele>
+<time>2008-01-27T14:53:26Z</time>
+  <course>348.930817</course>
+  <speed>0.080512</speed>
+  <name>TP0480</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707672231" lon="11.973403720">
+  <ele>36.242550</ele>
+<time>2008-01-27T14:53:31Z</time>
+  <course>348.930817</course>
+  <speed>0.208565</speed>
+  <name>TP0481</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707679731" lon="11.973401047">
+  <ele>36.257809</ele>
+<time>2008-01-27T14:53:36Z</time>
+  <course>348.930817</course>
+  <speed>0.159674</speed>
+  <name>TP0482</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707683857" lon="11.973395926">
+  <ele>36.275784</ele>
+<time>2008-01-27T14:53:41Z</time>
+  <course>348.930817</course>
+  <speed>0.261805</speed>
+  <name>TP0483</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707694568" lon="11.973377012">
+  <ele>36.169346</ele>
+<time>2008-01-27T14:53:46Z</time>
+  <course>348.930817</course>
+  <speed>0.517310</speed>
+  <name>TP0484</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707700849" lon="11.973372603">
+  <ele>36.053902</ele>
+<time>2008-01-27T14:53:51Z</time>
+  <course>348.930817</course>
+  <speed>0.005382</speed>
+  <name>TP0485</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707700855" lon="11.973372530">
+  <ele>36.035206</ele>
+<time>2008-01-27T14:53:56Z</time>
+  <course>348.930817</course>
+  <speed>0.620699</speed>
+  <name>TP0486</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707700887" lon="11.973360251">
+  <ele>36.035797</ele>
+<time>2008-01-27T14:54:01Z</time>
+  <course>348.930817</course>
+  <speed>1.168755</speed>
+  <name>TP0487</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707707168" lon="11.973362929">
+  <ele>36.142834</ele>
+<time>2008-01-27T14:54:06Z</time>
+  <course>348.930817</course>
+  <speed>0.064666</speed>
+  <name>TP0488</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707715778" lon="11.973354007">
+  <ele>36.185215</ele>
+<time>2008-01-27T14:54:11Z</time>
+  <course>348.930817</course>
+  <speed>0.568796</speed>
+  <name>TP0489</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707699518" lon="11.973299290">
+  <ele>35.453949</ele>
+<time>2008-01-27T14:54:16Z</time>
+  <course>348.930817</course>
+  <speed>0.640305</speed>
+  <name>TP0490</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707699980" lon="11.973266624">
+  <ele>34.875973</ele>
+<time>2008-01-27T14:54:21Z</time>
+  <course>348.930817</course>
+  <speed>0.469342</speed>
+  <name>TP0491</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707696846" lon="11.973274410">
+  <ele>34.764629</ele>
+<time>2008-01-27T14:54:26Z</time>
+  <course>348.930817</course>
+  <speed>0.048115</speed>
+  <name>TP0492</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707696439" lon="11.973274083">
+  <ele>34.832104</ele>
+<time>2008-01-27T14:54:31Z</time>
+  <course>348.930817</course>
+  <speed>0.024468</speed>
+  <name>TP0493</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707694958" lon="11.973274685">
+  <ele>34.959030</ele>
+<time>2008-01-27T14:54:36Z</time>
+  <course>348.930817</course>
+  <speed>0.027468</speed>
+  <name>TP0494</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707695300" lon="11.973274992">
+  <ele>35.036503</ele>
+<time>2008-01-27T14:54:41Z</time>
+  <course>348.930817</course>
+  <speed>0.000968</speed>
+  <name>TP0495</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707695178" lon="11.973275288">
+  <ele>35.044819</ele>
+<time>2008-01-27T14:54:46Z</time>
+  <course>348.930817</course>
+  <speed>0.003053</speed>
+  <name>TP0496</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707695175" lon="11.973275590">
+  <ele>35.079132</ele>
+<time>2008-01-27T14:54:51Z</time>
+  <course>348.930817</course>
+  <speed>0.001238</speed>
+  <name>TP0497</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707695284" lon="11.973276581">
+  <ele>35.114792</ele>
+<time>2008-01-27T14:54:56Z</time>
+  <course>348.930817</course>
+  <speed>0.001593</speed>
+  <name>TP0498</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707695331" lon="11.973277537">
+  <ele>35.142036</ele>
+<time>2008-01-27T14:55:01Z</time>
+  <course>348.930817</course>
+  <speed>0.001471</speed>
+  <name>TP0499</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707695244" lon="11.973277668">
+  <ele>35.151981</ele>
+<time>2008-01-27T14:55:06Z</time>
+  <course>348.930817</course>
+  <speed>0.002685</speed>
+  <name>TP0500</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707695391" lon="11.973277863">
+  <ele>35.177467</ele>
+<time>2008-01-27T14:55:11Z</time>
+  <course>348.930817</course>
+  <speed>0.033977</speed>
+  <name>TP0501</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707695971" lon="11.973278694">
+  <ele>35.209000</ele>
+<time>2008-01-27T14:55:16Z</time>
+  <course>348.930817</course>
+  <speed>0.005408</speed>
+  <name>TP0502</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707692824" lon="11.973292981">
+  <ele>35.344204</ele>
+<time>2008-01-27T14:55:21Z</time>
+  <course>348.930817</course>
+  <speed>0.310761</speed>
+  <name>TP0503</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707691374" lon="11.973297874">
+  <ele>35.398499</ele>
+<time>2008-01-27T14:55:26Z</time>
+  <course>348.930817</course>
+  <speed>0.001647</speed>
+  <name>TP0504</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.707691407" lon="11.973298041">
+  <ele>35.406319</ele>
+<time>2008-01-27T14:55:31Z</time>
+  <course>348.930817</course>
+  <speed>0.000534</speed>
+  <name>TP0505</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707690993" lon="11.973298941">
+  <ele>35.386929</ele>
+<time>2008-01-27T14:55:36Z</time>
+  <course>348.930817</course>
+  <speed>0.006597</speed>
+  <name>TP0506</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707690630" lon="11.973299675">
+  <ele>35.373619</ele>
+<time>2008-01-27T14:55:41Z</time>
+  <course>348.930817</course>
+  <speed>0.001887</speed>
+  <name>TP0507</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707690516" lon="11.973299861">
+  <ele>35.371105</ele>
+<time>2008-01-27T14:55:46Z</time>
+  <course>348.930817</course>
+  <speed>0.001814</speed>
+  <name>TP0508</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707689539" lon="11.973301466">
+  <ele>35.344795</ele>
+<time>2008-01-27T14:55:51Z</time>
+  <course>348.930817</course>
+  <speed>0.003021</speed>
+  <name>TP0509</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.707687821" lon="11.973303528">
+  <ele>35.337196</ele>
+<time>2008-01-27T14:55:56Z</time>
+  <course>348.930817</course>
+  <speed>0.091405</speed>
+  <name>TP0510</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707683638" lon="11.973309779">
+  <ele>35.323624</ele>
+<time>2008-01-27T14:56:01Z</time>
+  <course>348.930817</course>
+  <speed>0.141361</speed>
+  <name>TP0511</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707675174" lon="11.973319038">
+  <ele>35.344074</ele>
+<time>2008-01-27T14:56:06Z</time>
+  <course>348.930817</course>
+  <speed>0.225306</speed>
+  <name>TP0512</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707666065" lon="11.973328005">
+  <ele>35.372276</ele>
+<time>2008-01-27T14:56:11Z</time>
+  <course>348.930817</course>
+  <speed>0.218948</speed>
+  <name>TP0513</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707659129" lon="11.973334733">
+  <ele>35.406303</ele>
+<time>2008-01-27T14:56:16Z</time>
+  <course>348.930817</course>
+  <speed>0.236625</speed>
+  <name>TP0514</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707650372" lon="11.973343538">
+  <ele>35.413681</ele>
+<time>2008-01-27T14:56:21Z</time>
+  <course>348.930817</course>
+  <speed>0.107134</speed>
+  <name>TP0515</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707643934" lon="11.973348964">
+  <ele>35.430824</ele>
+<time>2008-01-27T14:56:26Z</time>
+  <course>348.930817</course>
+  <speed>0.985265</speed>
+  <name>TP0516</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707608540" lon="11.973116192">
+  <ele>36.105286</ele>
+<time>2008-01-27T14:56:31Z</time>
+  <course>266.844727</course>
+  <speed>4.132751</speed>
+  <name>TP0517</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707578303" lon="11.972757853">
+  <ele>37.403809</ele>
+<time>2008-01-27T14:56:36Z</time>
+  <course>259.185059</course>
+  <speed>4.471956</speed>
+  <name>TP0518</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707539515" lon="11.972426788">
+  <ele>39.307724</ele>
+<time>2008-01-27T14:56:41Z</time>
+  <course>252.127563</course>
+  <speed>4.437634</speed>
+  <name>TP0519</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707555968" lon="11.972102361">
+  <ele>39.680443</ele>
+<time>2008-01-27T14:56:46Z</time>
+  <course>251.846802</course>
+  <speed>3.836235</speed>
+  <name>TP0520</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707435084" lon="11.971864234">
+  <ele>38.027061</ele>
+<time>2008-01-27T14:56:51Z</time>
+  <course>209.976074</course>
+  <speed>4.058580</speed>
+  <name>TP0521</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707239680" lon="11.971688984">
+  <ele>39.716564</ele>
+<time>2008-01-27T14:56:56Z</time>
+  <course>204.307907</course>
+  <speed>4.588913</speed>
+  <name>TP0522</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.707069666" lon="11.971440457">
+  <ele>42.343742</ele>
+<time>2008-01-27T14:57:01Z</time>
+  <course>244.933319</course>
+  <speed>5.554557</speed>
+  <name>TP0523</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706993577" lon="11.970922210">
+  <ele>47.920643</ele>
+<time>2008-01-27T14:57:06Z</time>
+  <course>259.753479</course>
+  <speed>5.416070</speed>
+  <name>TP0524</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706961422" lon="11.970467675">
+  <ele>53.100410</ele>
+<time>2008-01-27T14:57:11Z</time>
+  <course>252.850159</course>
+  <speed>4.845081</speed>
+  <name>TP0525</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706821821" lon="11.970165772">
+  <ele>59.027779</ele>
+<time>2008-01-27T14:57:16Z</time>
+  <course>252.758423</course>
+  <speed>4.991862</speed>
+  <name>TP0526</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706789101" lon="11.969803589">
+  <ele>64.524376</ele>
+<time>2008-01-27T14:57:21Z</time>
+  <course>242.889435</course>
+  <speed>3.134435</speed>
+  <name>TP0527</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706770295" lon="11.969482177">
+  <ele>70.053909</ele>
+<time>2008-01-27T14:57:26Z</time>
+  <course>256.679993</course>
+  <speed>2.597404</speed>
+  <name>TP0528</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706722885" lon="11.969257729">
+  <ele>73.381393</ele>
+<time>2008-01-27T14:57:31Z</time>
+  <course>252.173355</course>
+  <speed>0.951098</speed>
+  <name>TP0529</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706723025" lon="11.969213385">
+  <ele>74.317482</ele>
+<time>2008-01-27T14:57:36Z</time>
+  <course>252.173355</course>
+  <speed>0.091881</speed>
+  <name>TP0530</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706723036" lon="11.969205413">
+  <ele>74.994987</ele>
+<time>2008-01-27T14:57:41Z</time>
+  <course>252.173355</course>
+  <speed>0.172823</speed>
+  <name>TP0531</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706723990" lon="11.969196878">
+  <ele>75.340546</ele>
+<time>2008-01-27T14:57:46Z</time>
+  <course>252.173355</course>
+  <speed>0.128724</speed>
+  <name>TP0532</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706725353" lon="11.969195832">
+  <ele>75.514122</ele>
+<time>2008-01-27T14:57:51Z</time>
+  <course>252.173355</course>
+  <speed>0.048526</speed>
+  <name>TP0533</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706726361" lon="11.969193875">
+  <ele>75.590843</ele>
+<time>2008-01-27T14:57:56Z</time>
+  <course>252.173355</course>
+  <speed>0.058741</speed>
+  <name>TP0534</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706726146" lon="11.969188604">
+  <ele>75.640251</ele>
+<time>2008-01-27T14:58:01Z</time>
+  <course>252.173355</course>
+  <speed>0.152493</speed>
+  <name>TP0535</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706726678" lon="11.969191102">
+  <ele>75.699203</ele>
+<time>2008-01-27T14:58:06Z</time>
+  <course>252.173355</course>
+  <speed>0.238902</speed>
+  <name>TP0536</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706729370" lon="11.969202907">
+  <ele>75.752899</ele>
+<time>2008-01-27T14:58:11Z</time>
+  <course>252.173355</course>
+  <speed>0.108655</speed>
+  <name>TP0537</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706729435" lon="11.969200591">
+  <ele>75.710106</ele>
+<time>2008-01-27T14:58:16Z</time>
+  <course>252.173355</course>
+  <speed>0.462379</speed>
+  <name>TP0538</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706702970" lon="11.969112870">
+  <ele>76.153221</ele>
+<time>2008-01-27T14:58:21Z</time>
+  <course>254.655457</course>
+  <speed>1.900736</speed>
+  <name>TP0539</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706633676" lon="11.969038162">
+  <ele>76.254158</ele>
+<time>2008-01-27T14:58:26Z</time>
+  <course>254.655457</course>
+  <speed>1.152747</speed>
+  <name>TP0540</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706621474" lon="11.968909727">
+  <ele>76.716095</ele>
+<time>2008-01-27T14:58:31Z</time>
+  <course>254.655457</course>
+  <speed>0.652538</speed>
+  <name>TP0541</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706611997" lon="11.968853803">
+  <ele>75.835052</ele>
+<time>2008-01-27T14:58:36Z</time>
+  <course>254.655457</course>
+  <speed>0.137812</speed>
+  <name>TP0542</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706610598" lon="11.968846033">
+  <ele>76.115974</ele>
+<time>2008-01-27T14:58:41Z</time>
+  <course>254.655457</course>
+  <speed>0.109070</speed>
+  <name>TP0543</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706609074" lon="11.968839344">
+  <ele>76.290184</ele>
+<time>2008-01-27T14:58:46Z</time>
+  <course>254.655457</course>
+  <speed>0.408361</speed>
+  <name>TP0544</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706582458" lon="11.968766447">
+  <ele>75.969826</ele>
+<time>2008-01-27T14:58:51Z</time>
+  <course>254.655457</course>
+  <speed>1.837645</speed>
+  <name>TP0545</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706521015" lon="11.968529483">
+  <ele>77.609825</ele>
+<time>2008-01-27T14:58:56Z</time>
+  <course>235.926590</course>
+  <speed>2.912988</speed>
+  <name>TP0546</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706387780" lon="11.968257774">
+  <ele>71.655617</ele>
+<time>2008-01-27T14:59:01Z</time>
+  <course>270.661957</course>
+  <speed>4.142350</speed>
+  <name>TP0547</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706369450" lon="11.967759842">
+  <ele>71.099152</ele>
+<time>2008-01-27T14:59:06Z</time>
+  <course>250.093170</course>
+  <speed>6.080375</speed>
+  <name>TP0548</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706289877" lon="11.967199417">
+  <ele>70.996956</ele>
+<time>2008-01-27T14:59:11Z</time>
+  <course>252.321228</course>
+  <speed>6.561866</speed>
+  <name>TP0549</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.706286052" lon="11.966612946">
+  <ele>69.959251</ele>
+<time>2008-01-27T14:59:16Z</time>
+  <course>257.005981</course>
+  <speed>6.805053</speed>
+  <name>TP0550</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706223841" lon="11.966022069">
+  <ele>68.321487</ele>
+<time>2008-01-27T14:59:21Z</time>
+  <course>257.831085</course>
+  <speed>6.886487</speed>
+  <name>TP0551</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.706153563" lon="11.965410008">
+  <ele>66.696541</ele>
+<time>2008-01-27T14:59:26Z</time>
+  <course>254.512512</course>
+  <speed>7.342045</speed>
+  <name>TP0552</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706045715" lon="11.964802869">
+  <ele>66.792625</ele>
+<time>2008-01-27T14:59:31Z</time>
+  <course>254.280838</course>
+  <speed>7.414184</speed>
+  <name>TP0553</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705963852" lon="11.964192094">
+  <ele>64.470802</ele>
+<time>2008-01-27T14:59:36Z</time>
+  <course>252.652267</course>
+  <speed>6.798974</speed>
+  <name>TP0554</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705943170" lon="11.963617982">
+  <ele>75.614906</ele>
+<time>2008-01-27T14:59:41Z</time>
+  <course>250.405945</course>
+  <speed>5.200852</speed>
+  <name>TP0555</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705915454" lon="11.963256803">
+  <ele>87.300972</ele>
+<time>2008-01-27T14:59:46Z</time>
+  <course>243.778580</course>
+  <speed>4.224462</speed>
+  <name>TP0556</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705843186" lon="11.962969964">
+  <ele>89.645264</ele>
+<time>2008-01-27T14:59:51Z</time>
+  <course>220.766418</course>
+  <speed>4.433956</speed>
+  <name>TP0557</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705677805" lon="11.962895954">
+  <ele>89.481583</ele>
+<time>2008-01-27T14:59:56Z</time>
+  <course>160.027557</course>
+  <speed>2.849619</speed>
+  <name>TP0558</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705521076" lon="11.963068748">
+  <ele>92.977280</ele>
+<time>2008-01-27T15:00:01Z</time>
+  <course>157.697861</course>
+  <speed>3.073200</speed>
+  <name>TP0559</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705354897" lon="11.963201698">
+  <ele>92.839066</ele>
+<time>2008-01-27T15:00:06Z</time>
+  <course>156.207596</course>
+  <speed>2.867080</speed>
+  <name>TP0560</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705196518" lon="11.963281685">
+  <ele>93.679314</ele>
+<time>2008-01-27T15:00:11Z</time>
+  <course>153.436081</course>
+  <speed>1.521562</speed>
+  <name>TP0561</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705104488" lon="11.963320906">
+  <ele>93.570442</ele>
+<time>2008-01-27T15:00:16Z</time>
+  <course>152.649536</course>
+  <speed>1.055535</speed>
+  <name>TP0562</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.705001159" lon="11.963385745">
+  <ele>94.494698</ele>
+<time>2008-01-27T15:00:21Z</time>
+  <course>152.642792</course>
+  <speed>1.342988</speed>
+  <name>TP0563</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704888623" lon="11.963493546">
+  <ele>94.901642</ele>
+<time>2008-01-27T15:00:26Z</time>
+  <course>152.777771</course>
+  <speed>1.967363</speed>
+  <name>TP0564</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704678574" lon="11.963666622">
+  <ele>91.328278</ele>
+<time>2008-01-27T15:00:31Z</time>
+  <course>165.346649</course>
+  <speed>2.701397</speed>
+  <name>TP0565</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704587469" lon="11.963856805">
+  <ele>88.451477</ele>
+<time>2008-01-27T15:00:36Z</time>
+  <course>161.263718</course>
+  <speed>0.906314</speed>
+  <name>TP0566</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.704618007" lon="11.963851219">
+  <ele>91.141930</ele>
+<time>2008-01-27T15:00:41Z</time>
+  <course>161.263718</course>
+  <speed>0.284965</speed>
+  <name>TP0567</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704623932" lon="11.963854870">
+  <ele>92.172508</ele>
+<time>2008-01-27T15:00:46Z</time>
+  <course>161.263718</course>
+  <speed>0.147965</speed>
+  <name>TP0568</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704617767" lon="11.963851131">
+  <ele>92.461258</ele>
+<time>2008-01-27T15:00:51Z</time>
+  <course>161.263718</course>
+  <speed>0.056669</speed>
+  <name>TP0569</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704618949" lon="11.963853164">
+  <ele>92.556870</ele>
+<time>2008-01-27T15:00:56Z</time>
+  <course>161.263718</course>
+  <speed>0.022265</speed>
+  <name>TP0570</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704614933" lon="11.963851338">
+  <ele>92.568306</ele>
+<time>2008-01-27T15:01:01Z</time>
+  <course>161.263718</course>
+  <speed>0.183284</speed>
+  <name>TP0571</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704505111" lon="11.963849934">
+  <ele>92.270767</ele>
+<time>2008-01-27T15:01:06Z</time>
+  <course>164.544937</course>
+  <speed>5.004238</speed>
+  <name>TP0572</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.704210826" lon="11.963895383">
+  <ele>94.230118</ele>
+<time>2008-01-27T15:01:11Z</time>
+  <course>171.067032</course>
+  <speed>5.614787</speed>
+  <name>TP0573</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703961623" lon="11.964081413">
+  <ele>94.349472</ele>
+<time>2008-01-27T15:01:16Z</time>
+  <course>156.786514</course>
+  <speed>5.158871</speed>
+  <name>TP0574</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703689141" lon="11.964229107">
+  <ele>95.782722</ele>
+<time>2008-01-27T15:01:21Z</time>
+  <course>164.016251</course>
+  <speed>5.224937</speed>
+  <name>TP0575</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703504721" lon="11.964306338">
+  <ele>96.110352</ele>
+<time>2008-01-27T15:01:26Z</time>
+  <course>153.969543</course>
+  <speed>1.648952</speed>
+  <name>TP0576</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703374706" lon="11.964367893">
+  <ele>98.264450</ele>
+<time>2008-01-27T15:01:31Z</time>
+  <course>171.187561</course>
+  <speed>2.143247</speed>
+  <name>TP0577</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703182953" lon="11.964365253">
+  <ele>101.903290</ele>
+<time>2008-01-27T15:01:36Z</time>
+  <course>199.763306</course>
+  <speed>3.322761</speed>
+  <name>TP0578</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.703022276" lon="11.964246776">
+  <ele>100.908432</ele>
+<time>2008-01-27T15:01:41Z</time>
+  <course>249.578110</course>
+  <speed>2.721004</speed>
+  <name>TP0579</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702874326" lon="11.963993436">
+  <ele>98.441101</ele>
+<time>2008-01-27T15:01:46Z</time>
+  <course>224.093170</course>
+  <speed>1.696266</speed>
+  <name>TP0580</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702809312" lon="11.963962254">
+  <ele>99.395744</ele>
+<time>2008-01-27T15:01:51Z</time>
+  <course>224.093170</course>
+  <speed>0.479865</speed>
+  <name>TP0581</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702789387" lon="11.963976047">
+  <ele>101.543945</ele>
+<time>2008-01-27T15:01:56Z</time>
+  <course>224.093170</course>
+  <speed>0.332091</speed>
+  <name>TP0582</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702774201" lon="11.963985791">
+  <ele>103.097824</ele>
+<time>2008-01-27T15:02:01Z</time>
+  <course>224.093170</course>
+  <speed>0.526310</speed>
+  <name>TP0583</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702749737" lon="11.964036892">
+  <ele>104.490097</ele>
+<time>2008-01-27T15:02:06Z</time>
+  <course>224.093170</course>
+  <speed>0.660789</speed>
+  <name>TP0584</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702525822" lon="11.963993613">
+  <ele>104.127480</ele>
+<time>2008-01-27T15:02:11Z</time>
+  <course>224.093170</course>
+  <speed>1.696152</speed>
+  <name>TP0585</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.702073321" lon="11.964102026">
+  <ele>96.356079</ele>
+<time>2008-01-27T15:02:16Z</time>
+  <course>235.937607</course>
+  <speed>4.850880</speed>
+  <name>TP0586</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701923629" lon="11.963715814">
+  <ele>97.139885</ele>
+<time>2008-01-27T15:02:21Z</time>
+  <course>224.755081</course>
+  <speed>4.737071</speed>
+  <name>TP0587</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701699739" lon="11.963589942">
+  <ele>104.117126</ele>
+<time>2008-01-27T15:02:26Z</time>
+  <course>173.331863</course>
+  <speed>6.159349</speed>
+  <name>TP0588</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701394709" lon="11.963712012">
+  <ele>106.810539</ele>
+<time>2008-01-27T15:02:31Z</time>
+  <course>164.963943</course>
+  <speed>6.170879</speed>
+  <name>TP0589</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.701177417" lon="11.963957311">
+  <ele>106.014999</ele>
+<time>2008-01-27T15:02:36Z</time>
+  <course>155.442062</course>
+  <speed>8.220444</speed>
+  <name>TP0590</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700983886" lon="11.964153305">
+  <ele>97.538269</ele>
+<time>2008-01-27T15:02:41Z</time>
+  <course>163.367905</course>
+  <speed>8.647255</speed>
+  <name>TP0591</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.700625195" lon="11.964369269">
+  <ele>82.294998</ele>
+<time>2008-01-27T15:02:46Z</time>
+  <course>163.726883</course>
+  <speed>6.578135</speed>
+  <name>TP0592</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.700461355" lon="11.964561233">
+  <ele>78.952164</ele>
+<time>2008-01-27T15:02:51Z</time>
+  <course>149.311813</course>
+  <speed>3.167568</speed>
+  <name>TP0593</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700303239" lon="11.964643612">
+  <ele>77.490852</ele>
+<time>2008-01-27T15:02:56Z</time>
+  <course>163.787460</course>
+  <speed>2.939131</speed>
+  <name>TP0594</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.700128081" lon="11.964669251">
+  <ele>76.258820</ele>
+<time>2008-01-27T15:03:01Z</time>
+  <course>187.778702</course>
+  <speed>4.358074</speed>
+  <name>TP0595</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699922389" lon="11.964395860">
+  <ele>73.744034</ele>
+<time>2008-01-27T15:03:06Z</time>
+  <course>232.966171</course>
+  <speed>4.367199</speed>
+  <name>TP0596</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699827872" lon="11.964054804">
+  <ele>74.384712</ele>
+<time>2008-01-27T15:03:11Z</time>
+  <course>252.393066</course>
+  <speed>4.181055</speed>
+  <name>TP0597</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699730717" lon="11.963685054">
+  <ele>74.801178</ele>
+<time>2008-01-27T15:03:16Z</time>
+  <course>252.462280</course>
+  <speed>3.949225</speed>
+  <name>TP0598</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699674152" lon="11.963392867">
+  <ele>75.366821</ele>
+<time>2008-01-27T15:03:21Z</time>
+  <course>269.982666</course>
+  <speed>2.711499</speed>
+  <name>TP0599</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699590078" lon="11.963112150">
+  <ele>72.100449</ele>
+<time>2008-01-27T15:03:26Z</time>
+  <course>293.740234</course>
+  <speed>2.055697</speed>
+  <name>TP0600</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699510047" lon="11.962974996">
+  <ele>66.799866</ele>
+<time>2008-01-27T15:03:31Z</time>
+  <course>296.089447</course>
+  <speed>0.724753</speed>
+  <name>TP0601</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699514644" lon="11.962946448">
+  <ele>64.158058</ele>
+<time>2008-01-27T15:03:36Z</time>
+  <course>296.089447</course>
+  <speed>0.137567</speed>
+  <name>TP0602</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699518282" lon="11.962946036">
+  <ele>64.078674</ele>
+<time>2008-01-27T15:03:41Z</time>
+  <course>296.089447</course>
+  <speed>0.298599</speed>
+  <name>TP0603</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699551563" lon="11.962808437">
+  <ele>63.929432</ele>
+<time>2008-01-27T15:03:46Z</time>
+  <course>284.483185</course>
+  <speed>1.926650</speed>
+  <name>TP0604</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699558262" lon="11.962624634">
+  <ele>65.153625</ele>
+<time>2008-01-27T15:03:51Z</time>
+  <course>285.790466</course>
+  <speed>1.220710</speed>
+  <name>TP0605</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699566616" lon="11.962460134">
+  <ele>64.653687</ele>
+<time>2008-01-27T15:03:56Z</time>
+  <course>285.790466</course>
+  <speed>0.452739</speed>
+  <name>TP0606</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699556394" lon="11.962441908">
+  <ele>64.874718</ele>
+<time>2008-01-27T15:04:01Z</time>
+  <course>285.790466</course>
+  <speed>0.111421</speed>
+  <name>TP0607</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699558586" lon="11.962441053">
+  <ele>64.960991</ele>
+<time>2008-01-27T15:04:06Z</time>
+  <course>285.790466</course>
+  <speed>0.247384</speed>
+  <name>TP0608</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699567602" lon="11.962444163">
+  <ele>65.153725</ele>
+<time>2008-01-27T15:04:11Z</time>
+  <course>285.790466</course>
+  <speed>0.091423</speed>
+  <name>TP0609</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699570870" lon="11.962444491">
+  <ele>65.226273</ele>
+<time>2008-01-27T15:04:16Z</time>
+  <course>285.790466</course>
+  <speed>0.102427</speed>
+  <name>TP0610</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699573810" lon="11.962362049">
+  <ele>65.064758</ele>
+<time>2008-01-27T15:04:21Z</time>
+  <course>285.790466</course>
+  <speed>1.994403</speed>
+  <name>TP0611</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699596104" lon="11.962082200">
+  <ele>63.407185</ele>
+<time>2008-01-27T15:04:26Z</time>
+  <course>277.764008</course>
+  <speed>2.465961</speed>
+  <name>TP0612</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699491789" lon="11.961957912">
+  <ele>55.832211</ele>
+<time>2008-01-27T15:04:31Z</time>
+  <course>277.764008</course>
+  <speed>0.090825</speed>
+  <name>TP0613</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699485768" lon="11.961932809">
+  <ele>53.711098</ele>
+<time>2008-01-27T15:04:36Z</time>
+  <course>277.764008</course>
+  <speed>0.055088</speed>
+  <name>TP0614</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699489761" lon="11.961933982">
+  <ele>52.842609</ele>
+<time>2008-01-27T15:04:41Z</time>
+  <course>277.764008</course>
+  <speed>0.138732</speed>
+  <name>TP0615</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699494145" lon="11.961935914">
+  <ele>52.360691</ele>
+<time>2008-01-27T15:04:46Z</time>
+  <course>277.764008</course>
+  <speed>0.054629</speed>
+  <name>TP0616</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699493852" lon="11.961935038">
+  <ele>52.087082</ele>
+<time>2008-01-27T15:04:51Z</time>
+  <course>277.764008</course>
+  <speed>0.087364</speed>
+  <name>TP0617</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699494222" lon="11.961934948">
+  <ele>51.983650</ele>
+<time>2008-01-27T15:04:56Z</time>
+  <course>277.764008</course>
+  <speed>0.027993</speed>
+  <name>TP0618</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699493481" lon="11.961933964">
+  <ele>51.904427</ele>
+<time>2008-01-27T15:05:01Z</time>
+  <course>277.764008</course>
+  <speed>0.081911</speed>
+  <name>TP0619</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699496369" lon="11.961934831">
+  <ele>51.771957</ele>
+<time>2008-01-27T15:05:06Z</time>
+  <course>277.764008</course>
+  <speed>0.109910</speed>
+  <name>TP0620</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699501562" lon="11.961937680">
+  <ele>51.689781</ele>
+<time>2008-01-27T15:05:11Z</time>
+  <course>277.764008</course>
+  <speed>0.097580</speed>
+  <name>TP0621</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699500971" lon="11.961937507">
+  <ele>51.793804</ele>
+<time>2008-01-27T15:05:16Z</time>
+  <course>277.764008</course>
+  <speed>0.070407</speed>
+  <name>TP0622</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699517067" lon="11.961828410">
+  <ele>51.982742</ele>
+<time>2008-01-27T15:05:21Z</time>
+  <course>276.801270</course>
+  <speed>3.207483</speed>
+  <name>TP0623</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699559926" lon="11.961279915">
+  <ele>51.772163</ele>
+<time>2008-01-27T15:05:26Z</time>
+  <course>275.905151</course>
+  <speed>7.975478</speed>
+  <name>TP0624</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699546407" lon="11.960482659">
+  <ele>50.279926</ele>
+<time>2008-01-27T15:05:31Z</time>
+  <course>271.913940</course>
+  <speed>9.741137</speed>
+  <name>TP0625</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699593244" lon="11.959533529">
+  <ele>48.527409</ele>
+<time>2008-01-27T15:05:36Z</time>
+  <course>277.201416</course>
+  <speed>11.196484</speed>
+  <name>TP0626</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699641694" lon="11.958591885">
+  <ele>45.675247</ele>
+<time>2008-01-27T15:05:41Z</time>
+  <course>273.109436</course>
+  <speed>10.200502</speed>
+  <name>TP0627</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699672808" lon="11.957906314">
+  <ele>43.748550</ele>
+<time>2008-01-27T15:05:46Z</time>
+  <course>275.711426</course>
+  <speed>6.957187</speed>
+  <name>TP0628</name>
+  <fix>3d</fix>
+  <sat>5</sat>
+</trkpt>
+<trkpt lat="57.699676444" lon="11.957452402">
+  <ele>41.485603</ele>
+<time>2008-01-27T15:05:51Z</time>
+  <course>275.435974</course>
+  <speed>5.577154</speed>
+  <name>TP0629</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699711791" lon="11.956897483">
+  <ele>42.652260</ele>
+<time>2008-01-27T15:05:56Z</time>
+  <course>273.934418</course>
+  <speed>7.368284</speed>
+  <name>TP0630</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699718622" lon="11.956252159">
+  <ele>42.952404</ele>
+<time>2008-01-27T15:06:01Z</time>
+  <course>277.044312</course>
+  <speed>7.835956</speed>
+  <name>TP0631</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699765911" lon="11.955613998">
+  <ele>41.938480</ele>
+<time>2008-01-27T15:06:06Z</time>
+  <course>284.357452</course>
+  <speed>6.492126</speed>
+  <name>TP0632</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699811903" lon="11.955109096">
+  <ele>42.699963</ele>
+<time>2008-01-27T15:06:11Z</time>
+  <course>279.845184</course>
+  <speed>5.134217</speed>
+  <name>TP0633</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699837289" lon="11.954683165">
+  <ele>42.642509</ele>
+<time>2008-01-27T15:06:16Z</time>
+  <course>279.834869</course>
+  <speed>5.055449</speed>
+  <name>TP0634</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699884187" lon="11.954261461">
+  <ele>39.983074</ele>
+<time>2008-01-27T15:06:21Z</time>
+  <course>283.039490</course>
+  <speed>4.805838</speed>
+  <name>TP0635</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699907757" lon="11.953873092">
+  <ele>39.922935</ele>
+<time>2008-01-27T15:06:26Z</time>
+  <course>281.840302</course>
+  <speed>4.442781</speed>
+  <name>TP0636</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699890076" lon="11.953574367">
+  <ele>42.504242</ele>
+<time>2008-01-27T15:06:31Z</time>
+  <course>254.771011</course>
+  <speed>4.003201</speed>
+  <name>TP0637</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699854386" lon="11.953451257">
+  <ele>54.257427</ele>
+<time>2008-01-27T15:06:36Z</time>
+  <course>217.023911</course>
+  <speed>1.486765</speed>
+  <name>TP0638</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699875919" lon="11.953419932">
+  <ele>60.191071</ele>
+<time>2008-01-27T15:06:41Z</time>
+  <course>217.023911</course>
+  <speed>0.421906</speed>
+  <name>TP0639</name>
+  <fix>3d</fix>
+  <sat>9</sat>
+</trkpt>
+<trkpt lat="57.699911879" lon="11.953465396">
+  <ele>60.932205</ele>
+<time>2008-01-27T15:06:46Z</time>
+  <course>217.023911</course>
+  <speed>0.718218</speed>
+  <name>TP0640</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699927305" lon="11.953492730">
+  <ele>57.798515</ele>
+<time>2008-01-27T15:06:51Z</time>
+  <course>217.023911</course>
+  <speed>1.650865</speed>
+  <name>TP0641</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699944121" lon="11.953428165">
+  <ele>56.948818</ele>
+<time>2008-01-27T15:06:56Z</time>
+  <course>217.023911</course>
+  <speed>0.651361</speed>
+  <name>TP0642</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699938846" lon="11.953309355">
+  <ele>54.779488</ele>
+<time>2008-01-27T15:07:01Z</time>
+  <course>217.023911</course>
+  <speed>1.091384</speed>
+  <name>TP0643</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699934396" lon="11.953215558">
+  <ele>53.241680</ele>
+<time>2008-01-27T15:07:06Z</time>
+  <course>218.496490</course>
+  <speed>0.449520</speed>
+  <name>TP0644</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699943796" lon="11.953197620">
+  <ele>53.076332</ele>
+<time>2008-01-27T15:07:11Z</time>
+  <course>218.496490</course>
+  <speed>0.360533</speed>
+  <name>TP0645</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699935020" lon="11.953148247">
+  <ele>52.866653</ele>
+<time>2008-01-27T15:07:16Z</time>
+  <course>218.496490</course>
+  <speed>0.528669</speed>
+  <name>TP0646</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699926600" lon="11.953080981">
+  <ele>52.972622</ele>
+<time>2008-01-27T15:07:21Z</time>
+  <course>218.496490</course>
+  <speed>1.096580</speed>
+  <name>TP0647</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699942919" lon="11.952982565">
+  <ele>53.538147</ele>
+<time>2008-01-27T15:07:26Z</time>
+  <course>218.496490</course>
+  <speed>0.625899</speed>
+  <name>TP0648</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699942210" lon="11.952932497">
+  <ele>54.323326</ele>
+<time>2008-01-27T15:07:31Z</time>
+  <course>218.496490</course>
+  <speed>0.327272</speed>
+  <name>TP0649</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699937095" lon="11.952929140">
+  <ele>54.677227</ele>
+<time>2008-01-27T15:07:36Z</time>
+  <course>218.496490</course>
+  <speed>0.018773</speed>
+  <name>TP0650</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699936301" lon="11.952900552">
+  <ele>54.826538</ele>
+<time>2008-01-27T15:07:41Z</time>
+  <course>218.496490</course>
+  <speed>0.505743</speed>
+  <name>TP0651</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699918739" lon="11.952914400">
+  <ele>55.053116</ele>
+<time>2008-01-27T15:07:46Z</time>
+  <course>218.496490</course>
+  <speed>0.432382</speed>
+  <name>TP0652</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699919614" lon="11.952919481">
+  <ele>55.106789</ele>
+<time>2008-01-27T15:07:51Z</time>
+  <course>218.496490</course>
+  <speed>0.058583</speed>
+  <name>TP0653</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699920340" lon="11.952923572">
+  <ele>55.116531</ele>
+<time>2008-01-27T15:07:56Z</time>
+  <course>218.496490</course>
+  <speed>0.006754</speed>
+  <name>TP0654</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699920199" lon="11.952922587">
+  <ele>55.115917</ele>
+<time>2008-01-27T15:08:01Z</time>
+  <course>218.496490</course>
+  <speed>0.002260</speed>
+  <name>TP0655</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699920870" lon="11.952921795">
+  <ele>55.117039</ele>
+<time>2008-01-27T15:08:06Z</time>
+  <course>218.496490</course>
+  <speed>0.001856</speed>
+  <name>TP0656</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699921055" lon="11.952920961">
+  <ele>55.136143</ele>
+<time>2008-01-27T15:08:11Z</time>
+  <course>218.496490</course>
+  <speed>0.000805</speed>
+  <name>TP0657</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699920782" lon="11.952920308">
+  <ele>55.148487</ele>
+<time>2008-01-27T15:08:16Z</time>
+  <course>218.496490</course>
+  <speed>0.007480</speed>
+  <name>TP0658</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699920728" lon="11.952920861">
+  <ele>55.162659</ele>
+<time>2008-01-27T15:08:21Z</time>
+  <course>218.496490</course>
+  <speed>0.007337</speed>
+  <name>TP0659</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699921713" lon="11.952922607">
+  <ele>55.205227</ele>
+<time>2008-01-27T15:08:26Z</time>
+  <course>218.496490</course>
+  <speed>0.046721</speed>
+  <name>TP0660</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699922222" lon="11.952924244">
+  <ele>55.188232</ele>
+<time>2008-01-27T15:08:31Z</time>
+  <course>218.496490</course>
+  <speed>0.001944</speed>
+  <name>TP0661</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699922684" lon="11.952924568">
+  <ele>55.159225</ele>
+<time>2008-01-27T15:08:36Z</time>
+  <course>218.496490</course>
+  <speed>0.000416</speed>
+  <name>TP0662</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699923046" lon="11.952924923">
+  <ele>55.142086</ele>
+<time>2008-01-27T15:08:41Z</time>
+  <course>218.496490</course>
+  <speed>0.009314</speed>
+  <name>TP0663</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699923266" lon="11.952925204">
+  <ele>55.137108</ele>
+<time>2008-01-27T15:08:46Z</time>
+  <course>218.496490</course>
+  <speed>0.001668</speed>
+  <name>TP0664</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699923605" lon="11.952925146">
+  <ele>55.102448</ele>
+<time>2008-01-27T15:08:51Z</time>
+  <course>218.496490</course>
+  <speed>0.007567</speed>
+  <name>TP0665</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699927974" lon="11.952919524">
+  <ele>55.135281</ele>
+<time>2008-01-27T15:08:56Z</time>
+  <course>218.496490</course>
+  <speed>0.269319</speed>
+  <name>TP0666</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699939185" lon="11.952908667">
+  <ele>55.178482</ele>
+<time>2008-01-27T15:09:01Z</time>
+  <course>218.496490</course>
+  <speed>0.262931</speed>
+  <name>TP0667</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699944583" lon="11.952898064">
+  <ele>55.160194</ele>
+<time>2008-01-27T15:09:06Z</time>
+  <course>218.496490</course>
+  <speed>0.002955</speed>
+  <name>TP0668</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699944599" lon="11.952898187">
+  <ele>55.152924</ele>
+<time>2008-01-27T15:09:11Z</time>
+  <course>218.496490</course>
+  <speed>0.040493</speed>
+  <name>TP0669</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699945028" lon="11.952900434">
+  <ele>55.263668</ele>
+<time>2008-01-27T15:09:16Z</time>
+  <course>218.496490</course>
+  <speed>0.005129</speed>
+  <name>TP0670</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699945292" lon="11.952901285">
+  <ele>55.369980</ele>
+<time>2008-01-27T15:09:21Z</time>
+  <course>218.496490</course>
+  <speed>0.035897</speed>
+  <name>TP0671</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699945336" lon="11.952903132">
+  <ele>55.426929</ele>
+<time>2008-01-27T15:09:26Z</time>
+  <course>218.496490</course>
+  <speed>0.004630</speed>
+  <name>TP0672</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699945648" lon="11.952904661">
+  <ele>55.402885</ele>
+<time>2008-01-27T15:09:31Z</time>
+  <course>218.496490</course>
+  <speed>0.000865</speed>
+  <name>TP0673</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699947667" lon="11.952907039">
+  <ele>55.452240</ele>
+<time>2008-01-27T15:09:36Z</time>
+  <course>218.496490</course>
+  <speed>0.001837</speed>
+  <name>TP0674</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699948818" lon="11.952909106">
+  <ele>55.465645</ele>
+<time>2008-01-27T15:09:41Z</time>
+  <course>218.496490</course>
+  <speed>0.002016</speed>
+  <name>TP0675</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699949074" lon="11.952910467">
+  <ele>55.428730</ele>
+<time>2008-01-27T15:09:46Z</time>
+  <course>218.496490</course>
+  <speed>0.001942</speed>
+  <name>TP0676</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699948933" lon="11.952911661">
+  <ele>55.371540</ele>
+<time>2008-01-27T15:09:51Z</time>
+  <course>218.496490</course>
+  <speed>0.004365</speed>
+  <name>TP0677</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699949643" lon="11.952911730">
+  <ele>55.368378</ele>
+<time>2008-01-27T15:09:56Z</time>
+  <course>218.496490</course>
+  <speed>0.001333</speed>
+  <name>TP0678</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699950219" lon="11.952911931">
+  <ele>55.364956</ele>
+<time>2008-01-27T15:10:01Z</time>
+  <course>218.496490</course>
+  <speed>0.001297</speed>
+  <name>TP0679</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699950736" lon="11.952912661">
+  <ele>55.386986</ele>
+<time>2008-01-27T15:10:06Z</time>
+  <course>218.496490</course>
+  <speed>0.002019</speed>
+  <name>TP0680</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699951350" lon="11.952913599">
+  <ele>55.424679</ele>
+<time>2008-01-27T15:10:11Z</time>
+  <course>218.496490</course>
+  <speed>0.003237</speed>
+  <name>TP0681</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699951642" lon="11.952913734">
+  <ele>55.468376</ele>
+<time>2008-01-27T15:10:16Z</time>
+  <course>218.496490</course>
+  <speed>0.001680</speed>
+  <name>TP0682</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699952149" lon="11.952914300">
+  <ele>55.533737</ele>
+<time>2008-01-27T15:10:21Z</time>
+  <course>218.496490</course>
+  <speed>0.045060</speed>
+  <name>TP0683</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699953300" lon="11.952915278">
+  <ele>55.539864</ele>
+<time>2008-01-27T15:10:26Z</time>
+  <course>218.496490</course>
+  <speed>0.001506</speed>
+  <name>TP0684</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699953515" lon="11.952915799">
+  <ele>55.562237</ele>
+<time>2008-01-27T15:10:31Z</time>
+  <course>218.496490</course>
+  <speed>0.239861</speed>
+  <name>TP0685</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699957108" lon="11.952943420">
+  <ele>55.626358</ele>
+<time>2008-01-27T15:10:36Z</time>
+  <course>218.496490</course>
+  <speed>0.197063</speed>
+  <name>TP0686</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699956610" lon="11.952962370">
+  <ele>55.744625</ele>
+<time>2008-01-27T15:10:41Z</time>
+  <course>218.496490</course>
+  <speed>0.055380</speed>
+  <name>TP0687</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699956712" lon="11.952961188">
+  <ele>55.884129</ele>
+<time>2008-01-27T15:10:46Z</time>
+  <course>218.496490</course>
+  <speed>0.050798</speed>
+  <name>TP0688</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699955827" lon="11.952958002">
+  <ele>55.963707</ele>
+<time>2008-01-27T15:10:51Z</time>
+  <course>218.496490</course>
+  <speed>0.103979</speed>
+  <name>TP0689</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699962323" lon="11.952964102">
+  <ele>56.060684</ele>
+<time>2008-01-27T15:10:56Z</time>
+  <course>218.496490</course>
+  <speed>0.118978</speed>
+  <name>TP0690</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699962554" lon="11.952963685">
+  <ele>56.129726</ele>
+<time>2008-01-27T15:11:01Z</time>
+  <course>218.496490</course>
+  <speed>0.057695</speed>
+  <name>TP0691</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699962474" lon="11.952965140">
+  <ele>56.174274</ele>
+<time>2008-01-27T15:11:06Z</time>
+  <course>218.496490</course>
+  <speed>0.059240</speed>
+  <name>TP0692</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699963082" lon="11.952968505">
+  <ele>56.225285</ele>
+<time>2008-01-27T15:11:11Z</time>
+  <course>218.496490</course>
+  <speed>0.201704</speed>
+  <name>TP0693</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699962112" lon="11.952960115">
+  <ele>56.230228</ele>
+<time>2008-01-27T15:11:16Z</time>
+  <course>218.496490</course>
+  <speed>0.397796</speed>
+  <name>TP0694</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699955902" lon="11.952936874">
+  <ele>56.249668</ele>
+<time>2008-01-27T15:11:21Z</time>
+  <course>218.496490</course>
+  <speed>0.045781</speed>
+  <name>TP0695</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699956772" lon="11.952938435">
+  <ele>56.405598</ele>
+<time>2008-01-27T15:11:26Z</time>
+  <course>218.496490</course>
+  <speed>0.098648</speed>
+  <name>TP0696</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699956625" lon="11.952927863">
+  <ele>56.498055</ele>
+<time>2008-01-27T15:11:31Z</time>
+  <course>218.496490</course>
+  <speed>1.669990</speed>
+  <name>TP0697</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699971868" lon="11.952891545">
+  <ele>56.564190</ele>
+<time>2008-01-27T15:11:36Z</time>
+  <course>218.496490</course>
+  <speed>0.197046</speed>
+  <name>TP0698</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699969522" lon="11.952871303">
+  <ele>56.543667</ele>
+<time>2008-01-27T15:11:41Z</time>
+  <course>218.496490</course>
+  <speed>0.086945</speed>
+  <name>TP0699</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699970723" lon="11.952878710">
+  <ele>56.581444</ele>
+<time>2008-01-27T15:11:46Z</time>
+  <course>218.496490</course>
+  <speed>0.237207</speed>
+  <name>TP0700</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699973506" lon="11.952893298">
+  <ele>56.630741</ele>
+<time>2008-01-27T15:11:51Z</time>
+  <course>218.496490</course>
+  <speed>0.278322</speed>
+  <name>TP0701</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699976723" lon="11.952908646">
+  <ele>56.684647</ele>
+<time>2008-01-27T15:11:56Z</time>
+  <course>218.496490</course>
+  <speed>0.168554</speed>
+  <name>TP0702</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699976083" lon="11.952912640">
+  <ele>56.785572</ele>
+<time>2008-01-27T15:12:01Z</time>
+  <course>218.496490</course>
+  <speed>0.189623</speed>
+  <name>TP0703</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699973468" lon="11.952896203">
+  <ele>56.875393</ele>
+<time>2008-01-27T15:12:06Z</time>
+  <course>218.496490</course>
+  <speed>0.205831</speed>
+  <name>TP0704</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699971249" lon="11.952879892">
+  <ele>56.934406</ele>
+<time>2008-01-27T15:12:11Z</time>
+  <course>218.496490</course>
+  <speed>0.146626</speed>
+  <name>TP0705</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699969323" lon="11.952864889">
+  <ele>56.986214</ele>
+<time>2008-01-27T15:12:16Z</time>
+  <course>218.496490</course>
+  <speed>0.204477</speed>
+  <name>TP0706</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699967601" lon="11.952844574">
+  <ele>57.043221</ele>
+<time>2008-01-27T15:12:21Z</time>
+  <course>218.496490</course>
+  <speed>0.206466</speed>
+  <name>TP0707</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699968809" lon="11.952847611">
+  <ele>57.112270</ele>
+<time>2008-01-27T15:12:26Z</time>
+  <course>218.496490</course>
+  <speed>0.285062</speed>
+  <name>TP0708</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699973562" lon="11.952879020">
+  <ele>57.175644</ele>
+<time>2008-01-27T15:12:31Z</time>
+  <course>218.496490</course>
+  <speed>0.962515</speed>
+  <name>TP0709</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699849121" lon="11.953252962">
+  <ele>56.505943</ele>
+<time>2008-01-27T15:12:36Z</time>
+  <course>86.427399</course>
+  <speed>5.513577</speed>
+  <name>TP0710</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699865180" lon="11.953857144">
+  <ele>56.468739</ele>
+<time>2008-01-27T15:12:41Z</time>
+  <course>96.587524</course>
+  <speed>6.088407</speed>
+  <name>TP0711</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699947206" lon="11.954556885">
+  <ele>58.681587</ele>
+<time>2008-01-27T15:12:46Z</time>
+  <course>99.175896</course>
+  <speed>7.924136</speed>
+  <name>TP0712</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699934187" lon="11.955259127">
+  <ele>59.009224</ele>
+<time>2008-01-27T15:12:51Z</time>
+  <course>97.125023</course>
+  <speed>6.783049</speed>
+  <name>TP0713</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699900251" lon="11.955945753">
+  <ele>58.753296</ele>
+<time>2008-01-27T15:12:56Z</time>
+  <course>98.056587</course>
+  <speed>7.935850</speed>
+  <name>TP0714</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699844889" lon="11.956682402">
+  <ele>61.154079</ele>
+<time>2008-01-27T15:13:01Z</time>
+  <course>95.442360</course>
+  <speed>6.358071</speed>
+  <name>TP0715</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699755760" lon="11.957160537">
+  <ele>58.161404</ele>
+<time>2008-01-27T15:13:06Z</time>
+  <course>100.822197</course>
+  <speed>3.633513</speed>
+  <name>TP0716</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699720958" lon="11.957412895">
+  <ele>56.524601</ele>
+<time>2008-01-27T15:13:11Z</time>
+  <course>100.060211</course>
+  <speed>1.667719</speed>
+  <name>TP0717</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699652975" lon="11.957519767">
+  <ele>51.497704</ele>
+<time>2008-01-27T15:13:16Z</time>
+  <course>100.060211</course>
+  <speed>0.945564</speed>
+  <name>TP0718</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699638963" lon="11.957837949">
+  <ele>49.657547</ele>
+<time>2008-01-27T15:13:21Z</time>
+  <course>97.457619</course>
+  <speed>5.678153</speed>
+  <name>TP0719</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699575899" lon="11.958569812">
+  <ele>47.381596</ele>
+<time>2008-01-27T15:13:26Z</time>
+  <course>97.820015</course>
+  <speed>8.726044</speed>
+  <name>TP0720</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699543126" lon="11.959268104">
+  <ele>45.864742</ele>
+<time>2008-01-27T15:13:31Z</time>
+  <course>96.406525</course>
+  <speed>7.575697</speed>
+  <name>TP0721</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699505774" lon="11.959893594">
+  <ele>44.151070</ele>
+<time>2008-01-27T15:13:36Z</time>
+  <course>99.171577</course>
+  <speed>6.320168</speed>
+  <name>TP0722</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699466396" lon="11.960413599">
+  <ele>43.129993</ele>
+<time>2008-01-27T15:13:41Z</time>
+  <course>96.029564</course>
+  <speed>5.716181</speed>
+  <name>TP0723</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699564142" lon="11.960881761">
+  <ele>42.655632</ele>
+<time>2008-01-27T15:13:46Z</time>
+  <course>87.960152</course>
+  <speed>5.187541</speed>
+  <name>TP0724</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699614278" lon="11.961304817">
+  <ele>47.126694</ele>
+<time>2008-01-27T15:13:51Z</time>
+  <course>94.451820</course>
+  <speed>4.599480</speed>
+  <name>TP0725</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699580132" lon="11.961678902">
+  <ele>45.114143</ele>
+<time>2008-01-27T15:13:56Z</time>
+  <course>89.539085</course>
+  <speed>1.616679</speed>
+  <name>TP0726</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699556463" lon="11.961757835">
+  <ele>43.373066</ele>
+<time>2008-01-27T15:14:01Z</time>
+  <course>89.539085</course>
+  <speed>0.130123</speed>
+  <name>TP0727</name>
+  <fix>3d</fix>
+  <sat>8</sat>
+</trkpt>
+<trkpt lat="57.699557203" lon="11.961768475">
+  <ele>42.926678</ele>
+<time>2008-01-27T15:14:06Z</time>
+  <course>89.539085</course>
+  <speed>0.037990</speed>
+  <name>TP0728</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699556862" lon="11.961771720">
+  <ele>42.838966</ele>
+<time>2008-01-27T15:14:11Z</time>
+  <course>89.539085</course>
+  <speed>0.066600</speed>
+  <name>TP0729</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699555896" lon="11.961769028">
+  <ele>42.808662</ele>
+<time>2008-01-27T15:14:16Z</time>
+  <course>89.539085</course>
+  <speed>0.032890</speed>
+  <name>TP0730</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699545844" lon="11.961855891">
+  <ele>42.931995</ele>
+<time>2008-01-27T15:14:21Z</time>
+  <course>89.725197</course>
+  <speed>1.613370</speed>
+  <name>TP0731</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699520999" lon="11.962033060">
+  <ele>42.628716</ele>
+<time>2008-01-27T15:14:26Z</time>
+  <course>76.366776</course>
+  <speed>1.858435</speed>
+  <name>TP0732</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699462045" lon="11.962171736">
+  <ele>43.564449</ele>
+<time>2008-01-27T15:14:31Z</time>
+  <course>76.366776</course>
+  <speed>1.088116</speed>
+  <name>TP0733</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699440954" lon="11.962246582">
+  <ele>43.326889</ele>
+<time>2008-01-27T15:14:36Z</time>
+  <course>76.366776</course>
+  <speed>0.334308</speed>
+  <name>TP0734</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699438584" lon="11.962241708">
+  <ele>43.177864</ele>
+<time>2008-01-27T15:14:41Z</time>
+  <course>76.366776</course>
+  <speed>0.121621</speed>
+  <name>TP0735</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699439187" lon="11.962252603">
+  <ele>43.118587</ele>
+<time>2008-01-27T15:14:46Z</time>
+  <course>76.366776</course>
+  <speed>0.180330</speed>
+  <name>TP0736</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699438289" lon="11.962255006">
+  <ele>42.983402</ele>
+<time>2008-01-27T15:14:51Z</time>
+  <course>76.366776</course>
+  <speed>0.220678</speed>
+  <name>TP0737</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699436922" lon="11.962259972">
+  <ele>42.937031</ele>
+<time>2008-01-27T15:14:56Z</time>
+  <course>76.366776</course>
+  <speed>0.209586</speed>
+  <name>TP0738</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699436616" lon="11.962274966">
+  <ele>42.942562</ele>
+<time>2008-01-27T15:15:01Z</time>
+  <course>76.366776</course>
+  <speed>0.383057</speed>
+  <name>TP0739</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699440270" lon="11.962306237">
+  <ele>42.979713</ele>
+<time>2008-01-27T15:15:06Z</time>
+  <course>76.366776</course>
+  <speed>0.535772</speed>
+  <name>TP0740</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699435546" lon="11.962362065">
+  <ele>43.011913</ele>
+<time>2008-01-27T15:15:11Z</time>
+  <course>76.366776</course>
+  <speed>1.207049</speed>
+  <name>TP0741</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699432720" lon="11.962760772">
+  <ele>43.784576</ele>
+<time>2008-01-27T15:15:16Z</time>
+  <course>49.888649</course>
+  <speed>2.445696</speed>
+  <name>TP0742</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699513986" lon="11.963014007">
+  <ele>43.211819</ele>
+<time>2008-01-27T15:15:21Z</time>
+  <course>52.977341</course>
+  <speed>1.469321</speed>
+  <name>TP0743</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699555647" lon="11.963181809">
+  <ele>42.772743</ele>
+<time>2008-01-27T15:15:26Z</time>
+  <course>52.977341</course>
+  <speed>0.912314</speed>
+  <name>TP0744</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.699583833" lon="11.963253823">
+  <ele>42.345959</ele>
+<time>2008-01-27T15:15:31Z</time>
+  <course>54.474190</course>
+  <speed>1.039766</speed>
+  <name>TP0745</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699627466" lon="11.963502095">
+  <ele>41.845848</ele>
+<time>2008-01-27T15:15:36Z</time>
+  <course>75.363075</course>
+  <speed>2.503152</speed>
+  <name>TP0746</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.699843504" lon="11.964098283">
+  <ele>41.465397</ele>
+<time>2008-01-27T15:15:41Z</time>
+  <course>18.042631</course>
+  <speed>4.031073</speed>
+  <name>TP0747</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.700102530" lon="11.964226055">
+  <ele>39.201557</ele>
+<time>2008-01-27T15:15:46Z</time>
+  <course>350.312469</course>
+  <speed>5.227849</speed>
+  <name>TP0748</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.700418477" lon="11.964097586">
+  <ele>34.905659</ele>
+<time>2008-01-27T15:15:51Z</time>
+  <course>338.893219</course>
+  <speed>7.202540</speed>
+  <name>TP0749</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.700755626" lon="11.963998873">
+  <ele>29.181751</ele>
+<time>2008-01-27T15:15:56Z</time>
+  <course>342.903381</course>
+  <speed>7.421690</speed>
+  <name>TP0750</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.701147879" lon="11.963834189">
+  <ele>26.025524</ele>
+<time>2008-01-27T15:16:01Z</time>
+  <course>338.657623</course>
+  <speed>8.680714</speed>
+  <name>TP0751</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.701490426" lon="11.963610483">
+  <ele>24.058689</ele>
+<time>2008-01-27T15:16:06Z</time>
+  <course>341.594208</course>
+  <speed>6.506355</speed>
+  <name>TP0752</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.701791636" lon="11.963398675">
+  <ele>24.503670</ele>
+<time>2008-01-27T15:16:11Z</time>
+  <course>334.948120</course>
+  <speed>5.052996</speed>
+  <name>TP0753</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702045197" lon="11.963252914">
+  <ele>21.750463</ele>
+<time>2008-01-27T15:16:16Z</time>
+  <course>339.453552</course>
+  <speed>4.743180</speed>
+  <name>TP0754</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702263058" lon="11.963225726">
+  <ele>21.274805</ele>
+<time>2008-01-27T15:16:21Z</time>
+  <course>21.269533</course>
+  <speed>3.732276</speed>
+  <name>TP0755</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702455783" lon="11.963405511">
+  <ele>24.930449</ele>
+<time>2008-01-27T15:16:26Z</time>
+  <course>57.253983</course>
+  <speed>2.689401</speed>
+  <name>TP0756</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702515996" lon="11.963538350">
+  <ele>23.571939</ele>
+<time>2008-01-27T15:16:31Z</time>
+  <course>57.935402</course>
+  <speed>0.575326</speed>
+  <name>TP0757</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702540729" lon="11.963530167">
+  <ele>21.758852</ele>
+<time>2008-01-27T15:16:36Z</time>
+  <course>57.935402</course>
+  <speed>0.272819</speed>
+  <name>TP0758</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702546897" lon="11.963525658">
+  <ele>20.467566</ele>
+<time>2008-01-27T15:16:41Z</time>
+  <course>57.935402</course>
+  <speed>0.075399</speed>
+  <name>TP0759</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702546474" lon="11.963525700">
+  <ele>20.074856</ele>
+<time>2008-01-27T15:16:46Z</time>
+  <course>57.935402</course>
+  <speed>0.070384</speed>
+  <name>TP0760</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702555318" lon="11.963521124">
+  <ele>19.931931</ele>
+<time>2008-01-27T15:16:51Z</time>
+  <course>57.935402</course>
+  <speed>0.713890</speed>
+  <name>TP0761</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702602076" lon="11.963766490">
+  <ele>20.842930</ele>
+<time>2008-01-27T15:16:56Z</time>
+  <course>63.193348</course>
+  <speed>3.130648</speed>
+  <name>TP0762</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702688212" lon="11.964082616">
+  <ele>21.649963</ele>
+<time>2008-01-27T15:17:01Z</time>
+  <course>68.431618</course>
+  <speed>3.442213</speed>
+  <name>TP0763</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.702855812" lon="11.964401722">
+  <ele>25.562002</ele>
+<time>2008-01-27T15:17:06Z</time>
+  <course>32.924171</course>
+  <speed>3.361054</speed>
+  <name>TP0764</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.703015889" lon="11.964419672">
+  <ele>26.968969</ele>
+<time>2008-01-27T15:17:11Z</time>
+  <course>344.355225</course>
+  <speed>4.310341</speed>
+  <name>TP0765</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.703239616" lon="11.964281221">
+  <ele>27.406101</ele>
+<time>2008-01-27T15:17:16Z</time>
+  <course>341.821838</course>
+  <speed>5.076190</speed>
+  <name>TP0766</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.703472221" lon="11.964122127">
+  <ele>27.535704</ele>
+<time>2008-01-27T15:17:21Z</time>
+  <course>339.747223</course>
+  <speed>4.408119</speed>
+  <name>TP0767</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.703718574" lon="11.964035776">
+  <ele>28.154795</ele>
+<time>2008-01-27T15:17:26Z</time>
+  <course>341.113464</course>
+  <speed>4.573566</speed>
+  <name>TP0768</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704017597" lon="11.963951433">
+  <ele>24.246796</ele>
+<time>2008-01-27T15:17:31Z</time>
+  <course>339.732819</course>
+  <speed>4.079585</speed>
+  <name>TP0769</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704236029" lon="11.963844527">
+  <ele>23.303711</ele>
+<time>2008-01-27T15:17:36Z</time>
+  <course>339.514862</course>
+  <speed>1.597809</speed>
+  <name>TP0770</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704272959" lon="11.963827601">
+  <ele>24.946005</ele>
+<time>2008-01-27T15:17:41Z</time>
+  <course>339.514862</course>
+  <speed>0.156533</speed>
+  <name>TP0771</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704273955" lon="11.963826138">
+  <ele>24.590355</ele>
+<time>2008-01-27T15:17:46Z</time>
+  <course>339.514862</course>
+  <speed>0.142250</speed>
+  <name>TP0772</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704285374" lon="11.963817864">
+  <ele>24.535629</ele>
+<time>2008-01-27T15:17:51Z</time>
+  <course>339.514862</course>
+  <speed>0.360152</speed>
+  <name>TP0773</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704304614" lon="11.963806486">
+  <ele>24.427177</ele>
+<time>2008-01-27T15:17:56Z</time>
+  <course>339.514862</course>
+  <speed>0.361612</speed>
+  <name>TP0774</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704318481" lon="11.963798775">
+  <ele>24.243149</ele>
+<time>2008-01-27T15:18:01Z</time>
+  <course>339.514862</course>
+  <speed>0.431612</speed>
+  <name>TP0775</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704340514" lon="11.963785730">
+  <ele>24.084087</ele>
+<time>2008-01-27T15:18:06Z</time>
+  <course>339.514862</course>
+  <speed>0.555251</speed>
+  <name>TP0776</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704430500" lon="11.963722647">
+  <ele>24.227612</ele>
+<time>2008-01-27T15:18:11Z</time>
+  <course>346.195099</course>
+  <speed>3.421367</speed>
+  <name>TP0777</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704654644" lon="11.963558663">
+  <ele>24.550591</ele>
+<time>2008-01-27T15:18:16Z</time>
+  <course>332.352997</course>
+  <speed>5.118948</speed>
+  <name>TP0778</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.704829590" lon="11.963399179">
+  <ele>24.790329</ele>
+<time>2008-01-27T15:18:21Z</time>
+  <course>339.528839</course>
+  <speed>4.719919</speed>
+  <name>TP0779</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705047224" lon="11.963266015">
+  <ele>24.882000</ele>
+<time>2008-01-27T15:18:26Z</time>
+  <course>337.760681</course>
+  <speed>3.929679</speed>
+  <name>TP0780</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705213301" lon="11.963116742">
+  <ele>24.885988</ele>
+<time>2008-01-27T15:18:31Z</time>
+  <course>326.768158</course>
+  <speed>3.181422</speed>
+  <name>TP0781</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705493067" lon="11.963112266">
+  <ele>22.894363</ele>
+<time>2008-01-27T15:18:36Z</time>
+  <course>36.511124</course>
+  <speed>4.846198</speed>
+  <name>TP0782</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705665052" lon="11.963496047">
+  <ele>21.994968</ele>
+<time>2008-01-27T15:18:41Z</time>
+  <course>62.685516</course>
+  <speed>5.946139</speed>
+  <name>TP0783</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.705843795" lon="11.963942511">
+  <ele>20.402012</ele>
+<time>2008-01-27T15:18:46Z</time>
+  <course>61.447033</course>
+  <speed>6.089304</speed>
+  <name>TP0784</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706063171" lon="11.964528962">
+  <ele>18.011835</ele>
+<time>2008-01-27T15:18:51Z</time>
+  <course>70.627136</course>
+  <speed>7.146325</speed>
+  <name>TP0785</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706222273" lon="11.964977269">
+  <ele>16.479000</ele>
+<time>2008-01-27T15:18:56Z</time>
+  <course>72.116966</course>
+  <speed>5.706940</speed>
+  <name>TP0786</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706334302" lon="11.965581173">
+  <ele>15.727952</ele>
+<time>2008-01-27T15:19:01Z</time>
+  <course>72.860649</course>
+  <speed>6.682722</speed>
+  <name>TP0787</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.706397574" lon="11.966138898">
+  <ele>13.501931</ele>
+<time>2008-01-27T15:19:06Z</time>
+  <course>74.065750</course>
+  <speed>5.324975</speed>
+  <name>TP0788</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.706417826" lon="11.966594578">
+  <ele>12.321080</ele>
+<time>2008-01-27T15:19:11Z</time>
+  <course>81.119461</course>
+  <speed>3.683437</speed>
+  <name>TP0789</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.706454953" lon="11.966898926">
+  <ele>11.192452</ele>
+<time>2008-01-27T15:19:16Z</time>
+  <course>75.343231</course>
+  <speed>2.929381</speed>
+  <name>TP0790</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.706396303" lon="11.967248614">
+  <ele>9.391747</ele>
+<time>2008-01-27T15:19:21Z</time>
+  <course>69.857574</course>
+  <speed>2.541023</speed>
+  <name>TP0791</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.706403813" lon="11.967521803">
+  <ele>7.392978</ele>
+<time>2008-01-27T15:19:26Z</time>
+  <course>95.088768</course>
+  <speed>3.015811</speed>
+  <name>TP0792</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706430658" lon="11.967937357">
+  <ele>11.171357</ele>
+<time>2008-01-27T15:19:31Z</time>
+  <course>48.301205</course>
+  <speed>2.121240</speed>
+  <name>TP0793</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706614582" lon="11.968096848">
+  <ele>16.152731</ele>
+<time>2008-01-27T15:19:36Z</time>
+  <course>345.122620</course>
+  <speed>3.099985</speed>
+  <name>TP0794</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.706756669" lon="11.968033285">
+  <ele>15.429770</ele>
+<time>2008-01-27T15:19:41Z</time>
+  <course>349.252014</course>
+  <speed>3.720629</speed>
+  <name>TP0795</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.706943683" lon="11.968147031">
+  <ele>18.443081</ele>
+<time>2008-01-27T15:19:46Z</time>
+  <course>49.279705</course>
+  <speed>4.131574</speed>
+  <name>TP0796</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707025728" lon="11.968484235">
+  <ele>17.724062</ele>
+<time>2008-01-27T15:19:51Z</time>
+  <course>70.644554</course>
+  <speed>4.497624</speed>
+  <name>TP0797</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707104243" lon="11.968838190">
+  <ele>16.861166</ele>
+<time>2008-01-27T15:19:56Z</time>
+  <course>64.961960</course>
+  <speed>3.303369</speed>
+  <name>TP0798</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707145784" lon="11.968940388">
+  <ele>16.343344</ele>
+<time>2008-01-27T15:20:01Z</time>
+  <course>57.725773</course>
+  <speed>0.167609</speed>
+  <name>TP0799</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707140251" lon="11.968924129">
+  <ele>17.903362</ele>
+<time>2008-01-27T15:20:06Z</time>
+  <course>57.725773</course>
+  <speed>0.082964</speed>
+  <name>TP0800</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707141317" lon="11.968930938">
+  <ele>17.818550</ele>
+<time>2008-01-27T15:20:11Z</time>
+  <course>57.725773</course>
+  <speed>0.161319</speed>
+  <name>TP0801</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707144465" lon="11.968943991">
+  <ele>17.827591</ele>
+<time>2008-01-27T15:20:16Z</time>
+  <course>57.725773</course>
+  <speed>0.130852</speed>
+  <name>TP0802</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707146508" lon="11.968951097">
+  <ele>17.853209</ele>
+<time>2008-01-27T15:20:21Z</time>
+  <course>57.725773</course>
+  <speed>0.068195</speed>
+  <name>TP0803</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707149841" lon="11.968959470">
+  <ele>17.841661</ele>
+<time>2008-01-27T15:20:26Z</time>
+  <course>57.725773</course>
+  <speed>0.183443</speed>
+  <name>TP0804</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707154437" lon="11.968965905">
+  <ele>17.868876</ele>
+<time>2008-01-27T15:20:31Z</time>
+  <course>57.725773</course>
+  <speed>0.195327</speed>
+  <name>TP0805</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707161561" lon="11.968979219">
+  <ele>17.897980</ele>
+<time>2008-01-27T15:20:36Z</time>
+  <course>57.725773</course>
+  <speed>0.249844</speed>
+  <name>TP0806</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707165887" lon="11.968988338">
+  <ele>17.911112</ele>
+<time>2008-01-27T15:20:41Z</time>
+  <course>57.725773</course>
+  <speed>0.274289</speed>
+  <name>TP0807</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707168433" lon="11.968992165">
+  <ele>17.954067</ele>
+<time>2008-01-27T15:20:46Z</time>
+  <course>57.725773</course>
+  <speed>0.199295</speed>
+  <name>TP0808</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707169357" lon="11.968990043">
+  <ele>18.035896</ele>
+<time>2008-01-27T15:20:51Z</time>
+  <course>57.725773</course>
+  <speed>0.061631</speed>
+  <name>TP0809</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707170836" lon="11.968995460">
+  <ele>18.049931</ele>
+<time>2008-01-27T15:20:56Z</time>
+  <course>57.725773</course>
+  <speed>0.232345</speed>
+  <name>TP0810</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707206276" lon="11.969190620">
+  <ele>18.316492</ele>
+<time>2008-01-27T15:21:01Z</time>
+  <course>68.676346</course>
+  <speed>5.247779</speed>
+  <name>TP0811</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707278103" lon="11.969674883">
+  <ele>20.202015</ele>
+<time>2008-01-27T15:21:06Z</time>
+  <course>77.141609</course>
+  <speed>6.035380</speed>
+  <name>TP0812</name>
+  <fix>3d</fix>
+  <sat>6</sat>
+</trkpt>
+<trkpt lat="57.707348899" lon="11.970166648">
+  <ele>21.015213</ele>
+<time>2008-01-27T15:21:11Z</time>
+  <course>79.136803</course>
+  <speed>6.096270</speed>
+  <name>TP0813</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707424418" lon="11.970710418">
+  <ele>22.754051</ele>
+<time>2008-01-27T15:21:16Z</time>
+  <course>73.930702</course>
+  <speed>5.832743</speed>
+  <name>TP0814</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707448325" lon="11.971055495">
+  <ele>25.730627</ele>
+<time>2008-01-27T15:21:20Z</time>
+  <course>76.704651</course>
+  <speed>4.485237</speed>
+  <name>TP0815</name>
+  <fix>3d</fix>
+  <sat>7</sat>
+</trkpt>
+<trkpt lat="57.707408790" lon="11.971353747">
+  <ele>29.132912</ele>
+<time>2008-01-27T18:13:26.129Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0816</name>
+  <fix>none</fix>
+</trkpt>
+<trkpt lat="57.707408790" lon="11.971353747">
+  <ele>29.132912</ele>
+<time>2008-01-27T18:13:31.929Z</time>
+  <course>0.000000</course>
+  <speed>0.000000</speed>
+  <name>TP0817</name>
+  <fix>none</fix>
+</trkpt>
+</trkseg>
+</trk>
+</gpx>
diff --git a/reference/track/nmea+ms.gpx b/reference/track/nmea+ms.gpx
new file mode 100644 (file)
index 0000000..453ef1c
--- /dev/null
@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<bounds minlat="53.556728333" minlon="9.865573333" maxlat="53.556730000" maxlon="9.865580000"/>
+<trk>
+<trkseg>
+<trkpt lat="53.556728333" lon="9.865573333">
+  <ele>47.500000</ele>
+<time>2007-08-17T09:31:56.500Z</time>
+  <course>171.410004</course>
+  <speed>0.111111</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865575000">
+  <ele>47.800000</ele>
+<time>2007-08-17T09:31:56.750Z</time>
+  <course>169.850006</course>
+  <speed>0.055556</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865576667">
+  <ele>47.900000</ele>
+<time>2007-08-17T09:31:57Z</time>
+  <course>167.320007</course>
+  <speed>0.111111</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865576667">
+  <ele>48.000000</ele>
+<time>2007-08-17T09:31:57.250Z</time>
+  <course>165.429993</course>
+  <speed>0.111111</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865576667">
+  <ele>48.100000</ele>
+<time>2007-08-17T09:31:57.500Z</time>
+  <course>164.399994</course>
+  <speed>0.027778</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865578333">
+  <ele>48.200000</ele>
+<time>2007-08-17T09:31:57.750Z</time>
+  <course>168.419998</course>
+  <speed>0.083333</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865576667">
+  <ele>48.300000</ele>
+<time>2007-08-17T09:31:58.250Z</time>
+  <course>181.889999</course>
+  <speed>0.111111</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865578333">
+  <ele>48.400000</ele>
+<time>2007-08-17T09:31:58Z</time>
+  <course>175.830002</course>
+  <speed>0.138889</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865578333">
+  <ele>48.400000</ele>
+<time>2007-08-17T09:31:58.750Z</time>
+  <course>179.449997</course>
+  <speed>0.083333</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865580000">
+  <ele>48.500000</ele>
+<time>2007-08-17T09:31:59Z</time>
+  <course>176.820007</course>
+  <speed>0.083333</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865578333">
+  <ele>49.600000</ele>
+<time>2007-08-17T09:32:00.500Z</time>
+  <course>202.580002</course>
+  <speed>0.138889</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865578333">
+  <ele>49.600000</ele>
+<time>2007-08-17T09:31:59.250Z</time>
+  <course>174.279999</course>
+  <speed>0.055556</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865580000">
+  <ele>49.000000</ele>
+<time>2007-08-17T09:31:59.500Z</time>
+  <course>177.330002</course>
+  <speed>0.111111</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865578333">
+  <ele>49.500000</ele>
+<time>2007-08-17T09:32:00Z</time>
+  <course>185.009995</course>
+  <speed>0.027778</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865580000">
+  <ele>49.600000</ele>
+<time>2007-08-17T09:32:00.250Z</time>
+  <course>189.289993</course>
+  <speed>0.083333</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865575000">
+  <ele>50.100000</ele>
+<time>2007-08-17T09:32:01Z</time>
+  <course>207.460007</course>
+  <speed>0.222222</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865578333">
+  <ele>49.500000</ele>
+<time>2007-08-17T09:32:01.250Z</time>
+  <course>213.190002</course>
+  <speed>0.138889</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865576667">
+  <ele>49.500000</ele>
+<time>2007-08-17T09:32:01.500Z</time>
+  <course>218.089996</course>
+  <speed>0.277778</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556730000" lon="9.865576667">
+  <ele>49.600000</ele>
+<time>2007-08-17T09:32:01.750Z</time>
+  <course>221.759995</course>
+  <speed>0.250000</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865575000">
+  <ele>49.700000</ele>
+<time>2007-08-17T09:32:02Z</time>
+  <course>226.210007</course>
+  <speed>0.222222</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865575000">
+  <ele>49.800000</ele>
+<time>2007-08-17T09:32:02.500Z</time>
+  <course>233.130005</course>
+  <speed>0.138889</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865575000">
+  <ele>50.100000</ele>
+<time>2007-08-17T09:32:02.750Z</time>
+  <course>233.779999</course>
+  <speed>0.055556</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865576667">
+  <ele>50.000000</ele>
+<time>2007-08-17T09:32:03Z</time>
+  <course>231.729996</course>
+  <speed>0.055556</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865576667">
+  <ele>49.900000</ele>
+<time>2007-08-17T09:32:03.250Z</time>
+  <course>227.869995</course>
+  <speed>0.055556</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865576667">
+  <ele>49.900000</ele>
+<time>2007-08-17T09:32:03.500Z</time>
+  <course>224.449997</course>
+  <speed>0.083333</speed>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+  <vdop>2.700000</vdop>
+  <pdop>3.200000</pdop>
+</trkpt>
+<trkpt lat="53.556728333" lon="9.865575000">
+  <ele>49.900000</ele>
+<time>2007-08-17T09:32:05.750Z</time>
+  <fix>3d</fix>
+  <sat>6</sat>
+  <hdop>1.700000</hdop>
+</trkpt>
+</trkseg>
+</trk>
+</gpx>
diff --git a/reference/track/nmea+ms.txt b/reference/track/nmea+ms.txt
new file mode 100644 (file)
index 0000000..ca2fa33
--- /dev/null
@@ -0,0 +1,125 @@
+$GPGGA,093156.000,5333.4037,N,00951.9344,E,1,06,1.7,47.5,M,46.0,M,,0000*61\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093156.500,A,5333.4037,N,00951.9345,E,0.20,171.41,170807,,,A*6A\r
+$GPVTG,171.41,T,,M,0.20,N,0.4,K,A*09\r
+$GPGGA,093156.500,5333.4037,N,00951.9345,E,1,06,1.7,47.8,M,46.0,M,,0000*68\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093156.750,A,5333.4037,N,00951.9346,E,0.12,169.85,170807,,,A*6E\r
+$GPVTG,169.85,T,,M,0.12,N,0.2,K,A*0F\r
+$GPGGA,093156.750,5333.4037,N,00951.9346,E,1,06,1.7,47.9,M,46.0,M,,0000*6D\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093157.000,A,5333.4037,N,00951.9346,E,0.21,167.32,170807,,,A*6F\r
+$GPVTG,167.32,T,,M,0.21,N,0.4,K,A*0B\r
+$GPGGA,093157.000,5333.4037,N,00951.9346,E,1,06,1.7,48.0,M,46.0,M,,0000*68\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093157.250,A,5333.4037,N,00951.9346,E,0.19,165.43,170807,,,A*67\r
+$GPVTG,165.43,T,,M,0.19,N,0.4,K,A*04\r
+$GPGGA,093157.250,5333.4037,N,00951.9346,E,1,06,1.7,48.1,M,46.0,M,,0000*6E\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093157.500,A,5333.4037,N,00951.9347,E,0.06,164.40,170807,,,A*68\r
+$GPVTG,164.40,T,,M,0.06,N,0.1,K,A*0D\r
+$GPGGA,093157.500,5333.4037,N,00951.9347,E,1,06,1.7,48.2,M,46.0,M,,0000*6E\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093157.750,A,5333.4037,N,00951.9346,E,0.15,168.42,170807,,,A*62\r
+$GPVTG,168.42,T,,M,0.15,N,0.3,K,A*03\r
+$GPGGA,093157.750,5333.4037,N,00951.9346,E,1,06,1.7,48.3,M,46.0,M,,0000*69\r
+$GPRMC,093158.250,A,5333.4037,N,00951.9347,E,0.24,181.89,170807,,,A*6B\r
+$GPVTG,181.89,T,,M,0.24,N,0.4,K,A*06\r
+$GPGGA,093158.250,5333.4037,N,00951.9347,E,1,06,1.7,48.4,M,46.0,M,,0000*65\r
+$GPRMC,093158.500,A,5333.4037,N,00951.9347,E,0.09,180.87,170807,,,A*69\r
+$GPRMC,093158.000,A,5333.4037,N,00951.9346,E,0.28,175.83,170807,,,A*60\r
+$GPVTG,175.83,T,,M,0.28,N,0.5,K,A*0A\r
+$GPGGA,093158.000,5333.4037,N,00951.9346,E,1,06,1.7,48.4,M,46.0,M,,0000*63\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPVTG,180.87,T,,M,0.09,N,0.2,K,A*00\r
+$GPGGA,093158.500,5333.4037,N,00951.9347,E,1,06,1.7,48.4,M,46.0,M,,0000*67\r
+$GPGSV,3,3,11,21,14,320,,03,07,025,,19,09,054,*4D\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093158.750,A,5333.4037,N,00951.9348,E,0.17,179.45,170807,,,A*66\r
+$GPVTG,179.45,T,,M,0.17,N,0.3,K,A*06\r
+$GPGGA,093158.750,5333.4037,N,00951.9348,E,1,06,1.7,48.5,M,46.0,M,,0000*6E\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093159.000,A,5333.4037,N,00951.9348,E,0.17,176.82,170807,,,A*61\r
+$GPVTG,176.82,T,,M,0.17,N,0.3,K,A*02\r
+$GPGGA,093159.000,5333.4037,N,00951.9348,E,1,06,1.7,48.7,M,46.0,M,,0000*6F\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPGSV,3,1,11,08,71,074,27,10,57,214,,29,52,291,24,27,44,067,34*74\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPGSV,3,1,11,08,71,074,27,10,57,214,,29,52,291,24,27,44,067,34*74\r
+$GPGGA,093200.500,5333.4037,N,00951.9347,E,1,06,1.7,49.6,M,46.0,M,,0000*6A\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPVTG,202.58,T,,M,0.30,N,0.5,K,A*06\r
+$GPGGA,093200.750,5333.4037,N,00951.9347,E,1,06,1.7,49.6,M,46.0,M,,0000*6D\r
+$GPRMC,093159.750,A,5333.4037,N,00951.9347,E,0.06,181.63,170807,,,A*6B\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093159.250,A,5333.4037,N,00951.9348,E,0.09,174.28,170807,,,A*6B\r
+$GPVTG,174.28,T,,M,0.09,N,0.2,K,A*0E\r
+$GPGGA,093159.250,5333.4037,N,00951.9348,E,1,06,1.7,49.0,M,46.0,M,,0000*6E\r
+$GPRMC,093159.500,A,5333.4037,N,00951.9347,E,0.19,177.33,170807,,,A*6E\r
+$GPVTG,177.33,T,,M,0.19,N,0.4,K,A*00\r
+$GPGGA,093159.500,5333.4037,N,00951.9347,E,1,06,1.7,49.4,M,46.0,M,,0000*67\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPGSV,3,1,11,08,71,074,27,10,57,214,,29,52,291,24,27,44,067,34*74\r
+$GPVTG,181.63,T,,M,0.06,N,0.1,K,A*07\r
+$GPGGA,093159.750,5333.4037,N,00951.9347,E,1,06,1.7,49.5,M,46.0,M,,0000*61\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPVTG,229.91,T,,M,0.38,N,0.7,K,A*00\r
+$GPRMC,093200.000,A,5333.4037,N,00951.9348,E,0.05,185.01,170807,,,A*6A\r
+$GPVTG,185.01,T,,M,0.05,N,0.1,K,A*04\r
+$GPGGA,093200.000,5333.4037,N,00951.9348,E,1,06,1.7,49.6,M,46.0,M,,0000*60\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093200.250,A,5333.4037,N,00951.9347,E,0.19,189.29,170807,,,A*69\r
+$GPVTG,189.29,T,,M,0.19,N,0.3,K,A*0D\r
+$GPGGA,093202.250,5333.4037,N,00951.9345,E,1,06,1.7,50.1,M,46.0,M,,0000*67\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093200.500,A,5333.4037,N,00951.9347,E,0.25,196.46,170807,,,A*63\r
+$GPVTG,196.46,T,,M,0.25,N,0.5,K,A*03\r
+$GPRMC,093200.750,A,5333.4037,N,00951.9347,E,0.30,202.58,170807,,,A*61\r
+$GPRMC,093201.000,A,5333.4037,N,00951.9347,E,0.41,207.46,170807,,,A*6E\r
+$GPVTG,207.46,T,,M,0.41,N,0.8,K,A*07\r
+$GPGGA,093201.000,5333.4037,N,00951.9347,E,1,06,1.7,49.5,M,46.0,M,,0000*6D\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093201.250,A,5333.4037,N,00951.9346,E,0.29,213.19,170807,,,A*69\r
+$GPVTG,213.19,T,,M,0.29,N,0.5,K,A*0B\r
+$GPGGA,093201.250,5333.4037,N,00951.9346,E,1,06,1.7,49.5,M,46.0,M,,0000*6B\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093201.500,A,5333.4038,N,00951.9346,E,0.52,218.09,170807,,,A*62\r
+$GPVTG,218.09,T,,M,0.52,N,1.0,K,A*09\r
+$GPGGA,093201.500,5333.4038,N,00951.9346,E,1,06,1.7,49.6,M,46.0,M,,0000*65\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093201.750,A,5333.4037,N,00951.9345,E,0.49,221.76,170807,,,A*61\r
+$GPVTG,221.76,T,,M,0.49,N,0.9,K,A*09\r
+$GPGGA,093201.750,5333.4037,N,00951.9345,E,1,06,1.7,49.7,M,46.0,M,,0000*6F\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093202.000,A,5333.4037,N,00951.9345,E,0.41,226.21,170807,,,A*6D\r
+$GPVTG,226.21,T,,M,0.41,N,0.8,K,A*05\r
+$GPGGA,093202.000,5333.4037,N,00951.9345,E,1,06,1.7,49.8,M,46.0,M,,0000*61\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093203.750,A,5333.4037,N,00951.9347,E,0.06,221.34,170807,,,A*6C\r
+$GPRMC,093202.250,A,5333.4037,N,00951.9345,E,0.38,229.91,170807,,,A*60\r
+$GPRMC,093202.500,A,5333.4037,N,00951.9345,E,0.29,233.13,170807,,,A*63\r
+$GPVTG,233.13,T,,M,0.29,N,0.5,K,A*03\r
+$GPGGA,093202.500,5333.4037,N,00951.9345,E,1,06,1.7,50.1,M,46.0,M,,0000*65\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093202.750,A,5333.4037,N,00951.9346,E,0.12,233.78,170807,,,A*62\r
+$GPVTG,233.78,T,,M,0.12,N,0.2,K,A*01\r
+$GPGGA,093202.750,5333.4037,N,00951.9346,E,1,06,1.7,50.0,M,46.0,M,,0000*60\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093203.000,A,5333.4037,N,00951.9346,E,0.08,231.73,170807,,,A*63\r
+$GPVTG,231.73,T,,M,0.08,N,0.2,K,A*03\r
+$GPGGA,093203.000,5333.4037,N,00951.9346,E,1,06,1.7,49.9,M,46.0,M,,0000*62\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093203.250,A,5333.4037,N,00951.9346,E,0.10,227.87,170807,,,A*61\r
+$GPVTG,227.87,T,,M,0.10,N,0.2,K,A*06\r
+$GPGGA,093203.250,5333.4037,N,00951.9346,E,1,06,1.7,49.9,M,46.0,M,,0000*65\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPRMC,093203.500,A,5333.4037,N,00951.9347,E,0.17,224.45,170807,,,A*68\r
+$GPVTG,224.45,T,,M,0.17,N,0.3,K,A*0D\r
+$GPGGA,093203.500,5333.4037,N,00951.9347,E,1,06,1.7,49.9,M,46.0,M,,0000*66\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPGSV,3,1,11,08,71,074,27,10,57,214,,29,52,291,25,27,44,067,34*75\r
+$GPVTG,221.34,T,,M,0.06,N,0.1,K,A*0C\r
+$GPVTG,245.09,T,,M,0.24,N,0.4,K,A*05\r
+$GPGSA,A,3,08,29,27,28,26,24,,,,,,,3.2,1.7,2.7*3E\r
+$GPGGA,093205.750,5333.4037,N,00951.9345,E,1,06,1.7,49.9,M,46.0,M,,0000*65\r
index 2218a303b218974d7300d77db51b3fc2229f310b..678db72ede164668069f6bb00f7494d1ca8f38b5 100644 (file)
@@ -11,7 +11,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 <trkseg>
 <trkpt lat="42.530485000" lon="-88.121721667">
   <ele>209.800000</ele>
-<time>2004-08-07T03:29:08Z</time>
+<time>2004-08-07T03:29:08.379Z</time>
   <course>138.919998</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -22,7 +22,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530485000" lon="-88.121723333">
   <ele>209.700000</ele>
-<time>2004-08-07T03:29:09Z</time>
+<time>2004-08-07T03:29:09.379Z</time>
   <course>145.850006</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -33,7 +33,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530486667" lon="-88.121726667">
   <ele>209.700000</ele>
-<time>2004-08-07T03:29:10Z</time>
+<time>2004-08-07T03:29:10.379Z</time>
   <course>143.250000</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -44,7 +44,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530486667" lon="-88.121726667">
   <ele>209.600000</ele>
-<time>2004-08-07T03:29:11Z</time>
+<time>2004-08-07T03:29:11.379Z</time>
   <course>145.759995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -55,7 +55,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530486667" lon="-88.121728333">
   <ele>209.600000</ele>
-<time>2004-08-07T03:29:12Z</time>
+<time>2004-08-07T03:29:12.379Z</time>
   <course>141.440002</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -66,7 +66,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530488333" lon="-88.121730000">
   <ele>209.600000</ele>
-<time>2004-08-07T03:29:13Z</time>
+<time>2004-08-07T03:29:13.379Z</time>
   <course>140.399994</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -77,7 +77,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530488333" lon="-88.121730000">
   <ele>209.600000</ele>
-<time>2004-08-07T03:29:14Z</time>
+<time>2004-08-07T03:29:14.379Z</time>
   <course>142.509995</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -88,7 +88,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530490000" lon="-88.121730000">
   <ele>209.400000</ele>
-<time>2004-08-07T03:29:15Z</time>
+<time>2004-08-07T03:29:15.379Z</time>
   <course>144.059998</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -99,7 +99,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530490000" lon="-88.121728333">
   <ele>209.300000</ele>
-<time>2004-08-07T03:29:16Z</time>
+<time>2004-08-07T03:29:16.379Z</time>
   <course>137.660004</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -110,7 +110,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530491667" lon="-88.121728333">
   <ele>209.100000</ele>
-<time>2004-08-07T03:29:17Z</time>
+<time>2004-08-07T03:29:17.379Z</time>
   <course>144.229996</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -121,7 +121,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530493333" lon="-88.121726667">
   <ele>208.900000</ele>
-<time>2004-08-07T03:29:18Z</time>
+<time>2004-08-07T03:29:18.379Z</time>
   <course>140.350006</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -132,7 +132,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530496667" lon="-88.121725000">
   <ele>208.800000</ele>
-<time>2004-08-07T03:29:19Z</time>
+<time>2004-08-07T03:29:19.379Z</time>
   <course>143.059998</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -143,7 +143,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530498333" lon="-88.121723333">
   <ele>208.600000</ele>
-<time>2004-08-07T03:29:20Z</time>
+<time>2004-08-07T03:29:20.379Z</time>
   <course>145.080002</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -154,7 +154,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530501667" lon="-88.121721667">
   <ele>208.500000</ele>
-<time>2004-08-07T03:29:21Z</time>
+<time>2004-08-07T03:29:21.379Z</time>
   <course>141.559998</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -165,7 +165,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530505000" lon="-88.121721667">
   <ele>208.400000</ele>
-<time>2004-08-07T03:29:22Z</time>
+<time>2004-08-07T03:29:22.377Z</time>
   <course>140.759995</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -176,7 +176,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530508333" lon="-88.121723333">
   <ele>208.400000</ele>
-<time>2004-08-07T03:29:23Z</time>
+<time>2004-08-07T03:29:23.377Z</time>
   <course>143.919998</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -187,7 +187,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530511667" lon="-88.121725000">
   <ele>208.300000</ele>
-<time>2004-08-07T03:29:24Z</time>
+<time>2004-08-07T03:29:24.377Z</time>
   <course>140.850006</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -198,7 +198,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121726667">
   <ele>208.200000</ele>
-<time>2004-08-07T03:29:25Z</time>
+<time>2004-08-07T03:29:25.377Z</time>
   <course>145.270004</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -209,7 +209,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121730000">
   <ele>208.000000</ele>
-<time>2004-08-07T03:29:26Z</time>
+<time>2004-08-07T03:29:26.377Z</time>
   <course>145.610001</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -220,7 +220,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530516667" lon="-88.121733333">
   <ele>207.900000</ele>
-<time>2004-08-07T03:29:27Z</time>
+<time>2004-08-07T03:29:27.377Z</time>
   <course>145.139999</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -231,7 +231,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530518333" lon="-88.121736667">
   <ele>207.800000</ele>
-<time>2004-08-07T03:29:28Z</time>
+<time>2004-08-07T03:29:28.377Z</time>
   <course>143.490005</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -242,7 +242,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530518333" lon="-88.121738333">
   <ele>207.700000</ele>
-<time>2004-08-07T03:29:29Z</time>
+<time>2004-08-07T03:29:29.377Z</time>
   <course>145.089996</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -253,7 +253,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530518333" lon="-88.121740000">
   <ele>207.800000</ele>
-<time>2004-08-07T03:29:30Z</time>
+<time>2004-08-07T03:29:30.377Z</time>
   <course>143.000000</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -264,7 +264,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530518333" lon="-88.121740000">
   <ele>207.900000</ele>
-<time>2004-08-07T03:29:31Z</time>
+<time>2004-08-07T03:29:31.377Z</time>
   <course>144.100006</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -275,7 +275,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121740000">
   <ele>208.200000</ele>
-<time>2004-08-07T03:29:32Z</time>
+<time>2004-08-07T03:29:32.377Z</time>
   <course>142.360001</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -286,7 +286,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530521667" lon="-88.121740000">
   <ele>208.600000</ele>
-<time>2004-08-07T03:29:33Z</time>
+<time>2004-08-07T03:29:33.377Z</time>
   <course>139.899994</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -297,7 +297,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530521667" lon="-88.121738333">
   <ele>209.200000</ele>
-<time>2004-08-07T03:29:34Z</time>
+<time>2004-08-07T03:29:34.377Z</time>
   <course>145.610001</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -308,7 +308,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530523333" lon="-88.121738333">
   <ele>209.800000</ele>
-<time>2004-08-07T03:29:35Z</time>
+<time>2004-08-07T03:29:35.377Z</time>
   <course>143.770004</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -319,7 +319,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530523333" lon="-88.121738333">
   <ele>210.600000</ele>
-<time>2004-08-07T03:29:36Z</time>
+<time>2004-08-07T03:29:36.377Z</time>
   <course>144.649994</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -330,7 +330,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530521667" lon="-88.121738333">
   <ele>211.400000</ele>
-<time>2004-08-07T03:29:37Z</time>
+<time>2004-08-07T03:29:37.377Z</time>
   <course>144.570007</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -341,7 +341,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530521667" lon="-88.121738333">
   <ele>212.200000</ele>
-<time>2004-08-07T03:29:38Z</time>
+<time>2004-08-07T03:29:38.377Z</time>
   <course>144.350006</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -352,7 +352,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121738333">
   <ele>212.900000</ele>
-<time>2004-08-07T03:29:39Z</time>
+<time>2004-08-07T03:29:39.377Z</time>
   <course>141.220001</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -363,7 +363,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121736667">
   <ele>213.500000</ele>
-<time>2004-08-07T03:29:40Z</time>
+<time>2004-08-07T03:29:40.377Z</time>
   <course>146.149994</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -374,7 +374,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121735000">
   <ele>213.900000</ele>
-<time>2004-08-07T03:29:41Z</time>
+<time>2004-08-07T03:29:41.377Z</time>
   <course>142.419998</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -385,7 +385,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121733333">
   <ele>214.100000</ele>
-<time>2004-08-07T03:29:42Z</time>
+<time>2004-08-07T03:29:42.377Z</time>
   <course>141.130005</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -396,7 +396,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121730000">
   <ele>214.100000</ele>
-<time>2004-08-07T03:29:43Z</time>
+<time>2004-08-07T03:29:43.377Z</time>
   <course>144.000000</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -407,7 +407,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121728333">
   <ele>213.800000</ele>
-<time>2004-08-07T03:29:44Z</time>
+<time>2004-08-07T03:29:44.377Z</time>
   <course>142.179993</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -418,7 +418,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121725000">
   <ele>213.400000</ele>
-<time>2004-08-07T03:29:45Z</time>
+<time>2004-08-07T03:29:45.377Z</time>
   <course>145.289993</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -429,7 +429,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121723333">
   <ele>213.000000</ele>
-<time>2004-08-07T03:29:46Z</time>
+<time>2004-08-07T03:29:46.377Z</time>
   <course>144.630005</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -440,7 +440,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121721667">
   <ele>212.600000</ele>
-<time>2004-08-07T03:29:47Z</time>
+<time>2004-08-07T03:29:47.377Z</time>
   <course>143.470001</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -451,7 +451,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121720000">
   <ele>212.400000</ele>
-<time>2004-08-07T03:29:48Z</time>
+<time>2004-08-07T03:29:48.377Z</time>
   <course>142.350006</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -462,7 +462,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121718333">
   <ele>212.200000</ele>
-<time>2004-08-07T03:29:49Z</time>
+<time>2004-08-07T03:29:49.377Z</time>
   <course>143.190002</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -473,7 +473,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530518333" lon="-88.121718333">
   <ele>212.100000</ele>
-<time>2004-08-07T03:29:50Z</time>
+<time>2004-08-07T03:29:50.377Z</time>
   <course>143.639999</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -484,7 +484,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530518333" lon="-88.121716667">
   <ele>212.100000</ele>
-<time>2004-08-07T03:29:51Z</time>
+<time>2004-08-07T03:29:51.377Z</time>
   <course>140.800003</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -495,7 +495,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530516667" lon="-88.121715000">
   <ele>212.100000</ele>
-<time>2004-08-07T03:29:52Z</time>
+<time>2004-08-07T03:29:52.377Z</time>
   <course>141.910004</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -506,7 +506,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121715000">
   <ele>212.200000</ele>
-<time>2004-08-07T03:29:53Z</time>
+<time>2004-08-07T03:29:53.377Z</time>
   <course>142.309998</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -517,7 +517,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121716667">
   <ele>212.400000</ele>
-<time>2004-08-07T03:29:54Z</time>
+<time>2004-08-07T03:29:54.377Z</time>
   <course>140.729996</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -528,7 +528,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121716667">
   <ele>212.600000</ele>
-<time>2004-08-07T03:29:55Z</time>
+<time>2004-08-07T03:29:55.375Z</time>
   <course>141.190002</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -539,7 +539,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121718333">
   <ele>212.900000</ele>
-<time>2004-08-07T03:29:56Z</time>
+<time>2004-08-07T03:29:56.375Z</time>
   <course>142.600006</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -550,7 +550,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121721667">
   <ele>213.400000</ele>
-<time>2004-08-07T03:29:57Z</time>
+<time>2004-08-07T03:29:57.375Z</time>
   <course>142.809998</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -561,7 +561,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121725000">
   <ele>213.800000</ele>
-<time>2004-08-07T03:29:58Z</time>
+<time>2004-08-07T03:29:58.375Z</time>
   <course>140.440002</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -572,7 +572,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121728333">
   <ele>214.200000</ele>
-<time>2004-08-07T03:29:59Z</time>
+<time>2004-08-07T03:29:59.375Z</time>
   <course>142.369995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -583,7 +583,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121730000">
   <ele>214.700000</ele>
-<time>2004-08-07T03:30:00Z</time>
+<time>2004-08-07T03:30:00.375Z</time>
   <course>139.389999</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -594,7 +594,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530516667" lon="-88.121733333">
   <ele>215.000000</ele>
-<time>2004-08-07T03:30:01Z</time>
+<time>2004-08-07T03:30:01.375Z</time>
   <course>139.869995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -605,7 +605,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530516667" lon="-88.121733333">
   <ele>215.200000</ele>
-<time>2004-08-07T03:30:02Z</time>
+<time>2004-08-07T03:30:02.375Z</time>
   <course>141.369995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -616,7 +616,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530516667" lon="-88.121733333">
   <ele>215.200000</ele>
-<time>2004-08-07T03:30:03Z</time>
+<time>2004-08-07T03:30:03.375Z</time>
   <course>139.160004</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -627,7 +627,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530516667" lon="-88.121733333">
   <ele>215.200000</ele>
-<time>2004-08-07T03:30:04Z</time>
+<time>2004-08-07T03:30:04.375Z</time>
   <course>142.389999</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -638,7 +638,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121730000">
   <ele>215.200000</ele>
-<time>2004-08-07T03:30:05Z</time>
+<time>2004-08-07T03:30:05.375Z</time>
   <course>140.449997</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -649,7 +649,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121726667">
   <ele>215.100000</ele>
-<time>2004-08-07T03:30:06Z</time>
+<time>2004-08-07T03:30:06.375Z</time>
   <course>141.089996</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -660,7 +660,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121723333">
   <ele>214.800000</ele>
-<time>2004-08-07T03:30:07Z</time>
+<time>2004-08-07T03:30:07.375Z</time>
   <course>140.729996</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -671,7 +671,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121721667">
   <ele>214.600000</ele>
-<time>2004-08-07T03:30:08Z</time>
+<time>2004-08-07T03:30:08.375Z</time>
   <course>137.970001</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -682,7 +682,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121718333">
   <ele>214.300000</ele>
-<time>2004-08-07T03:30:09Z</time>
+<time>2004-08-07T03:30:09.375Z</time>
   <course>144.869995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -693,7 +693,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121716667">
   <ele>214.000000</ele>
-<time>2004-08-07T03:30:10Z</time>
+<time>2004-08-07T03:30:10.375Z</time>
   <course>137.610001</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -704,7 +704,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121715000">
   <ele>213.700000</ele>
-<time>2004-08-07T03:30:11Z</time>
+<time>2004-08-07T03:30:11.375Z</time>
   <course>145.339996</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -715,7 +715,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121713333">
   <ele>213.400000</ele>
-<time>2004-08-07T03:30:12Z</time>
+<time>2004-08-07T03:30:12.375Z</time>
   <course>136.350006</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -726,7 +726,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530516667" lon="-88.121711667">
   <ele>213.200000</ele>
-<time>2004-08-07T03:30:13Z</time>
+<time>2004-08-07T03:30:13.375Z</time>
   <course>138.580002</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -737,7 +737,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530518333" lon="-88.121708333">
   <ele>213.000000</ele>
-<time>2004-08-07T03:30:14Z</time>
+<time>2004-08-07T03:30:14.375Z</time>
   <course>140.110001</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -748,7 +748,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121706667">
   <ele>212.900000</ele>
-<time>2004-08-07T03:30:15Z</time>
+<time>2004-08-07T03:30:15.375Z</time>
   <course>140.309998</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -759,7 +759,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530523333" lon="-88.121706667">
   <ele>212.900000</ele>
-<time>2004-08-07T03:30:16Z</time>
+<time>2004-08-07T03:30:16.375Z</time>
   <course>138.899994</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -770,7 +770,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530523333" lon="-88.121706667">
   <ele>213.000000</ele>
-<time>2004-08-07T03:30:17Z</time>
+<time>2004-08-07T03:30:17.375Z</time>
   <course>142.899994</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -781,7 +781,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530525000" lon="-88.121708333">
   <ele>213.100000</ele>
-<time>2004-08-07T03:30:18Z</time>
+<time>2004-08-07T03:30:18.375Z</time>
   <course>143.660004</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -792,7 +792,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530525000" lon="-88.121710000">
   <ele>213.300000</ele>
-<time>2004-08-07T03:30:19Z</time>
+<time>2004-08-07T03:30:19.375Z</time>
   <course>140.869995</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -803,7 +803,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530523333" lon="-88.121711667">
   <ele>213.300000</ele>
-<time>2004-08-07T03:30:20Z</time>
+<time>2004-08-07T03:30:20.375Z</time>
   <course>146.139999</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -814,7 +814,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530523333" lon="-88.121715000">
   <ele>213.300000</ele>
-<time>2004-08-07T03:30:21Z</time>
+<time>2004-08-07T03:30:21.375Z</time>
   <course>141.570007</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -825,7 +825,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530521667" lon="-88.121716667">
   <ele>213.200000</ele>
-<time>2004-08-07T03:30:22Z</time>
+<time>2004-08-07T03:30:22.375Z</time>
   <course>143.949997</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -836,7 +836,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530521667" lon="-88.121718333">
   <ele>213.200000</ele>
-<time>2004-08-07T03:30:23Z</time>
+<time>2004-08-07T03:30:23.375Z</time>
   <course>141.809998</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -847,7 +847,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530521667" lon="-88.121720000">
   <ele>213.100000</ele>
-<time>2004-08-07T03:30:24Z</time>
+<time>2004-08-07T03:30:24.375Z</time>
   <course>142.070007</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -858,7 +858,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530521667" lon="-88.121721667">
   <ele>213.000000</ele>
-<time>2004-08-07T03:30:25Z</time>
+<time>2004-08-07T03:30:25.375Z</time>
   <course>140.210007</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -869,7 +869,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530523333" lon="-88.121723333">
   <ele>213.000000</ele>
-<time>2004-08-07T03:30:26Z</time>
+<time>2004-08-07T03:30:26.375Z</time>
   <course>145.889999</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -880,7 +880,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530525000" lon="-88.121726667">
   <ele>213.000000</ele>
-<time>2004-08-07T03:30:27Z</time>
+<time>2004-08-07T03:30:27.375Z</time>
   <course>139.509995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -891,7 +891,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530525000" lon="-88.121728333">
   <ele>213.200000</ele>
-<time>2004-08-07T03:30:28Z</time>
+<time>2004-08-07T03:30:28.374Z</time>
   <course>144.059998</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -902,7 +902,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530526667" lon="-88.121730000">
   <ele>213.500000</ele>
-<time>2004-08-07T03:30:29Z</time>
+<time>2004-08-07T03:30:29.374Z</time>
   <course>143.089996</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -913,7 +913,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530526667" lon="-88.121731667">
   <ele>213.900000</ele>
-<time>2004-08-07T03:30:30Z</time>
+<time>2004-08-07T03:30:30.374Z</time>
   <course>141.050003</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -924,7 +924,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530528333" lon="-88.121733333">
   <ele>214.300000</ele>
-<time>2004-08-07T03:30:31Z</time>
+<time>2004-08-07T03:30:31.374Z</time>
   <course>143.820007</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -935,7 +935,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530526667" lon="-88.121735000">
   <ele>214.800000</ele>
-<time>2004-08-07T03:30:32Z</time>
+<time>2004-08-07T03:30:32.374Z</time>
   <course>143.529999</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -946,7 +946,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530526667" lon="-88.121738333">
   <ele>215.100000</ele>
-<time>2004-08-07T03:30:33Z</time>
+<time>2004-08-07T03:30:33.374Z</time>
   <course>144.089996</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -957,7 +957,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530525000" lon="-88.121740000">
   <ele>215.600000</ele>
-<time>2004-08-07T03:30:34Z</time>
+<time>2004-08-07T03:30:34.374Z</time>
   <course>142.949997</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -968,7 +968,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530521667" lon="-88.121741667">
   <ele>216.100000</ele>
-<time>2004-08-07T03:30:35Z</time>
+<time>2004-08-07T03:30:35.374Z</time>
   <course>142.279999</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -979,7 +979,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530520000" lon="-88.121743333">
   <ele>216.700000</ele>
-<time>2004-08-07T03:30:36Z</time>
+<time>2004-08-07T03:30:36.374Z</time>
   <course>141.429993</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -990,7 +990,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530516667" lon="-88.121745000">
   <ele>217.300000</ele>
-<time>2004-08-07T03:30:37Z</time>
+<time>2004-08-07T03:30:37.374Z</time>
   <course>142.059998</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1001,7 +1001,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121745000">
   <ele>218.000000</ele>
-<time>2004-08-07T03:30:38Z</time>
+<time>2004-08-07T03:30:38.374Z</time>
   <course>141.460007</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1012,7 +1012,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530511667" lon="-88.121745000">
   <ele>218.800000</ele>
-<time>2004-08-07T03:30:39Z</time>
+<time>2004-08-07T03:30:39.374Z</time>
   <course>141.259995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1023,7 +1023,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530510000" lon="-88.121745000">
   <ele>219.700000</ele>
-<time>2004-08-07T03:30:40Z</time>
+<time>2004-08-07T03:30:40.374Z</time>
   <course>145.539993</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1034,7 +1034,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530510000" lon="-88.121745000">
   <ele>220.600000</ele>
-<time>2004-08-07T03:30:41Z</time>
+<time>2004-08-07T03:30:41.374Z</time>
   <course>134.630005</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -1045,7 +1045,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530510000" lon="-88.121746667">
   <ele>221.700000</ele>
-<time>2004-08-07T03:30:42Z</time>
+<time>2004-08-07T03:30:42.374Z</time>
   <course>144.440002</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1056,7 +1056,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530510000" lon="-88.121746667">
   <ele>222.700000</ele>
-<time>2004-08-07T03:30:43Z</time>
+<time>2004-08-07T03:30:43.374Z</time>
   <course>146.970001</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1067,7 +1067,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530510000" lon="-88.121748333">
   <ele>223.800000</ele>
-<time>2004-08-07T03:30:44Z</time>
+<time>2004-08-07T03:30:44.372Z</time>
   <course>142.240005</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1078,7 +1078,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530511667" lon="-88.121750000">
   <ele>224.800000</ele>
-<time>2004-08-07T03:30:45Z</time>
+<time>2004-08-07T03:30:45.372Z</time>
   <course>142.729996</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1089,7 +1089,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530511667" lon="-88.121751667">
   <ele>225.700000</ele>
-<time>2004-08-07T03:30:46Z</time>
+<time>2004-08-07T03:30:46.372Z</time>
   <course>141.520004</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -1100,7 +1100,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530511667" lon="-88.121753333">
   <ele>226.400000</ele>
-<time>2004-08-07T03:30:47Z</time>
+<time>2004-08-07T03:30:47.372Z</time>
   <course>141.429993</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1111,7 +1111,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530511667" lon="-88.121755000">
   <ele>227.000000</ele>
-<time>2004-08-07T03:30:48Z</time>
+<time>2004-08-07T03:30:48.372Z</time>
   <course>137.690002</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1122,7 +1122,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530511667" lon="-88.121758333">
   <ele>227.500000</ele>
-<time>2004-08-07T03:30:49Z</time>
+<time>2004-08-07T03:30:49.372Z</time>
   <course>144.580002</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -1133,7 +1133,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530511667" lon="-88.121760000">
   <ele>227.900000</ele>
-<time>2004-08-07T03:30:50Z</time>
+<time>2004-08-07T03:30:50.372Z</time>
   <course>144.809998</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1144,7 +1144,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530510000" lon="-88.121761667">
   <ele>228.200000</ele>
-<time>2004-08-07T03:30:51Z</time>
+<time>2004-08-07T03:30:51.372Z</time>
   <course>143.139999</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1155,7 +1155,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530510000" lon="-88.121763333">
   <ele>228.300000</ele>
-<time>2004-08-07T03:30:52Z</time>
+<time>2004-08-07T03:30:52.372Z</time>
   <course>143.270004</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1166,7 +1166,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530508333" lon="-88.121765000">
   <ele>228.400000</ele>
-<time>2004-08-07T03:30:53Z</time>
+<time>2004-08-07T03:30:53.372Z</time>
   <course>139.119995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1177,7 +1177,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530508333" lon="-88.121766667">
   <ele>228.300000</ele>
-<time>2004-08-07T03:30:54Z</time>
+<time>2004-08-07T03:30:54.372Z</time>
   <course>140.070007</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1188,7 +1188,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530508333" lon="-88.121766667">
   <ele>228.100000</ele>
-<time>2004-08-07T03:30:55Z</time>
+<time>2004-08-07T03:30:55.372Z</time>
   <course>144.720001</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1199,7 +1199,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530510000" lon="-88.121766667">
   <ele>227.800000</ele>
-<time>2004-08-07T03:30:56Z</time>
+<time>2004-08-07T03:30:56.372Z</time>
   <course>140.800003</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1210,7 +1210,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530511667" lon="-88.121766667">
   <ele>227.500000</ele>
-<time>2004-08-07T03:30:57Z</time>
+<time>2004-08-07T03:30:57.372Z</time>
   <course>143.259995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1221,7 +1221,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121765000">
   <ele>227.200000</ele>
-<time>2004-08-07T03:30:58Z</time>
+<time>2004-08-07T03:30:58.372Z</time>
   <course>138.809998</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1232,7 +1232,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121763333">
   <ele>226.800000</ele>
-<time>2004-08-07T03:30:59Z</time>
+<time>2004-08-07T03:30:59.372Z</time>
   <course>143.110001</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1243,7 +1243,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121761667">
   <ele>226.400000</ele>
-<time>2004-08-07T03:31:00Z</time>
+<time>2004-08-07T03:31:00.372Z</time>
   <course>140.100006</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1254,7 +1254,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121760000">
   <ele>226.100000</ele>
-<time>2004-08-07T03:31:01Z</time>
+<time>2004-08-07T03:31:01.372Z</time>
   <course>143.550003</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1265,7 +1265,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121758333">
   <ele>225.900000</ele>
-<time>2004-08-07T03:31:02Z</time>
+<time>2004-08-07T03:31:02.372Z</time>
   <course>142.119995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1276,7 +1276,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121756667">
   <ele>225.700000</ele>
-<time>2004-08-07T03:31:03Z</time>
+<time>2004-08-07T03:31:03.372Z</time>
   <course>141.639999</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1287,7 +1287,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121756667">
   <ele>225.600000</ele>
-<time>2004-08-07T03:31:04Z</time>
+<time>2004-08-07T03:31:04.372Z</time>
   <course>143.270004</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1298,7 +1298,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530511667" lon="-88.121758333">
   <ele>225.600000</ele>
-<time>2004-08-07T03:31:05Z</time>
+<time>2004-08-07T03:31:05.372Z</time>
   <course>143.910004</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1309,7 +1309,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530508333" lon="-88.121760000">
   <ele>225.500000</ele>
-<time>2004-08-07T03:31:06Z</time>
+<time>2004-08-07T03:31:06.372Z</time>
   <course>145.970001</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1320,7 +1320,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530505000" lon="-88.121761667">
   <ele>225.400000</ele>
-<time>2004-08-07T03:31:07Z</time>
+<time>2004-08-07T03:31:07.372Z</time>
   <course>144.000000</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -1331,7 +1331,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530501667" lon="-88.121761667">
   <ele>225.300000</ele>
-<time>2004-08-07T03:31:08Z</time>
+<time>2004-08-07T03:31:08.372Z</time>
   <course>146.250000</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1342,7 +1342,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530500000" lon="-88.121763333">
   <ele>225.300000</ele>
-<time>2004-08-07T03:31:09Z</time>
+<time>2004-08-07T03:31:09.372Z</time>
   <course>138.979996</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1353,7 +1353,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530498333" lon="-88.121763333">
   <ele>225.100000</ele>
-<time>2004-08-07T03:31:10Z</time>
+<time>2004-08-07T03:31:10.372Z</time>
   <course>143.100006</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1364,7 +1364,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530496667" lon="-88.121763333">
   <ele>224.900000</ele>
-<time>2004-08-07T03:31:11Z</time>
+<time>2004-08-07T03:31:11.372Z</time>
   <course>140.429993</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1375,7 +1375,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530495000" lon="-88.121763333">
   <ele>224.700000</ele>
-<time>2004-08-07T03:31:12Z</time>
+<time>2004-08-07T03:31:12.372Z</time>
   <course>141.440002</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1386,7 +1386,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530493333" lon="-88.121763333">
   <ele>224.500000</ele>
-<time>2004-08-07T03:31:13Z</time>
+<time>2004-08-07T03:31:13.372Z</time>
   <course>142.979996</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -1397,7 +1397,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530493333" lon="-88.121763333">
   <ele>224.300000</ele>
-<time>2004-08-07T03:31:14Z</time>
+<time>2004-08-07T03:31:14.372Z</time>
   <course>145.029999</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1408,7 +1408,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530491667" lon="-88.121763333">
   <ele>224.300000</ele>
-<time>2004-08-07T03:31:15Z</time>
+<time>2004-08-07T03:31:15.372Z</time>
   <course>143.059998</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1419,7 +1419,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530490000" lon="-88.121765000">
   <ele>224.300000</ele>
-<time>2004-08-07T03:31:16Z</time>
+<time>2004-08-07T03:31:16.372Z</time>
   <course>145.490005</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1430,7 +1430,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530490000" lon="-88.121763333">
   <ele>224.500000</ele>
-<time>2004-08-07T03:31:17Z</time>
+<time>2004-08-07T03:31:17.370Z</time>
   <course>141.300003</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1441,7 +1441,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530488333" lon="-88.121763333">
   <ele>224.700000</ele>
-<time>2004-08-07T03:31:18Z</time>
+<time>2004-08-07T03:31:18.370Z</time>
   <course>141.190002</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1452,7 +1452,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530488333" lon="-88.121760000">
   <ele>225.000000</ele>
-<time>2004-08-07T03:31:19Z</time>
+<time>2004-08-07T03:31:19.370Z</time>
   <course>143.009995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1463,7 +1463,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530488333" lon="-88.121758333">
   <ele>225.200000</ele>
-<time>2004-08-07T03:31:20Z</time>
+<time>2004-08-07T03:31:20.370Z</time>
   <course>140.809998</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1474,7 +1474,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530490000" lon="-88.121755000">
   <ele>225.300000</ele>
-<time>2004-08-07T03:31:21Z</time>
+<time>2004-08-07T03:31:21.370Z</time>
   <course>140.789993</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1485,7 +1485,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530490000" lon="-88.121751667">
   <ele>225.300000</ele>
-<time>2004-08-07T03:31:22Z</time>
+<time>2004-08-07T03:31:22.370Z</time>
   <course>141.429993</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1496,7 +1496,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530491667" lon="-88.121750000">
   <ele>225.300000</ele>
-<time>2004-08-07T03:31:23Z</time>
+<time>2004-08-07T03:31:23.370Z</time>
   <course>142.300003</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1507,7 +1507,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530493333" lon="-88.121748333">
   <ele>225.200000</ele>
-<time>2004-08-07T03:31:24Z</time>
+<time>2004-08-07T03:31:24.370Z</time>
   <course>140.809998</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -1518,7 +1518,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530493333" lon="-88.121750000">
   <ele>225.200000</ele>
-<time>2004-08-07T03:31:25Z</time>
+<time>2004-08-07T03:31:25.370Z</time>
   <course>142.399994</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1529,7 +1529,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530495000" lon="-88.121751667">
   <ele>225.200000</ele>
-<time>2004-08-07T03:31:26Z</time>
+<time>2004-08-07T03:31:26.370Z</time>
   <course>140.330002</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -1540,7 +1540,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530496667" lon="-88.121753333">
   <ele>225.100000</ele>
-<time>2004-08-07T03:31:27Z</time>
+<time>2004-08-07T03:31:27.370Z</time>
   <course>137.770004</course>
   <speed>0.083333</speed>
   <fix>3d</fix>
@@ -1551,7 +1551,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530496667" lon="-88.121755000">
   <ele>225.000000</ele>
-<time>2004-08-07T03:31:28Z</time>
+<time>2004-08-07T03:31:28.370Z</time>
   <course>142.289993</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1562,7 +1562,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530498333" lon="-88.121756667">
   <ele>224.900000</ele>
-<time>2004-08-07T03:31:29Z</time>
+<time>2004-08-07T03:31:29.370Z</time>
   <course>140.869995</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1573,7 +1573,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530500000" lon="-88.121758333">
   <ele>224.700000</ele>
-<time>2004-08-07T03:31:30Z</time>
+<time>2004-08-07T03:31:30.370Z</time>
   <course>141.699997</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1584,7 +1584,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530500000" lon="-88.121758333">
   <ele>224.500000</ele>
-<time>2004-08-07T03:31:31Z</time>
+<time>2004-08-07T03:31:31.370Z</time>
   <course>141.699997</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1595,7 +1595,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530501667" lon="-88.121760000">
   <ele>224.300000</ele>
-<time>2004-08-07T03:31:32Z</time>
+<time>2004-08-07T03:31:32.370Z</time>
   <course>140.330002</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1606,7 +1606,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530501667" lon="-88.121761667">
   <ele>224.100000</ele>
-<time>2004-08-07T03:31:33Z</time>
+<time>2004-08-07T03:31:33.370Z</time>
   <course>139.050003</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1617,7 +1617,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530503333" lon="-88.121761667">
   <ele>223.900000</ele>
-<time>2004-08-07T03:31:34Z</time>
+<time>2004-08-07T03:31:34.370Z</time>
   <course>144.460007</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1628,7 +1628,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530505000" lon="-88.121763333">
   <ele>223.700000</ele>
-<time>2004-08-07T03:31:35Z</time>
+<time>2004-08-07T03:31:35.370Z</time>
   <course>139.029999</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1639,7 +1639,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530506667" lon="-88.121763333">
   <ele>223.400000</ele>
-<time>2004-08-07T03:31:36Z</time>
+<time>2004-08-07T03:31:36.370Z</time>
   <course>142.190002</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1650,7 +1650,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530508333" lon="-88.121763333">
   <ele>223.100000</ele>
-<time>2004-08-07T03:31:37Z</time>
+<time>2004-08-07T03:31:37.370Z</time>
   <course>141.350006</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1661,7 +1661,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530510000" lon="-88.121763333">
   <ele>222.700000</ele>
-<time>2004-08-07T03:31:38Z</time>
+<time>2004-08-07T03:31:38.370Z</time>
   <course>142.449997</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1672,7 +1672,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530513333" lon="-88.121761667">
   <ele>222.300000</ele>
-<time>2004-08-07T03:31:39Z</time>
+<time>2004-08-07T03:31:39.370Z</time>
   <course>142.000000</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1683,7 +1683,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530515000" lon="-88.121760000">
   <ele>221.900000</ele>
-<time>2004-08-07T03:31:40Z</time>
+<time>2004-08-07T03:31:40.370Z</time>
   <course>138.740005</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
@@ -1694,7 +1694,7 @@ xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/
 </trkpt>
 <trkpt lat="42.530516667" lon="-88.121758333">
   <ele>221.400000</ele>
-<time>2004-08-07T03:31:41Z</time>
+<time>2004-08-07T03:31:41.370Z</time>
   <course>137.910004</course>
   <speed>0.111111</speed>
   <fix>3d</fix>
index 1d5f4f51e600ef0bed542d0eece3018f83d19209..742ab49646707bd9f1c4887794b670b7f054c989 100644 (file)
@@ -6,50 +6,50 @@ TYPE=28
 NAME=ACTIVE LOG 006
 MINALT=130
 MAXALT=161
-MAXSPEED=11.42
+MAXSPEED=3.16
 DISTANCE=653
 DURATION=1989
 DATE=01.05.2005 15:02.47
 AVGSPEED=0.33
 [POINTS]
 "TP",01.05.2005,15:02.47,51.312938,12.413165,161,0.00,0.0,0
-"TP",01.05.2005,15:03.25,51.312883,12.413248,154,0.22,136.9,8.478119
-"TP",01.05.2005,15:03.39,51.312855,12.413248,148,0.22,180.0,11.566578
-"TP",01.05.2005,15:04.16,51.312827,12.413304,139,0.13,128.7,16.521235
-"TP",01.05.2005,15:05.02,51.312827,12.413276,145,0.04,270.0,18.457564
-"TP",01.05.2005,15:05.45,51.312827,12.413304,134,0.05,90.0,20.393893
-"TP",01.05.2005,15:06.44,51.312772,12.413332,131,0.11,162.6,26.865457
+"TP",01.05.2005,15:03.25,51.312883,12.413248,154,0.06,137.0,8.478119
+"TP",01.05.2005,15:03.39,51.312855,12.413248,148,0.06,180.0,11.566578
+"TP",01.05.2005,15:04.16,51.312827,12.413304,139,0.04,129.0,16.521235
+"TP",01.05.2005,15:05.02,51.312827,12.413276,145,0.02,270.0,18.457564
+"TP",01.05.2005,15:05.45,51.312827,12.413304,134,0.02,90.0,20.393893
+"TP",01.05.2005,15:06.44,51.312772,12.413332,131,0.03,163.0,26.865457
 "TP",01.05.2005,15:07.50,51.312772,12.413332,130,0.00,0.0,26.865457
-"TP",01.05.2005,15:08.19,51.312744,12.413332,132,0.11,180.0,29.963246
-"TP",01.05.2005,15:11.16,51.312799,12.413304,144,0.04,342.7,36.443717
-"TP",01.05.2005,15:12.34,51.312911,12.413443,147,0.20,38.0,52.143218
-"TP",01.05.2005,15:13.18,51.312994,12.413804,145,0.61,69.7,78.925927
-"TP",01.05.2005,15:13.27,51.313049,12.413804,145,0.69,0.0,85.112175
-"TP",01.05.2005,15:13.37,51.313049,12.413832,135,0.19,90.0,87.042662
-"TP",01.05.2005,15:13.46,51.313105,12.413832,135,0.69,0.0,93.219581
-"TP",01.05.2005,15:14.03,51.313216,12.413887,136,0.76,17.4,106.182252
-"TP",01.05.2005,15:14.16,51.313299,12.413971,135,0.84,32.0,117.119734
-"TP",01.05.2005,15:14.26,51.313272,12.414054,139,0.66,118.0,123.688361
-"TP",01.05.2005,15:14.30,51.313272,12.414110,139,0.97,90.0,127.555149
-"TP",01.05.2005,15:15.06,51.313049,12.414610,141,1.19,125.4,170.241955
-"TP",01.05.2005,15:15.27,51.312966,12.414832,140,0.86,121.0,188.281604
-"TP",01.05.2005,15:15.39,51.312911,12.414943,140,0.82,128.6,198.174693
-"TP",01.05.2005,15:25.31,51.312938,12.414971,152,0.01,32.1,201.819955
+"TP",01.05.2005,15:08.19,51.312744,12.413332,132,0.03,180.0,29.963246
+"TP",01.05.2005,15:11.16,51.312799,12.413304,144,0.01,343.0,36.443717
+"TP",01.05.2005,15:12.34,51.312911,12.413443,147,0.05,38.0,52.143218
+"TP",01.05.2005,15:13.18,51.312994,12.413804,145,0.15,70.0,78.925927
+"TP",01.05.2005,15:13.27,51.313049,12.413804,145,0.15,0.0,85.112175
+"TP",01.05.2005,15:13.37,51.313049,12.413832,135,0.05,90.0,87.042662
+"TP",01.05.2005,15:13.46,51.313105,12.413832,135,0.15,0.0,93.219581
+"TP",01.05.2005,15:14.03,51.313216,12.413887,136,0.23,17.0,106.182252
+"TP",01.05.2005,15:14.16,51.313299,12.413971,135,0.23,32.0,117.119734
+"TP",01.05.2005,15:14.26,51.313272,12.414054,139,0.15,118.0,123.688361
+"TP",01.05.2005,15:14.30,51.313272,12.414110,139,0.23,90.0,127.555149
+"TP",01.05.2005,15:15.06,51.313049,12.414610,141,0.31,125.0,170.241955
+"TP",01.05.2005,15:15.27,51.312966,12.414832,140,0.23,121.0,188.281604
+"TP",01.05.2005,15:15.39,51.312911,12.414943,140,0.23,129.0,198.174693
+"TP",01.05.2005,15:25.31,51.312938,12.414971,152,0.00,32.0,201.819955
 "TP",01.05.2005,15:25.40,51.312938,12.414971,152,0.00,0.0,201.819955
-"TP",01.05.2005,15:29.18,51.312966,12.414943,155,0.02,327.9,205.465216
-"TP",01.05.2005,15:30.30,51.313160,12.414582,149,0.46,310.7,238.629832
-"TP",01.05.2005,15:30.37,51.313160,12.414554,150,0.28,270.0,240.560315
-"TP",01.05.2005,15:30.47,51.313160,12.414443,151,0.77,270.0,248.293911
-"TP",01.05.2005,15:30.48,51.313160,12.414387,151,3.87,270.0,252.160708
-"TP",01.05.2005,15:30.52,51.313327,12.413915,150,9.43,299.5,289.898474
-"TP",01.05.2005,15:30.57,51.313688,12.413332,150,11.42,314.7,347.021422
-"TP",01.05.2005,15:31.03,51.313994,12.412860,150,7.88,316.0,394.311899
-"TP",01.05.2005,15:31.10,51.314216,12.412498,150,5.04,314.6,429.569729
-"TP",01.05.2005,15:32.38,51.314633,12.409554,143,2.39,282.8,639.630841
-"TP",01.05.2005,15:32.45,51.314633,12.409499,141,0.55,270.0,643.491682
+"TP",01.05.2005,15:29.18,51.312966,12.414943,155,0.01,328.0,205.465216
+"TP",01.05.2005,15:30.30,51.313160,12.414582,149,0.15,311.0,238.629832
+"TP",01.05.2005,15:30.37,51.313160,12.414554,150,0.08,270.0,240.560315
+"TP",01.05.2005,15:30.47,51.313160,12.414443,151,0.23,270.0,248.293911
+"TP",01.05.2005,15:30.48,51.313160,12.414387,151,1.08,270.0,252.160708
+"TP",01.05.2005,15:30.52,51.313327,12.413915,150,2.62,299.0,289.898474
+"TP",01.05.2005,15:30.57,51.313688,12.413332,150,3.16,315.0,347.021422
+"TP",01.05.2005,15:31.03,51.313994,12.412860,150,2.16,316.0,394.311899
+"TP",01.05.2005,15:31.10,51.314216,12.412498,150,1.39,315.0,429.569729
+"TP",01.05.2005,15:32.38,51.314633,12.409554,143,0.69,283.0,639.630841
+"TP",01.05.2005,15:32.45,51.314633,12.409499,141,0.15,270.0,643.491682
 "TP",01.05.2005,15:33.17,51.314633,12.409499,143,0.00,0.0,643.491682
-"TP",01.05.2005,15:33.42,51.314633,12.409443,139,0.15,270.0,647.358356
-"TP",01.05.2005,15:33.54,51.314633,12.409360,139,0.48,270.0,653.161283
+"TP",01.05.2005,15:33.42,51.314633,12.409443,139,0.05,270.0,647.358356
+"TP",01.05.2005,15:33.54,51.314633,12.409360,139,0.15,270.0,653.161283
 "TP",01.05.2005,15:34.04,51.314633,12.409360,138,0.00,0.0,653.161283
 "TP",01.05.2005,15:34.20,51.314633,12.409360,139,0.00,0.0,653.161283
 "TP",01.05.2005,15:35.45,51.314633,12.409360,144,0.00,0.0,653.161283
diff --git a/reference/track/vidaone.csv b/reference/track/vidaone.csv
new file mode 100644 (file)
index 0000000..a44e84a
--- /dev/null
@@ -0,0 +1,65 @@
+No,Latitude,Longitude\r
+1,30.062183,-91.610350\r
+2,30.062783,-91.610567\r
+3,30.062700,-91.608267\r
+4,30.062333,-91.607383\r
+5,30.061533,-91.605283\r
+6,30.059783,-91.599400\r
+7,30.057800,-91.596683\r
+8,30.055383,-91.594900\r
+9,30.053883,-91.592617\r
+10,30.049733,-91.589750\r
+11,30.049017,-91.589883\r
+12,30.048800,-91.592933\r
+13,30.046233,-91.596450\r
+14,30.045517,-91.598717\r
+15,30.047300,-91.600267\r
+16,30.047000,-91.599633\r
+17,30.046433,-91.599467\r
+18,30.046200,-91.598950\r
+19,30.046367,-91.597733\r
+20,30.046350,-91.597167\r
+21,30.046783,-91.596333\r
+22,30.047450,-91.595200\r
+23,30.047800,-91.594767\r
+24,30.048250,-91.594083\r
+25,30.048683,-91.593800\r
+26,30.049350,-91.593850\r
+27,30.050317,-91.593983\r
+28,30.050783,-91.594117\r
+29,30.051233,-91.594367\r
+30,30.051800,-91.594367\r
+31,30.052217,-91.594667\r
+32,30.053017,-91.594683\r
+33,30.054867,-91.595200\r
+34,30.053733,-91.594933\r
+35,30.053183,-91.594783\r
+36,30.052633,-91.594833\r
+37,30.052450,-91.595433\r
+38,30.052483,-91.595967\r
+39,30.052650,-91.596783\r
+40,30.053133,-91.597850\r
+41,30.053617,-91.597967\r
+42,30.053967,-91.597767\r
+43,30.053617,-91.598083\r
+44,30.053200,-91.597917\r
+45,30.052817,-91.597517\r
+46,30.052567,-91.596933\r
+47,30.052333,-91.596433\r
+48,30.052250,-91.595683\r
+49,30.052217,-91.595017\r
+50,30.051883,-91.594700\r
+51,30.051050,-91.594400\r
+52,30.050567,-91.594233\r
+53,30.050183,-91.594100\r
+54,30.049100,-91.593717\r
+55,30.048450,-91.594250\r
+56,30.048083,-91.594750\r
+57,30.047500,-91.595450\r
+58,30.047067,-91.596000\r
+59,30.046633,-91.596600\r
+60,30.046400,-91.597650\r
+61,30.046233,-91.598467\r
+62,30.046317,-91.598967\r
+63,30.046783,-91.599283\r
+64,30.047133,-91.599667\r
diff --git a/reference/track/vidaone.gpb b/reference/track/vidaone.gpb
new file mode 100644 (file)
index 0000000..897f846
Binary files /dev/null and b/reference/track/vidaone.gpb differ
diff --git a/reference/xol-sample-gpx.xol b/reference/xol-sample-gpx.xol
new file mode 100644 (file)
index 0000000..098820d
--- /dev/null
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<overlays>
+  <overlay version="1.0">
+    <center x="670866" y="212781"/>
+    <shapes>
+      <shape type="waypoint" name="002" comment="002" icon="Waypoint">
+        <points>
+          <point x="675012" y="211139"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="012" comment="012" icon="Waypoint">
+        <points>
+          <point x="676012" y="214354"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="015" comment="015" icon="Waypoint">
+        <points>
+          <point x="676153" y="214967"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="017" comment="017" icon="Waypoint">
+        <points>
+          <point x="676130" y="214977"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="019" comment="019" icon="Waypoint">
+        <points>
+          <point x="675700" y="215262"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="020" comment="020" icon="Waypoint">
+        <points>
+          <point x="675681" y="215205"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="021" comment="021" icon="Waypoint">
+        <points>
+          <point x="675635" y="215223"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="041" comment="041" icon="Waypoint">
+        <points>
+          <point x="669202" y="210720"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="044" comment="044" icon="Waypoint">
+        <points>
+          <point x="668394" y="211748"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="047" comment="047" icon="Waypoint">
+        <points>
+          <point x="668377" y="211767"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="056" comment="056" icon="Waypoint">
+        <points>
+          <point x="666154" y="211393"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="060" comment="060" icon="Waypoint">
+        <points>
+          <point x="666130" y="210902"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="062" comment="062" icon="Waypoint">
+        <points>
+          <point x="666150" y="210888"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="065" comment="065" icon="Waypoint">
+        <points>
+          <point x="666150" y="210888"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="068" comment="068" icon="Waypoint">
+        <points>
+          <point x="666121" y="210897"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="073" comment="073" icon="Waypoint">
+        <points>
+          <point x="665720" y="210597"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="074" comment="074" icon="Waypoint">
+        <points>
+          <point x="665579" y="210299"/>
+        </points>
+      </shape>
+      <shape type="polyline" lineSize="3" lineColor="#e60000" lineStyle="solid">
+        <waypoints>
+          <shape type="waypoint" timestamp="2007-08-21T18:37:58Z">
+            <points>
+              <point x="675012" y="211139"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:37:59Z">
+            <points>
+              <point x="676012" y="214354"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:00Z">
+            <points>
+              <point x="676153" y="214967"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:01Z">
+            <points>
+              <point x="676130" y="214977"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:02Z">
+            <points>
+              <point x="675700" y="215262"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:03Z">
+            <points>
+              <point x="675681" y="215205"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:04Z">
+            <points>
+              <point x="675635" y="215223"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:05Z">
+            <points>
+              <point x="669202" y="210720"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:06Z">
+            <points>
+              <point x="668394" y="211748"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:07Z">
+            <points>
+              <point x="668377" y="211767"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:08Z">
+            <points>
+              <point x="666154" y="211393"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:09Z">
+            <points>
+              <point x="666130" y="210902"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:10Z">
+            <points>
+              <point x="666150" y="210888"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:11Z">
+            <points>
+              <point x="666150" y="210888"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:12Z">
+            <points>
+              <point x="666121" y="210897"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:13Z">
+            <points>
+              <point x="665720" y="210597"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:14Z">
+            <points>
+              <point x="665579" y="210299"/>
+            </points>
+          </shape>
+        </waypoints>
+      </shape>
+    </shapes>
+  </overlay>
+</overlays>
diff --git a/reference/xol-sample.gpx b/reference/xol-sample.gpx
new file mode 100644 (file)
index 0000000..2319082
--- /dev/null
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx
+ version="1.0"
+creator="GPSBabel - http://www.gpsbabel.org"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns="http://www.topografix.com/GPX/1/0"
+xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
+<time>1970-01-01T00:00:00Z</time>
+<bounds minlat="47.040488246" minlon="8.301540393" maxlat="47.084048779" maxlon="8.441446441"/>
+<wpt lat="47.047043545" lon="8.425788893">
+  <name>002</name>
+  <cmt>002</cmt>
+  <desc>002</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.075846282" lon="8.439486963">
+  <name>012</name>
+  <cmt>012</cmt>
+  <desc>012</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.081343569" lon="8.441446441">
+  <name>015</name>
+  <cmt>015</cmt>
+  <desc>015</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.081436154" lon="8.441145283">
+  <name>017</name>
+  <cmt>017</cmt>
+  <desc>017</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.084048779" lon="8.435531152">
+  <name>019</name>
+  <cmt>019</cmt>
+  <desc>019</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.083538277" lon="8.435271435">
+  <name>020</name>
+  <cmt>020</cmt>
+  <desc>020</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.083705426" lon="8.434668739">
+  <name>021</name>
+  <cmt>021</cmt>
+  <desc>021</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.043906723" lon="8.349272821">
+  <name>041</name>
+  <cmt>041</cmt>
+  <desc>041</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.053236847" lon="8.338796347">
+  <name>044</name>
+  <cmt>044</cmt>
+  <desc>044</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.053409495" lon="8.338575490">
+  <name>047</name>
+  <cmt>047</cmt>
+  <desc>047</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.050271106" lon="8.309265450">
+  <name>056</name>
+  <cmt>056</cmt>
+  <desc>056</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.045857208" lon="8.308877971">
+  <name>060</name>
+  <cmt>060</cmt>
+  <desc>060</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.045729290" lon="8.309139097">
+  <name>062</name>
+  <cmt>062</cmt>
+  <desc>062</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.045729290" lon="8.309139097">
+  <name>065</name>
+  <cmt>065</cmt>
+  <desc>065</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.045813133" lon="8.308758815">
+  <name>068</name>
+  <cmt>068</cmt>
+  <desc>068</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.043154650" lon="8.303438762">
+  <name>073</name>
+  <cmt>073</cmt>
+  <desc>073</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<wpt lat="47.040488246" lon="8.301540393">
+  <name>074</name>
+  <cmt>074</cmt>
+  <desc>074</desc>
+  <sym>Waypoint</sym>
+</wpt>
+<trk>
+<trkseg>
+<trkpt lat="47.047043545" lon="8.425788893">
+<time>2007-08-21T18:37:58Z</time>
+</trkpt>
+<trkpt lat="47.075846282" lon="8.439486963">
+<time>2007-08-21T18:37:59Z</time>
+</trkpt>
+<trkpt lat="47.081343569" lon="8.441446441">
+<time>2007-08-21T18:38:00Z</time>
+</trkpt>
+<trkpt lat="47.081436154" lon="8.441145283">
+<time>2007-08-21T18:38:01Z</time>
+</trkpt>
+<trkpt lat="47.084048779" lon="8.435531152">
+<time>2007-08-21T18:38:02Z</time>
+</trkpt>
+<trkpt lat="47.083538277" lon="8.435271435">
+<time>2007-08-21T18:38:03Z</time>
+</trkpt>
+<trkpt lat="47.083705426" lon="8.434668739">
+<time>2007-08-21T18:38:04Z</time>
+</trkpt>
+<trkpt lat="47.043906723" lon="8.349272821">
+<time>2007-08-21T18:38:05Z</time>
+</trkpt>
+<trkpt lat="47.053236847" lon="8.338796347">
+<time>2007-08-21T18:38:06Z</time>
+</trkpt>
+<trkpt lat="47.053409495" lon="8.338575490">
+<time>2007-08-21T18:38:07Z</time>
+</trkpt>
+<trkpt lat="47.050271106" lon="8.309265450">
+<time>2007-08-21T18:38:08Z</time>
+</trkpt>
+<trkpt lat="47.045857208" lon="8.308877971">
+<time>2007-08-21T18:38:09Z</time>
+</trkpt>
+<trkpt lat="47.045729290" lon="8.309139097">
+<time>2007-08-21T18:38:10Z</time>
+</trkpt>
+<trkpt lat="47.045729290" lon="8.309139097">
+<time>2007-08-21T18:38:11Z</time>
+</trkpt>
+<trkpt lat="47.045813133" lon="8.308758815">
+<time>2007-08-21T18:38:12Z</time>
+</trkpt>
+<trkpt lat="47.043154650" lon="8.303438762">
+<time>2007-08-21T18:38:13Z</time>
+</trkpt>
+<trkpt lat="47.040488246" lon="8.301540393">
+<time>2007-08-21T18:38:14Z</time>
+</trkpt>
+</trkseg>
+</trk>
+</gpx>
diff --git a/reference/xol-sample.xol b/reference/xol-sample.xol
new file mode 100644 (file)
index 0000000..4f81d9b
--- /dev/null
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<overlays>
+  <overlay version="1.0">
+    <center x="670867" y="212782"/>
+    <shapes>
+      <shape type="waypoint" name="002" icon="Waypoint">
+        <points>
+          <point x="675012" y="211140"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="012" icon="Waypoint">
+        <points>
+          <point x="676012" y="214355"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="015" icon="Waypoint">
+        <points>
+          <point x="676153" y="214968"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="017" icon="Waypoint">
+        <points>
+          <point x="676130" y="214978"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="019" icon="Waypoint">
+        <points>
+          <point x="675700" y="215263"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="020" icon="Waypoint">
+        <points>
+          <point x="675681" y="215206"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="021" icon="Waypoint">
+        <points>
+          <point x="675635" y="215224"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="041" icon="Waypoint">
+        <points>
+          <point x="669202" y="210721"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="044" icon="Waypoint">
+        <points>
+          <point x="668394" y="211749"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="047" icon="Waypoint">
+        <points>
+          <point x="668377" y="211768"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="056" icon="Waypoint">
+        <points>
+          <point x="666154" y="211394"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="060" icon="Waypoint">
+        <points>
+          <point x="666130" y="210903"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="062" icon="Waypoint">
+        <points>
+          <point x="666150" y="210889"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="065" icon="Waypoint">
+        <points>
+          <point x="666150" y="210889"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="068" icon="Waypoint">
+        <points>
+          <point x="666121" y="210898"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="073" icon="Waypoint">
+        <points>
+          <point x="665720" y="210598"/>
+        </points>
+      </shape>
+      <shape type="waypoint" name="074" icon="Waypoint">
+        <points>
+          <point x="665579" y="210300"/>
+        </points>
+      </shape>
+      <shape type="polyline" lineSize="3" lineColor="#e60000" lineStyle="solid">
+        <waypoints>
+          <shape type="waypoint" timestamp="2007-08-21T18:37:58Z">
+            <points>
+              <point x="675012" y="211140"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:37:59Z">
+            <points>
+              <point x="676012" y="214355"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:00Z">
+            <points>
+              <point x="676153" y="214968"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:01Z">
+            <points>
+              <point x="676130" y="214978"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:02Z">
+            <points>
+              <point x="675700" y="215263"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:03Z">
+            <points>
+              <point x="675681" y="215206"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:04Z">
+            <points>
+              <point x="675635" y="215224"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:05Z">
+            <points>
+              <point x="669202" y="210721"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:06Z">
+            <points>
+              <point x="668394" y="211749"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:07Z">
+            <points>
+              <point x="668377" y="211768"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:08Z">
+            <points>
+              <point x="666154" y="211394"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:09Z">
+            <points>
+              <point x="666130" y="210903"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:10Z">
+            <points>
+              <point x="666150" y="210889"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:11Z">
+            <points>
+              <point x="666150" y="210889"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:12Z">
+            <points>
+              <point x="666121" y="210898"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:13Z">
+            <points>
+              <point x="665720" y="210598"/>
+            </points>
+          </shape>
+          <shape type="waypoint" timestamp="2007-08-21T18:38:14Z">
+            <points>
+              <point x="665579" y="210300"/>
+            </points>
+          </shape>
+        </waypoints>
+      </shape>
+    </shapes>
+  </overlay>
+</overlays>
index cd9648cf6bb9fb91fa8ffad273be3f6ca894f3d0..519bde10ee4af71bfa77c66fb712ead6bd2697d7 100644 (file)
--- a/saroute.c
+++ b/saroute.c
@@ -27,7 +27,7 @@
 #include "defs.h"
 #include "grtcirc.h"
 
-FILE *infile;
+gbfile *infile;
 
 char *turns_important = NULL;
 char *turns_only = NULL;
@@ -53,49 +53,28 @@ arglist_t saroute_args[] = {
        ARG_TERMINATOR
 };
 
-unsigned short
-ReadShort(FILE * f)
-{
-       gbuint16 result = 0;
-
-       if (!fread(&result, sizeof (result), 1, f)) {
-               fatal(MYNAME ": Attempt to read past EOF");
-       }
-       return le_read16(&result);
-}
-
-unsigned long
-ReadLong(FILE * f)
-{
-       gbuint32 result = 0;
-
-       if (!fread(&result, sizeof (result), 1, f))
-               fatal(MYNAME ": Attempt to read past EOF");
-       return le_read32(&result);
-}
+#define ReadShort(f) gbfgetint16(f)
+#define ReadLong(f) gbfgetint32(f)
 
 unsigned char *
-ReadRecord(FILE * f,
-          unsigned long size)
+ReadRecord(gbfile *f, gbsize_t size)
 {
        unsigned char *result = (unsigned char *) xmalloc(size);
 
-       if (!fread(result, size, 1, f))
-               fatal(MYNAME ": Attempt to read past EOF");
+       (void)gbfread(result, size, 1, f);
        return result;
 }
 
 void
-Skip(FILE * f,
-     unsigned long distance)
+Skip(gbfile * f, gbsize_t distance)
 {
-       fseek(f, distance, SEEK_CUR);
+       gbfseek(f, distance, SEEK_CUR);
 }
 
 static void
 rd_init(const char *fname)
 {
-       infile = xfopen(fname, "rb", MYNAME);
+       infile = gbfopen(fname, "rb", MYNAME);
        if ( split && (turns_important || turns_only )) {
                fatal( MYNAME 
                      ": turns options are not compatible with split\n" );
@@ -116,32 +95,32 @@ rd_init(const char *fname)
 static void
 rd_deinit(void)
 {
-       fclose(infile);
+       gbfclose(infile);
 }
 
 static void
 my_read(void)
 {
 
-       unsigned short version;
-       unsigned long count;
-       unsigned long outercount;
-       unsigned long recsize;
-       unsigned short stringlen;
+       gbuint16 version;
+       gbuint32 count;
+       gbuint32 outercount;
+       gbuint32 recsize;
+       gbuint16 stringlen;
        unsigned char *record;
        static int serial = 0;
        struct ll {
                gbint32 lat;
                gbint32 lon;
        } *latlon;
-       unsigned short coordcount;
+       gbuint16 coordcount;
        route_head *track_head = NULL;
        route_head *old_track_head = NULL;
        waypoint *wpt_tmp;
        char *routename = NULL;
        double seglen = 0.0;
-       long  starttime = 0;
-       long  transittime = 0;
+       gbint32  starttime = 0;
+       gbint32  transittime = 0;
        double totaldist = 0.0;
        double oldlat = 0;
        double oldlon = 0;
@@ -168,7 +147,7 @@ my_read(void)
         */
        record = ReadRecord(infile, recsize);
 
-       stringlen = le_read16((unsigned short *)(record + 0x1a));
+       stringlen = le_read16((gbuint16 *)(record + 0x1a));
        if ( stringlen ) {
                routename = (char *)xmalloc( stringlen + 1 );
                routename[stringlen] = '\0';
@@ -215,23 +194,36 @@ my_read(void)
                        wpt_tmp->latitude = lat;
                        wpt_tmp->longitude = -lon;
                        if ( control ) {
-                           int addrlen = le_read16((short *)
-                               (((char *)record)+18));
-                           int cmtlen = le_read16((short *)
-                               (((char *)record)+20+addrlen));
-                           wpt_tmp->notes = (char *)xmalloc(cmtlen+1);
-                           wpt_tmp->shortname = (char *)xmalloc(addrlen+1);
-                           wpt_tmp->notes[cmtlen] = '\0';
+                           int obase, addrlen, cmtlen;
+
+                           /* Somewhere around TopoUSA 6.0, these moved  */
+                           /* This block also seems to get miscompiled 
+                            * at -O0 on Linux.  I tried rewriting it to
+                            * reduce/eliminate some of the really funky
+                            * pointer math and casting that was here.
+                            */
+                           if (version >= 11) {
+                               obase = 20;
+                           } else {
+                               obase = 18;
+                           }
+
+                           addrlen = le_read16(&record[obase]);
+                           cmtlen = le_read16(&record[obase+2+addrlen]);
+
+                           wpt_tmp->shortname = xmalloc(addrlen+1);
                            wpt_tmp->shortname[addrlen]='\0';
+                           wpt_tmp->notes = xmalloc(cmtlen+1);
+                           wpt_tmp->notes[cmtlen] = '\0';
                            memcpy(wpt_tmp->notes, 
-                                  ((char *)record)+22+addrlen,
+                                  record+obase+4+addrlen,
                                   cmtlen );
                            memcpy(wpt_tmp->shortname,
-                                  ((char *)record)+20,
+                                  record+obase+2,
                                   addrlen );
                        }
                        else {
-                           wpt_tmp->shortname = (char *) xmalloc(7);
+                           wpt_tmp->shortname = xmalloc(7);
                            sprintf( wpt_tmp->shortname, "\\%5.5x", serial++ );
                        }
                        if ( control == 2 ) {
@@ -301,7 +293,7 @@ my_read(void)
                        ReadShort(infile);
                        recsize = ReadLong(infile);
                        record = ReadRecord(infile, recsize);
-                       stringlen = le_read16((unsigned short *)record);
+                       stringlen = le_read16((gbuint16 *)record);
                        if ( split && stringlen ) {
                            if ( track_head->rte_waypt_ct ) {
                                old_track_head = track_head;
@@ -325,14 +317,14 @@ my_read(void)
                        if ( timesynth ) {
                                seglen = le_read_double(
                                           record + 2 + stringlen + 0x08 );
-                               starttime = le_read32((unsigned long *)
+                               starttime = le_read32((gbuint32 *)
                                        (record + 2 + stringlen + 0x30 ));
-                               transittime = le_read32((unsigned long *)
+                               transittime = le_read32((gbuint32 *)
                                        (record + 2 + stringlen + 0x10 ));
                                seglen /= 5280*12*2.54/100000; /* to miles */
                        }
                                
-                       coordcount = le_read16((unsigned short *)
+                       coordcount = le_read16((gbuint16 *)
                                        (record + 2 + stringlen + 0x3c));
                        latlon = (struct ll *)(record + 2 + stringlen + 0x3c + 2);
                        count--;
index 76c7c3edf327e7c402feffa78727a4254963877c..ac69fd2320e13913decf95f23708851f61c36268 100644 (file)
--- a/stmsdf.c
+++ b/stmsdf.c
@@ -605,7 +605,7 @@ static void
 track_disp_custom_cb(const waypoint *wpt)
 {
        if (wpt->creation_time && (wpt->altitude != unknown_alt)) {
-               gbfprintf(fout, "%lu,%.f\n", wpt->creation_time - start_time, wpt->altitude);
+               gbfprintf(fout, "%d,%.f\n", (int)(wpt->creation_time - start_time), wpt->altitude);
        }
 }
 
index 43c8cd1b949c1c4d4c562a6fa01d539d9a4b2d76..61913768e8d360dd3b455c76361c403e411f8ed9 100644 (file)
@@ -7,6 +7,7 @@
 # 
 DESCRIPTION    Kartex 5 Track File
 EXTENSION      ktf
+DATATYPE       TRACK
 SHORTLEN       10
 SHORTWHITE     1
 #
index 364615485e497c184a3278c36b1743ff463b8ac3..dbc61c7412650d9ab64df98e5eba13dd1a63d018 100644 (file)
@@ -12,7 +12,7 @@
 # GC171C,44.70605,-85.62265,The Michigan Frog by RealDcoy & LRB,http://www.geocaching.com/seek/cache_details.aspx?ID=5916,Traditional Cache
 #
 
-DESCRIPTION            Microsoft Streets and Trips 2002-2006
+DESCRIPTION            Microsoft Streets and Trips 2002-2007
 EXTENSION               txt
 
 
index 7acae5591a1decdf960719b34a55b60c2f8ca00b..a029a99be0c30f10758abc2c486e8640230202bd 100644 (file)
@@ -6,6 +6,7 @@
 #
 DESCRIPTION    Sportsim track files (part of zipped .ssz files) 
 EXTENSION      txt
+DATATYPE       TRACK
 
 #
 # FILE LAYOUT DEFINITIIONS:
index bb88d4ac903552cca92d26489055882aec51a52d..60e9af9ff615a84a2a6e00f45bb31e8eb1ad3e6d 100644 (file)
@@ -17,7 +17,7 @@ ENCODING              MS-ANSI
 #
 # INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:
 #
-IFIELD LAT_10E5, "", "%.f"
 IFIELD LON_10E5, "", "%.f"
+IFIELD LAT_10E5, "", "%.f"
 IFIELD SHORTNAME, "", "%s"
 IFIELD CONSTANT, "0", "%s"
index 8e192eb9f0c0e63d244e07d1afcfda680a45b87d..088c7ca96a5ef0f5851d1bfb890870528d807378 100755 (executable)
--- a/test-all
+++ b/test-all
@@ -4,11 +4,12 @@
 
 PNAME=${PNAME:-./gpsbabel}
 REFGPX="reference/expertgps.gpx"       # reference file for all tests
-EXCL="ozi vitosmt"                     # exclude formats from test
+EXCL="exif ozi vitosmt xol"                    # exclude formats from test
 CAPS=""
 TEMPDIR=${GBTEMP:-/tmp}/gb-test-all
 CATALOG=/tmp/gb-test-all.done
 LOGFILE=/tmp/gb-test-all.log
+RNDFILE=/tmp/gb-random.gpx
 
 # options
 vg=0
@@ -176,6 +177,10 @@ while [ $# -gt 0 ]; do
        -c|--clean)
            trap "rm -fr $TEMPDIR; exit 1" 0 1 2 3 15
            ;;
+       -n|--random)
+           ${PNAME} -i random -w -f - -i random,points=48 -r -f - -i random,points=120 -t -f - -o gpx,gpxver=1.1 -F $RNDFILE
+           REFGPX=/tmp/gb-random.gpx
+           ;;
        -r|--reference)
            shift
            REFGPX=$1
diff --git a/testo b/testo
index 63202611bb7c0ce945306a399e91dcd2673f8695..b6a9a4ed7f1ff1bee0d4158456ed820e351f3b87 100755 (executable)
--- a/testo
+++ b/testo
@@ -104,6 +104,9 @@ ${PNAME} -i gpx -f ${TMPDIR}/gtm1.gpx -o gtm -F ${TMPDIR}/gtm.gtm.gz
 ${PNAME} -i gtm -f ${TMPDIR}/gtm.gtm.gz -o gpx -F ${TMPDIR}/gtm2.gpx
 compare ${TMPDIR}/gtm1.gpx ${TMPDIR}/gtm2.gpx
 bincompare ${TMPDIR}/gtm.gtm.gz ${REFERENCE}/sample.gtm.gz
+gunzip -c ${TMPDIR}/gtm.gtm.gz > ${TMPDIR}/gtm.gtm
+gunzip -c ${REFERENCE}/sample.gtm.gz > ${TMPDIR}/sample.gtm
+bincompare ${TMPDIR}/gtm.gtm ${REFERENCE}/sample.gtm
 
 # Magellan Mapsend
 rm -f ${TMPDIR}/mm.mapsend ${TMPDIR}/mm.gps
@@ -163,7 +166,7 @@ compare ${REFERENCE}/xmap ${TMPDIR}/xmap
 
 # PCX (Garmin mapsource import) file format
 rm -f ${TMPDIR}/mm.pcx ${TMPDIR}/pcx.gps
-${PNAME} -i geo -f ${REFERENCE}/../geocaching.loc -o pcx -F ${TMPDIR}/mm.pcx
+${PNAME} -i gpx -f ${REFERENCE}/geocaching.gpx -o pcx -F ${TMPDIR}/mm.pcx
 ${PNAME} -i pcx -f ${TMPDIR}/mm.pcx -o gpsutil -F ${TMPDIR}/pcx.gps
 compare ${TMPDIR}/mm.gps ${TMPDIR}/gu.wpt
 ${PNAME} -t -i gpx -f ${REFERENCE}/track/tracks.gpx -o pcx -F ${TMPDIR}/pcx.trk
@@ -365,7 +368,7 @@ compare ${TMPDIR}/ms1.gpx ${TMPDIR}/ms2.gpx
 rm -f ${TMPDIR}/mps-track.mps
 ${PNAME} -t -i mapsource -f ${REFERENCE}/track/mps-track.mps -o mapsource,mpsverout=3 \
          -F ${TMPDIR}/mps-track.mps
-compare ${TMPDIR}/mps-track.mps ${REFERENCE}/track/
+compare ${TMPDIR}/mps-track.mps ${REFERENCE}/track
 
 # Now do a test of reading waypoints from a track-only file - should have an empty result
 rm -f ${TMPDIR}/mps-track.mps
@@ -426,7 +429,7 @@ rm -f ${TMPDIR}/radius.csv
 ${PNAME} -i geo -f ${REFERENCE}/../geocaching.loc \
                -x radius,lat=35.9720,lon=-87.1347,distance=14.7 \
                -o csv -F ${TMPDIR}/radius.csv
-compare ${TMPDIR}/radius.csv ${REFERENCE}/
+compare ${TMPDIR}/radius.csv ${REFERENCE}
 
 #
 # magellan SD card waypoint / route format
@@ -1041,6 +1044,8 @@ compare ${TMPDIR}/garmin_txt-uni.csv ${REFERENCE}/garmin_txt-uni.csv
 #
 ${PNAME} -i nmea -f ${REFERENCE}/track/nmea -o gpx -F ${TMPDIR}/nmea.gpx
 compare ${TMPDIR}/nmea.gpx ${REFERENCE}/track/nmea.gpx
+${PNAME} -i nmea -f ${REFERENCE}/track/nmea+ms.txt -o gpx -F ${TMPDIR}/nmea+ms.gpx
+compare ${TMPDIR}/nmea+ms.gpx ${REFERENCE}/track/nmea+ms.gpx
 
 #
 # Wfff.
@@ -1253,5 +1258,78 @@ bincompare ${TMPDIR}/garmin_gpi3a.gpi ${TMPDIR}/garmin_gpi3b.gpi
 ${PNAME} -i garmin_gpi -f ${REFERENCE}/gpi_ext-sample.gpi -o unicsv -F ${TMPDIR}/gpi_ext-sample.csv
 compare ${REFERENCE}/gpi_ext-sample.csv ${TMPDIR}/gpi_ext-sample.csv
 
+#
+# Nokia  LMX
+#
+${PNAME} -i lmx -f ${REFERENCE}/nokia.lmx -o lmx -F ${TMPDIR}/nokia.lmx
+compare ${REFERENCE}/nokia.lmx ${TMPDIR}/nokia.lmx
+
+#
+# Swiss Map (.xol) tests
+#
+${PNAME} -i xol -f ${REFERENCE}/xol-sample.xol -o gpx -F ${TMPDIR}/xol-sample.gpx
+compare ${TMPDIR}/xol-sample.gpx ${REFERENCE}/xol-sample.gpx
+${PNAME} -i gpx -f ${REFERENCE}/xol-sample.gpx -o xol -F ${TMPDIR}/xol-sample-gpx.xol
+compare ${TMPDIR}/xol-sample-gpx.xol ${REFERENCE}/xol-sample-gpx.xol
+
+#
+# NaviLink waypoints
+#
+${PNAME} -i navilink -f ${REFERENCE}/navilink_waypoints.wpt -o gpx -F ${TMPDIR}/navilink_waypoints.gpx
+compare ${TMPDIR}/navilink_waypoints.gpx ${REFERENCE}/navilink_waypoints.gpx
+${PNAME} -i gpx -f ${TMPDIR}/navilink_waypoints.gpx -o navilink -F ${TMPDIR}/navilink_waypoints_gpx.wpt
+#compare ${TMPDIR}/navilink_waypoints_gpx.wpt ${REFERENCE}/navilink_waypoints_gpx.wpt
+
+#
+# NaviLink tracks
+#
+${PNAME} -t -i navilink -f ${REFERENCE}/navilink_tracks.trk -o gpx -F ${TMPDIR}/navilink_tracks.gpx
+compare ${TMPDIR}/navilink_tracks.gpx ${REFERENCE}/navilink_tracks.gpx
+${PNAME} -t -i gpx -f ${TMPDIR}/navilink_tracks.gpx -o navilink -F ${TMPDIR}/navilink_tracks_gpx.trk
+#compare ${TMPDIR}/navilink_tracks_gpx.trk ${REFERENCE}/navilink_tracks_gpx.trk
+
+#
+# MTK logger tests
+#
+rm -f ${TMPDIR}/mtk_logger.*
+${PNAME} -t -w -i mtk-bin,csv=${TMPDIR}/mtk_logger.csv -f ${REFERENCE}/track/mtk_logger.bin -o gpx -F ${TMPDIR}/mtk_logger.gpx
+compare ${TMPDIR}/mtk_logger.gpx ${REFERENCE}/track/mtk_logger.gpx
+## CSV compare needs to be done with '-w' - ignore whitespace.
+compare ${TMPDIR}/mtk_logger.csv ${REFERENCE}/track/mtk_logger.csv
+
+#
+# MagicMaps IK3D Project File .ikt test
+#
+${PNAME} -i ik3d -f ${REFERENCE}/ik3d-sample.ikt -o gpx -F ${TMPDIR}/ik3d-sample.gpx
+compare ${TMPDIR}/ik3d-sample.gpx ${REFERENCE}/ik3d-sample.gpx
+
+# osm data files
+rm -f ${TMPDIR}/osm-*
+${PNAME} -i osm -f ${REFERENCE}/osm-data.xml -o gpx -F ${TMPDIR}/osm-data.gpx
+compare ${TMPDIR}/osm-data.gpx ${REFERENCE}/osm-data.gpx
+
+# Destinator POI
+${PNAME} -i gpx -f ${REFERENCE}/expertgps.gpx -o destinator_poi -F ${TMPDIR}/destinator_poi.dat
+${PNAME} -i destinator_poi -f ${TMPDIR}/destinator_poi.dat -w -o unicsv,utc=0 -F ${TMPDIR}/destinator_poi.txt
+compare ${TMPDIR}/destinator_poi.txt ${REFERENCE}/destinator_poi.txt
+
+# Destinator Itinerary
+${PNAME} -i gpx -f ${REFERENCE}/expertgps.gpx -o destinator_itn -F ${TMPDIR}/destinator_itn.dat
+${PNAME} -i destinator_itn -f ${TMPDIR}/destinator_itn.dat -r -o unicsv,utc=0 -F ${TMPDIR}/destinator_itn.txt
+compare ${TMPDIR}/destinator_itn.txt ${REFERENCE}/route/destinator_itn.txt
+
+# Destinator TrackLog
+${PNAME} -i nmea -f ${REFERENCE}/track/nmea+ms.txt -o destinator_trl -F ${TMPDIR}/destinator_trl.dat
+${PNAME} -i destinator_trl -f ${TMPDIR}/destinator_trl.dat -t -o unicsv,utc=0 -F ${TMPDIR}/destinator_trl.txt
+compare ${TMPDIR}/destinator_trl.txt ${REFERENCE}/track/destinator_trl.txt
+
+# Exif format test (read only)
+${PNAME} -i exif -f ${REFERENCE}/IMG_2065.JPG -o unicsv,utc=0 -F ${TMPDIR}/exif-dat.csv
+compare ${TMPDIR}/exif-dat.csv ${REFERENCE}/exif-dat.csv
+
+# VidaOne track logs
+${PNAME} -i vidaone -f ${REFERENCE}/track/vidaone.gpb -t -o unicsv -F ${TMPDIR}/vidaone.csv
+compare ${TMPDIR}/vidaone.csv ${REFERENCE}/track/vidaone.csv
+
 
 exit 0
index db894b782f1b488e3d5004c6f014c38cc094584e..a85de57ba80a9ba2e390b190a087995ec3e76967 100644 (file)
--- a/tomtom.c
+++ b/tomtom.c
@@ -42,8 +42,8 @@
 
 #define MYNAME "TomTom"
 
-static FILE *file_in;
-static FILE *file_out;
+static gbfile *file_in;
+static gbfile *file_out;
 
 static
 arglist_t tomtom_args[] = {
@@ -53,43 +53,29 @@ arglist_t tomtom_args[] = {
 static void
 rd_init(const char *fname)
 {
-       file_in = xfopen(fname, "rb", MYNAME);
+       file_in = gbfopen_le(fname, "rb", MYNAME);
 }
 
 static void
 rd_deinit(void)
 {
-       fclose(file_in);
+       gbfclose(file_in);
 }
 
 static void
 wr_init(const char *fname)
 {
-       file_out = xfopen(fname, "wb", MYNAME);
+       file_out = gbfopen_le(fname, "wb", MYNAME);
 }
 
 static void
 wr_deinit(void)
 {
-       fclose(file_out);
+       gbfclose(file_out);
 }
 
-static unsigned long
-read_long(FILE * f)
-{
-        gbuint32 result = 0;
-       
-        fread(&result, sizeof (result), 1, f);
-        return le_read32(&result);
-}
-
-static unsigned char
-read_char( FILE *f)
-{
-       unsigned char result = 0;
-       fread( &result, 1, 1, f );
-       return result;
-}
+#define read_long(f) gbfgetint32((f))
+#define read_char(f) (unsigned char)gbfgetc((f))
 
 static void
 data_read(void)
@@ -100,7 +86,7 @@ data_read(void)
        long y;
        char *desc;
        waypoint *wpt_tmp;
-       while (!feof( file_in ) ) {
+       while (!gbfeof( file_in ) ) {
                rectype = read_char( file_in );
                if ( rectype == 1 ) {
                        /* a block header; ignored on read */
@@ -115,7 +101,7 @@ data_read(void)
                        x = read_long( file_in );
                        y = read_long( file_in );
                        desc = (char *)xmalloc( recsize - 13 );
-                       fread( desc, recsize-13, 1, file_in );
+                       gbfread( desc, recsize-13, 1, file_in );
                        
                        wpt_tmp = waypt_new();
 
@@ -175,31 +161,17 @@ compare_lon(const void *a, const void *b)
        return compare_lat(a,b);
 }
 
-static void 
-write_long( FILE *file, long value ) {
-        gbuint32 tmp = 0;
-        le_write32( &tmp, value );
-                
-        fwrite( &tmp, sizeof(tmp), 1, file );
-} 
+#define write_long(f,v) gbfputint32((v),f)
 
 static void
-write_float_as_long( FILE *file, double value ) 
+write_float_as_long( gbfile *file, double value ) 
 {
        long tmp = (value + 0.500000000001);
        write_long( file, tmp);
 }
 
-static void
-write_char( FILE *file, unsigned char value ) {
-       fwrite( &value, 1, 1, file );
-}
-
-static void
-write_string( FILE *file, char *str ) {
-       fwrite( str, strlen(str), 1, file );
-       write_char( file, '\0' );
-}
+#define write_char(f,c) gbfputc((c),f)
+#define write_string(f,s) gbfputcstr((s),f)
 
 struct blockheader {
        struct hdr *start;
@@ -214,7 +186,7 @@ struct blockheader {
 };
 
 static void
-write_blocks( FILE *f, struct blockheader *blocks ) {
+write_blocks( gbfile *f, struct blockheader *blocks ) {
        int i;
        write_char( f, 1 );
        write_long( f, blocks->size );
@@ -230,11 +202,26 @@ write_blocks( FILE *f, struct blockheader *blocks ) {
        }
        if ( !blocks->ch1 && !blocks->ch2 ) {
                for ( i = 0; i < blocks->count; i++ ) {
+                       char desc_field [256];
                        write_char( f, 2 );
-                       write_long( f, strlen( blocks->start[i].wpt->description ) + 14 );
+            if (global_opts.smart_names && 
+                       blocks->start[i].wpt->gc_data.diff && 
+                       blocks->start[i].wpt->gc_data.terr) {
+                snprintf(desc_field,sizeof(desc_field),"%s(t%ud%u)%s(type%dcont%d)",blocks->start[i].wpt->description,
+                blocks->start[i].wpt->gc_data.terr/10,
+                blocks->start[i].wpt->gc_data.diff/10,
+                blocks->start[i].wpt->shortname,
+                (int) blocks->start[i].wpt->gc_data.type,
+                (int) blocks->start[i].wpt->gc_data.container);
+                //Unfortunately enums mean we get numbers for cache type and container.
+            } else {
+                snprintf(desc_field, sizeof(desc_field), "%s",
+                       blocks->start[i].wpt->description);
+            }
+                       write_long( f, strlen( desc_field ) + 14 );
                        write_float_as_long( f, blocks->start[i].wpt->longitude*100000);
                        write_float_as_long( f, blocks->start[i].wpt->latitude*100000);
-                       write_string( f, blocks->start[i].wpt->description);
+                       write_string( f, desc_field);
                }
        }
 }      
diff --git a/tools/mac-config b/tools/mac-config
new file mode 100755 (executable)
index 0000000..c986085
--- /dev/null
@@ -0,0 +1,12 @@
+
+case `uname -r` in
+  9.0) ;; # 10.3/
+  9.1) ;; # 10.4/Tiger
+  *)   XFLAGS="-mmacosx-version-min=10.4" ;; # 10.5/Leopard
+esac 
+SRC=.
+CFLAGS="$XFLAGS  -O  -arch i386 -arch ppc" \
+  LDFLAGS="$XFLAGS -arch i386 -arch ppc"   ${SRC}/configure \
+ --with-libexpat=${SRC}/mac/lib/libexpat.a \
+ --with-expathdr=${SRC}/mac/include
+
index 8377e5dbe378989d8a7df45ea8ef3e2bcadaa4a5..00848db72206670d500d4b58ea2b56d0b25f6c84 100755 (executable)
@@ -36,7 +36,7 @@ getcap($1, $2, $3, $5)
 FMTS=`./gpsbabel -^2 | grep -v '^internal' | sed 's/\&/\&amp;/' | awk  -F'\t' '{print $3}'`
 for f in $FMTS
 do
-       [ ! -f @DOCDIR@/htmldoc-development/fmt_${f}.html ] && echo Missing doc for $f
+       [ ! -f @DOCDIR@/htmldoc-@DOCVERSION@/fmt_${f}.html ] && echo Missing doc for $f
 done
 
 exit 0
diff --git a/tools/mkdmg b/tools/mkdmg
new file mode 100755 (executable)
index 0000000..19581ab
--- /dev/null
@@ -0,0 +1,40 @@
+
+VERSION=$(./gpsbabel -V | awk '/\./ {print $3}')
+NAME=GPSBabel+-${VERSION}
+UDMG=${NAME}-uncompressed.dmg
+DMG=${NAME}.dmg
+WORKDIR=/tmp/${NAME}-$$
+QUIET=-quiet
+
+
+checkgpsbabel() {
+  file $1 | grep -q "2 architectures" || {
+    echo $1 is not a universal binary.  Aborting
+    exit 1
+  }
+  otool -L $1 | grep expat && {
+    echo $1 does not staticly link expat.  Use tools/mac-config
+    exit 1
+  }
+}
+
+
+makedmg() {
+  mkdir -p $WORKDIR
+  rm -f ${UDMG} ${DMG}
+
+  trap 'rm -fr $WORKDIR' 0 1 15
+
+  # Create the image uncompressed based on our preloaded copy.
+  hdiutil create ${QUIET} -srcfolder mac/dmg-contents -scrub -size 15m ${UDMG} -format UDRW -volname ${NAME}
+  hdiutil  attach ${QUIET} ${UDMG} -noautoopen -mountpoint ${WORKDIR}
+
+  # Copy in the new executable.
+  cp -p ./gpsbabel ${WORKDIR}
+  hdiutil detach ${QUIET} ${WORKDIR}
+
+  hdiutil convert ${QUIET} ${UDMG} -format UDZO -imagekey zlib-level=9 -o ${DMG}
+}
+
+checkgpsbabel ./gpsbabel
+makedmg
diff --git a/tpg.c b/tpg.c
index 122fa6488062c9a0b3861e21f6109f63093ede3c..4fe014ea8b12f5726b9e2094b4a8b797dd3c0225 100644 (file)
--- a/tpg.c
+++ b/tpg.c
@@ -32,8 +32,8 @@
 #define MAXTPGSTRINGSIZE       256
 #define MAXTPGOUTPUTPINS       65535   
 
-static FILE *tpg_file_in;
-static FILE *tpg_file_out;
+static gbfile *tpg_file_in;
+static gbfile *tpg_file_out;
 static short_handle mkshort_handle;
 static char *tpg_datum_opt;
 static int tpg_datum_idx;
@@ -46,37 +46,6 @@ arglist_t tpg_args[] = {
        ARG_TERMINATOR
 };
 
-static int
-tpg_fread(void *buff, size_t size, size_t members, FILE * fp) 
-{
-    size_t br;
-
-    br = fread(buff, size, members, fp);
-
-    if (br != members) {
-        fatal(MYNAME ": requested to read %lu bytes, read %lu bytes.\n", 
-                    (unsigned long) members, (unsigned long) br);
-    }
-
-    return (br);
-}
-
-static double
-tpg_fread_double(FILE *fp)
-{
-       unsigned char buf[8];
-       tpg_fread(buf, 1, 8, fp);
-       return le_read_double(buf);
-}
-
-static void
-tpg_fwrite_double(double x, FILE *fp)
-{
-       unsigned char cbuf[8];
-       le_write_double(cbuf,x);
-       fwrite(cbuf, 8, 1, fp);
-}
-
 static int
 valid_tpg_header(char * header, int len) 
 {
@@ -104,20 +73,20 @@ static void
 tpg_rd_init(const char *fname)
 {
        tpg_common_init();
-       tpg_file_in = xfopen(fname, "rb", MYNAME);
+       tpg_file_in = gbfopen_le(fname, "rb", MYNAME);
 }
 
 static void
 tpg_rd_deinit(void)
 {
-       fclose(tpg_file_in);
+       gbfclose(tpg_file_in);
 }
 
 static void
 tpg_wr_init(const char *fname)
 {
        tpg_common_init();
-       tpg_file_out = xfopen(fname, "wb", MYNAME);
+       tpg_file_out = gbfopen_le(fname, "wb", MYNAME);
        mkshort_handle = mkshort_new_handle();
        waypt_out_count = 0;
 }
@@ -126,7 +95,7 @@ static void
 tpg_wr_deinit(void)
 {
        mkshort_del_handle(&mkshort_handle);
-       fclose(tpg_file_out);
+       gbfclose(tpg_file_out);
 }
 
 static void
@@ -136,15 +105,12 @@ tpg_read(void)
        waypoint *wpt_tmp;
        double lat, lon, elev;
        double amt;
-       int stringsize;
        short int pointcount;
 
-        tpg_fread(&buff[0], 2, 1, tpg_file_in);
-        
-        pointcount = le_read16(&buff[0]);
+        pointcount = gbfgetint16(tpg_file_in);
         
         /* the rest of the header */
-        tpg_fread(&buff[0], 19, 1, tpg_file_in);
+        gbfread(&buff[0], 19, 1, tpg_file_in);
 
         if (valid_tpg_header(buff, 19) != 0) {
             fatal(MYNAME ": input file does not appear to be a valid .TPG file.\n");
@@ -154,33 +120,23 @@ tpg_read(void)
        while (pointcount--) {
            wpt_tmp = waypt_new();
 
-            /* 1 bytes at start of record - string size for shortname */
-           tpg_fread(&buff[0], 1, 1, tpg_file_in);
-           
-           stringsize = buff[0];
-           
-           if (stringsize)
-               tpg_fread(&buff[0], stringsize, 1, tpg_file_in);
-               
-           buff[stringsize] = '\0';
-           
-           wpt_tmp->shortname = xstrdup(buff);
+            /* pascal-like shortname */
+           wpt_tmp->shortname = gbfgetpstr(tpg_file_in);
 
             /* for some very odd reason, signs on longitude are swapped */
             /* coordinates are in NAD27/CONUS datum                     */
             
             /* 8 bytes - longitude, sign swapped  */
-           lon = tpg_fread_double(tpg_file_in);
+           lon = gbfgetdbl(tpg_file_in);
 
             /* 8 bytes - latitude */
-           lat = tpg_fread_double(tpg_file_in);
+           lat = gbfgetdbl(tpg_file_in);
            
             /* swap sign before we do datum conversions */
            lon *= -1.0;
            
             /* 2 bytes - elevation in feet */
-           tpg_fread(&buff[0], 2, 1, tpg_file_in);
-           elev = FEET_TO_METERS(le_read16(&buff[0]));
+           elev = FEET_TO_METERS(gbfgetint16(tpg_file_in));
 
             /* convert incoming NAD27/CONUS coordinates to WGS84 */
             GPS_Math_Known_Datum_To_WGS84_M(
@@ -196,21 +152,13 @@ tpg_read(void)
             
 
             /* 4 bytes? */
-           tpg_fread(&buff[0], 4, 1, tpg_file_in);
+           (void) gbfgetint32(tpg_file_in);
 
-            /* 1 bytes - string size for description */
-           tpg_fread(&buff[0], 1, 1, tpg_file_in);
-           
-           stringsize = buff[0];
-           
-           if (stringsize)
-               tpg_fread(&buff[0], stringsize, 1, tpg_file_in);
-           buff[stringsize] = '\0';
-           
-           wpt_tmp->description = xstrdup(buff);
+            /* pascal-like description */
+           wpt_tmp->description = gbfgetpstr(tpg_file_in);
            
            /* 2 bytes */
-           tpg_fread(&buff[0], 2, 1, tpg_file_in);
+           (void) gbfgetint16(tpg_file_in);
 
            waypt_add(wpt_tmp);
        }
@@ -297,43 +245,38 @@ tpg_waypt_pr(const waypoint *wpt)
                }
        }
 
-        fwrite(&ocount, 1, 1, tpg_file_out);
+        gbfwrite(&ocount, 1, 1, tpg_file_out);
 
        for (i = 0; i < c; i++) {
                char oc = toupper(shortname[i]);
                if (isalnum(oc) || oc == ' ') {
-                       fputc(oc, tpg_file_out);
+                       gbfputc(oc, tpg_file_out);
                }
        }
 
         /* 8 bytes - longitude */
-        tpg_fwrite_double(lon, tpg_file_out);
+        gbfputdbl(lon, tpg_file_out);
 
         /* 8 bytes - latitude */
-        tpg_fwrite_double(lat, tpg_file_out);
+        gbfputdbl(lat, tpg_file_out);
 
         /* 2 bytes - elevation_feet */
-        fwrite(&elev, 1, 2, tpg_file_out);
+        gbfputint16(elev, tpg_file_out);
 
         /* 4 unknown bytes */
         memset(tbuf, '\0', sizeof(tbuf));
-        fwrite(unknown4, 1, 4, tpg_file_out);
+        gbfwrite(unknown4, 1, 4, tpg_file_out);
 
-        /* 1 bytes stringsize for description */
-        c = strlen(description);
-        fwrite(&c, 1, 1, tpg_file_out);
-        
-        /* description */
-        fwrite(description, 1, c, tpg_file_out);
+       /* pascal-like description */
+       gbfputpstr(description, tpg_file_out);
 
         /* and finally 2 unknown bytes */
         
         if (waypt_out_count == waypt_count()) {
                /* last point gets 0x0000 instead of 0x0180 */
-               memset(tbuf, '\0', sizeof(tbuf));
-               fwrite(tbuf, 1, 2, tpg_file_out);
+               gbfputint16(0, tpg_file_out);
        } else {
-               fwrite(unknown2, 1, 2, tpg_file_out);
+               gbfwrite(unknown2, 1, 2, tpg_file_out);
        }
         
         xfree(shortname);
@@ -344,7 +287,6 @@ static void
 tpg_write(void)
 {
         int s;
-        unsigned char uc[2];
         unsigned char header_bytes[] = { 0xFF, 0xFF, 0x01, 0x00, 0x0D, 
                                          0x00, 0x43, 0x54, 0x6F, 0x70, 
                                          0x6F, 0x57, 0x61, 0x79, 0x70, 
@@ -362,13 +304,11 @@ tpg_write(void)
             fatal(MYNAME ": attempt to output too many points (%d).  The max is %d.  Sorry.\n", s, MAXTPGOUTPUTPINS);
         }
 
-       le_write16(uc, s);
-
         /* write the waypoint count */
-        fwrite(uc, 1,  2, tpg_file_out);
+        gbfputint16(s, tpg_file_out);
 
         /* write the rest of the header */
-        fwrite(header_bytes, 1, 19, tpg_file_out);
+        gbfwrite(header_bytes, 1, 19, tpg_file_out);
 
         waypt_disp_all(tpg_waypt_pr);
 }
diff --git a/tpo.c b/tpo.c
index 505d821d163aa2f63275955bac96386a3951a158..7787e0c214649b5896592d480ab0186404885e85 100644 (file)
--- a/tpo.c
+++ b/tpo.c
@@ -108,8 +108,8 @@ arglist_t tpo3_args[] = {
 };
 
 
-static FILE *tpo_file_in;
-static FILE *tpo_file_out;
+static gbfile *tpo_file_in;
+static gbfile *tpo_file_out;
 //static short_handle mkshort_handle;
 
 static double output_track_lon_scale;
@@ -127,36 +127,6 @@ static double last_waypoint_z;
 /*                                      READ                                   */
 /*******************************************************************************/
  
-static int
-tpo_fread(void *buff, size_t size, size_t members, FILE * fp) 
-{
-    size_t br;
-
-    br = fread(buff, size, members, fp);
-
-    if (br != members) {
-        fatal(MYNAME ": The input file does not look like a valid .TPO file.\n");
-    }
-
-    return (br);
-}
-
-static double
-tpo_fread_double(FILE *fp)
-{
-       unsigned char buf[8];
-       tpo_fread(buf, 1, 8, fp);
-       return le_read_double(buf);
-}
-
-static void
-tpo_fwrite_double(double x, FILE *fp)
-{
-       unsigned char cbuf[8];
-       le_write_double(cbuf,x);
-       fwrite(cbuf, 8, 1, fp);
-}
-
 /* Define a global here that we can query from multiple places */
 float tpo_version = 0.0;
 
@@ -171,9 +141,9 @@ tpo_check_version_string()
        char* v3_id_string = "TOPO! Ver";
 
        /* read the id string */
-       tpo_fread(&string_size, 1, 1, tpo_file_in);
+       gbfread(&string_size, 1, 1, tpo_file_in);
        string_buffer = xmalloc(string_size+1);
-       tpo_fread(string_buffer, 1, string_size, tpo_file_in);
+       gbfread(string_buffer, 1, string_size, tpo_file_in);
        
        /* terminate the string */
        string_buffer[string_size] = 0;
@@ -184,7 +154,7 @@ tpo_check_version_string()
 /*             fatal(MYNAME ": gpsbabel can only read TPO version 2.7.7 or below; this file is %s\n", string_buffer); */
 //fprintf(stderr,"gpsbabel can only read TPO version 2.7.7 or below; this file is %s\n", string_buffer);
 
-               fseek(tpo_file_in, -(string_size+1), SEEK_CUR);
+               gbfseek(tpo_file_in, -(string_size+1), SEEK_CUR);
         xfree(string_buffer);
         tpo_version = 3.0;  /* Really any 3.x version */
         return;
@@ -193,7 +163,7 @@ tpo_check_version_string()
        else {
         /* We found a version 1.x or 2.x file */
                /* seek back to the beginning of the file */
-               fseek(tpo_file_in, -(string_size+1), SEEK_CUR);
+               gbfseek(tpo_file_in, -(string_size+1), SEEK_CUR);
         xfree(string_buffer);
         tpo_version = 2.0;  /* Really any 1.x or 2.x version */
         return;
@@ -209,7 +179,7 @@ tpo_dump_header_bytes(int header_size)
        int i;
        unsigned char* buffer = (unsigned char*)xmalloc(header_size);
 
-       tpo_fread(buffer, 1, header_size, tpo_file_in);
+       gbfread(buffer, 1, header_size, tpo_file_in);
 
        printf("unsigned char header_bytes[] = {\n");
        
@@ -240,18 +210,18 @@ tpo_read_until_section(const char* section_name, int seek_bytes)
        int header_size = 0;
 
        while (1) {
-               tpo_fread(&byte, 1, 1, tpo_file_in);
+               gbfread(&byte, 1, 1, tpo_file_in);
                header_size++;
 
                if (byte == section_name[match_index]) {
                        match_index++;
                        if (match_index == strlen(section_name)) {
 /*fprintf(stderr,"Found %s\n", section_name);*/
-                               fseek(tpo_file_in, seek_bytes, SEEK_CUR);
+                               gbfseek(tpo_file_in, seek_bytes, SEEK_CUR);
                                header_size += seek_bytes;
 
                                if (dumpheader && dumpheader[0] == '1') {
-                                       fseek(tpo_file_in, -header_size, SEEK_CUR);
+                                       gbfseek(tpo_file_in, -header_size, SEEK_CUR);
                                        tpo_dump_header_bytes(header_size);
                                }
                                return;
@@ -268,7 +238,7 @@ static void
 tpo_rd_init(const char *fname)
 {
 
-       tpo_file_in = xfopen(fname, "rb", MYNAME);
+       tpo_file_in = gbfopen_le(fname, "rb", MYNAME);
        tpo_check_version_string();
 
     if (tpo_version == 2.0)
@@ -296,7 +266,7 @@ tpo_rd_init(const char *fname)
 static void
 tpo_rd_deinit(void)
 {
-       fclose(tpo_file_in);
+       gbfclose(tpo_file_in);
 }
 
 
@@ -325,16 +295,15 @@ void tpo_read_2_x(void)
        waypoint* waypoint_temp;        
 
        /* track count */
-       tpo_fread(&buff[0], 1, 2, tpo_file_in);
-       track_count = le_read16(&buff[0]);
+       track_count = gbfgetint16(tpo_file_in);
        
 /*fprintf(stderr,"track_count:%d\n", track_count);*/
        
        /* 4 unknown bytes */
-       tpo_fread(&buff[0], 1, 4, tpo_file_in);
+       gbfread(&buff[0], 1, 4, tpo_file_in);
 
        /* chunk name: "CTopoRoute" */
-       tpo_fread(&buff[0], 1, 12, tpo_file_in);
+       gbfread(&buff[0], 1, 12, tpo_file_in);
 
        for (i=0; i<track_count; i++) {
 
@@ -346,33 +315,32 @@ void tpo_read_2_x(void)
                track_temp->rte_name = xstrdup(buff);
 
                /* zoom level 1-5 visibility flags */
-               tpo_fread(&buff[0], 1, 10, tpo_file_in);
+               gbfread(&buff[0], 1, 10, tpo_file_in);
 
                /* 8 bytes of zeros, meaning unknown */
-               tpo_fread(&buff[0], 1, 8, tpo_file_in);
+               gbfread(&buff[0], 1, 8, tpo_file_in);
 
                /* 4 more unknown bytes, possibly sign flags for the longitude and latitude? */
-               tpo_fread(&buff[0], 1, 4, tpo_file_in);
+               gbfread(&buff[0], 1, 4, tpo_file_in);
 
         /* read the position of the initial track point */
                /* for some very odd reason, signs on longitude are swapped */
         /* coordinates are in NAD27/CONUS datum                     */
             
         /* 8 bytes - longitude, sign swapped  */
-           first_lon = tpo_fread_double(tpo_file_in);
+           first_lon = gbfgetdbl(tpo_file_in);
 
         /* 8 bytes - latitude */
-           first_lat = tpo_fread_double(tpo_file_in);
+           first_lat = gbfgetdbl(tpo_file_in);
            
         /* swap sign before we do datum conversions */
            first_lon *= -1.0;
 
                /* 8 unknown bytes: seems to be some kind of bounding box info */
-               tpo_fread(&buff[0], 1, 8, tpo_file_in);
+               gbfread(&buff[0], 1, 8, tpo_file_in);
 
                /* number of route points */
-               tpo_fread(&buff[0], 1, 2, tpo_file_in);
-               waypoint_count = le_read16(&buff[0]);
+               waypoint_count = gbfgetint16(tpo_file_in);
 
                /* allocate temporary memory for the waypoint deltas */
                lon_delta = (short*)xmalloc(waypoint_count * sizeof(short));
@@ -381,28 +349,26 @@ void tpo_read_2_x(void)
                for (j=0; j<waypoint_count; j++) {
                        
                        /* get this point's longitude delta from the first waypoint */
-                       tpo_fread(&buff[0], 1, 2, tpo_file_in);
-                       lon_delta[j] = le_read16(&buff[0]);
+                       lon_delta[j] = gbfgetint16(tpo_file_in);
 
                        /* get this point's latitude delta from the first waypoint */
-                       tpo_fread(&buff[0], 1, 2, tpo_file_in);
-                       lat_delta[j] = le_read16(&buff[0]);
+                       lat_delta[j] = gbfgetint16(tpo_file_in);
                }
 
                /* 8 bytes - longitude delta to degrees scale  */
-           lon_scale = tpo_fread_double(tpo_file_in);
+           lon_scale = gbfgetdbl(tpo_file_in);
 
         /* 8 bytes - latitude delta to degrees scale */
-           lat_scale = tpo_fread_double(tpo_file_in);
+           lat_scale = gbfgetdbl(tpo_file_in);
 
                /* 4 bytes: the total length of the route in feet*/
-               tpo_fread(&buff[0], 1, 4, tpo_file_in);
+               gbfread(&buff[0], 1, 4, tpo_file_in);
 
                /* 2 unknown bytes */
-               tpo_fread(&buff[0], 1, 2, tpo_file_in);
+               gbfread(&buff[0], 1, 2, tpo_file_in);
 
                /* 2 bytes: continuation marker */
-               tpo_fread(&buff[0], 1, 2, tpo_file_in);
+               gbfread(&buff[0], 1, 2, tpo_file_in);
 
                /* multiply all the deltas by the scaling factors to determine the waypoint positions */
                for (j=0; j<waypoint_count; j++) {
@@ -438,64 +404,6 @@ void tpo_read_2_x(void)
 //-------------------------------------------------------------------
 //-------------------------------------------------------------------
 
-
-
-
-
-// Read one 8-bit value from the input file.
-//
-// For version 3.x files.
-//
-int tpo_read_8()
-{
-    char val = 0;
-
-    tpo_fread(&val, 1, 1, tpo_file_in);
-    return(val);
-}
-
-
-
-
-
-// Read one 16-bit value in little-endian format from the input
-// file.  Takes care of processor endian-ness.
-//
-// For version 3.x files.
-//
-int tpo_read_16()
-{
-    unsigned char buf[2];
-    int val = 0;
-
-    tpo_fread(&buf[0], 1, 2, tpo_file_in);
-    val = le_read16(&buf[0]);
-    return(val);
-}
-
-
-
-
-
-// Read one 32-bit value in little-endian format from the input
-// file.  Takes care of processor endian-ness.
-//
-// For version 3.x files.
-//
-int tpo_read_32()
-{
-    unsigned char buf[4];
-    int val = 0;
-
-    tpo_fread(&buf[0], 1, 4, tpo_file_in);
-    val = le_read32(&buf[0]);
-    return(val);
-}
-
-
-
-
-
 // This will read 8/16/32 bits in little-endian format depending
 // upon the value of the first byte.
 //
@@ -505,19 +413,18 @@ int tpo_read_int()
 {
     unsigned char val;
 
-
-    val = tpo_read_8();
+    val = (unsigned char) gbfgetc(tpo_file_in);
 
     switch (val) {
 
         case 0xff:  // 32-bit value
 //printf("Found 32-bit value indicator: %x\n", val);
-            return( tpo_read_32() );
+            return( gbfgetint32(tpo_file_in) );
             break;
 
         case 0xfe:  // 16-bit value
 //printf("Found 16-bit value indicator: %x\n", val);
-            return( tpo_read_16() );
+            return( gbfgetint16(tpo_file_in) );
             break;
 
         default:    // 8-bit value
@@ -554,14 +461,14 @@ int tpo_find_block(unsigned int block_desired)
     do {
 
         // Seek to offset from start of file
-        fseek(tpo_file_in, block_offset, SEEK_SET);
+        gbfseek(tpo_file_in, block_offset, SEEK_SET);
        
         // Read record type
-        block_type = tpo_read_32();
+        block_type = gbfgetint32(tpo_file_in);
 //printf("Block: %08x\tat offset: %08x\n", block_type, block_offset);
 
         // Read offset to next record
-        block_offset = tpo_read_32();
+        block_offset = gbfgetint32(tpo_file_in);
     }
     while (block_type != block_desired && block_offset != 0);
 
@@ -683,7 +590,7 @@ void tpo_process_tracks(void)
         if (name_length) {
             track_name = xmalloc(name_length+1);
             track_name[0] = '\0';
-            tpo_fread(track_name, 1, name_length, tpo_file_in);
+            gbfread(track_name, 1, name_length, tpo_file_in);
             track_name[name_length] = '\0';  // Terminator
         }
         else {  // Assign a generic track name
@@ -711,7 +618,7 @@ void tpo_process_tracks(void)
 
         // Read the track bytes into a buffer
         buf = xmalloc(track_byte_count);
-        tpo_fread(buf, 1, track_byte_count, tpo_file_in);
+        gbfread(buf, 1, track_byte_count, tpo_file_in);
 
         latscale=0;
         lonscale=0;
@@ -878,7 +785,7 @@ void tpo_process_waypoints(void)
         if (name_length) {
             waypoint_name = xmalloc(name_length+1);
             waypoint_name[0] = '\0';
-            tpo_fread(waypoint_name, 1, name_length, tpo_file_in);
+            gbfread(waypoint_name, 1, name_length, tpo_file_in);
             waypoint_name[name_length] = '\0';  // Terminator
         }
         else {  // Assign a generic waypoint name
@@ -890,8 +797,8 @@ void tpo_process_waypoints(void)
 //UNKNOWN DATA LENGTH
         (void)tpo_read_int();
 
-        lon = tpo_read_32();
-        lat = tpo_read_32();
+        lon = gbfgetint32(tpo_file_in);
+        lat = gbfgetint32(tpo_file_in);
 
         // Allocate space for waypoint and store lat/lon 
         waypoint_temp = tpo_convert_ll(lat, lon);
@@ -900,7 +807,7 @@ void tpo_process_waypoints(void)
                waypoint_temp->shortname = waypoint_name;
 
         // Grab the altitude in meters 
-        altitude = tpo_read_32();
+        altitude = gbfgetint32(tpo_file_in);
         if (altitude == 0xfffd000c) // Unknown altitude
             altitude = 0;
         waypoint_temp->altitude = altitude / 100;   // Meters
@@ -915,7 +822,7 @@ void tpo_process_waypoints(void)
  
             comment = xmalloc(name_length+1);
             comment[0] = '\0';
-            tpo_fread(comment, 1, name_length, tpo_file_in);
+            gbfread(comment, 1, name_length, tpo_file_in);
             comment[name_length] = '\0';  // Terminator
             waypoint_temp->description = comment;
 //printf("\tComment: %s\n", waypoint_name);
@@ -940,19 +847,19 @@ void tpo_process_waypoints(void)
 
 //UNKNOWN DATA LENGTH
 //        (void)tpo_read_int();
-       (void)tpo_read_8();
+       (void) gbfgetc(tpo_file_in);
 
 //UNKNOWN DATA LENGTH
 //        (void)tpo_read_int();
-       (void)tpo_read_8();
+       (void) gbfgetc(tpo_file_in);
 
 //UNKNOWN DATA LENGTH
 //        (void)tpo_read_int();
-       (void)tpo_read_8();
+       (void) gbfgetc(tpo_file_in);
 
 //UNKNOWN DATA LENGTH
 //        (void)tpo_read_int();
-       (void)tpo_read_8();
+       (void) gbfgetc(tpo_file_in);
     }
 }
 
@@ -998,8 +905,8 @@ void tpo_process_map_notes(void)
 //UNKNOWN DATA LENGTH
         (void)tpo_read_int();
 
-        lon = tpo_read_32();
-        lat = tpo_read_32();
+        lon = gbfgetint32(tpo_file_in);
+        lat = gbfgetint32(tpo_file_in);
 
         // Allocate space for waypoint and store lat/lon 
         waypoint_temp = tpo_convert_ll(lat, lon);
@@ -1027,7 +934,7 @@ void tpo_process_map_notes(void)
  
             comment = xmalloc(name_length+1);
             comment[0] = '\0';
-            tpo_fread(comment, 1, name_length, tpo_file_in);
+            gbfread(comment, 1, name_length, tpo_file_in);
             comment[name_length] = '\0';  // Terminator
             waypoint_temp->description = comment;
 //printf("Comment: %s\n", comment);
@@ -1048,7 +955,7 @@ void tpo_process_map_notes(void)
  
             notes = xmalloc(name_length+1);
             notes[0] = '\0';
-            tpo_fread(notes, 1, name_length, tpo_file_in);
+            gbfread(notes, 1, name_length, tpo_file_in);
             notes[name_length] = '\0';  // Terminator
             waypoint_temp->url = notes;
 //printf("Notes: %s\n", notes);
@@ -1063,7 +970,7 @@ void tpo_process_map_notes(void)
  
             notes = xmalloc(name_length+1);
             notes[0] = '\0';
-            tpo_fread(notes, 1, name_length, tpo_file_in);
+            gbfread(notes, 1, name_length, tpo_file_in);
             notes[name_length] = '\0';  // Terminator
             waypoint_temp->url = notes;
 //printf("Notes: %s\n", notes);
@@ -1080,7 +987,7 @@ void tpo_process_map_notes(void)
         num_bytes = tpo_read_int();
 //printf("num_bytes: %x\n", num_bytes);
         for (jj = 0; jj < num_bytes; jj++) {
-            (void)tpo_read_8(); // Skip bytes
+            (void) gbfgetc(tpo_file_in); // Skip bytes
         }
 
         // Can be 8/16/32 bits
@@ -1135,8 +1042,8 @@ void tpo_process_symbols(void)
 //UNKNOWN DATA LENGTH
         (void)tpo_read_int();
 
-        lon = tpo_read_32();
-        lat = tpo_read_32();
+        lon = gbfgetint32(tpo_file_in);
+        lat = gbfgetint32(tpo_file_in);
 
         // Allocate space for waypoint and store lat/lon 
         waypoint_temp = tpo_convert_ll(lat, lon);
@@ -1200,8 +1107,8 @@ void tpo_process_text_labels(void)
 //UNKNOWN DATA LENGTH
         (void)tpo_read_int();
 
-        lon = tpo_read_32();
-        lat = tpo_read_32();
+        lon = gbfgetint32(tpo_file_in);
+        lat = gbfgetint32(tpo_file_in);
 
         // Allocate space for waypoint and store lat/lon 
         waypoint_temp = tpo_convert_ll(lat, lon);
@@ -1214,7 +1121,7 @@ void tpo_process_text_labels(void)
 
         for (jj = 0; jj < 16; jj++) {
 //UNKNOWN DATA LENGTH
-            (void)tpo_read_8();
+            (void) gbfgetc(tpo_file_in);
         }
 
         // Fetch comment length
@@ -1225,7 +1132,7 @@ void tpo_process_text_labels(void)
  
             comment = xmalloc(name_length+1);
             comment[0] = '\0';
-            tpo_fread(comment, 1, name_length, tpo_file_in);
+            gbfread(comment, 1, name_length, tpo_file_in);
             comment[name_length] = '\0';  // Terminator
             waypoint_temp->description = comment;
 //printf("Comment: %s\n", comment);
@@ -1299,7 +1206,7 @@ void tpo_process_routes(void)
         if (name_length) {
             route_name = xmalloc(name_length+1);
             route_name[0] = '\0';
-            tpo_fread(route_name, 1, name_length, tpo_file_in);
+            gbfread(route_name, 1, name_length, tpo_file_in);
             route_name[name_length] = '\0';  // Terminator
         }
         else {  // Assign a generic route name
@@ -1312,7 +1219,7 @@ void tpo_process_routes(void)
 //UNKNOWN DATA LENGTH 
         // Comment?
         (void)tpo_read_int();
-//        (void)tpo_read_8();
+//        gbfgetc(tpo_file_in);
 //        route_temp->rte_desc = NULL;
 
         route_temp->rte_num = ii+1;
@@ -1600,7 +1507,7 @@ tpo_write_file_header()
                        0x00, 0x01, 0x00, 0x28, 0x00 
                };
 
-               fwrite(header_bytes, sizeof(header_bytes), 1, tpo_file_out);
+               gbfwrite(header_bytes, sizeof(header_bytes), 1, tpo_file_out);
        }
        else if (strncmp("CT", output_state, 2) == 0 ||
                         strncmp("MA", output_state, 2) == 0 ||
@@ -1720,7 +1627,7 @@ tpo_write_file_header()
                        0x00, 0x01, 0x00, 0x28, 0x00
                };
 
-               fwrite(header_bytes, sizeof(header_bytes), 1, tpo_file_out);
+               gbfwrite(header_bytes, sizeof(header_bytes), 1, tpo_file_out);
        }
 
        else {
@@ -1740,14 +1647,14 @@ tpo_track_hdr(const route_head *rte)
        waypoint* first_track_waypoint = (waypoint*) QUEUE_FIRST(&rte->waypoint_list);
 
        /* zoom level 1-5 visibility flags */
-       fwrite(visibility_flags, 1, sizeof(visibility_flags), tpo_file_out);
+       gbfwrite(visibility_flags, 1, sizeof(visibility_flags), tpo_file_out);
 
        /* 8 bytes of zeros, meaning unknown */
        memset(temp_buffer, 0, sizeof(temp_buffer));
-       fwrite(temp_buffer, 1, sizeof(temp_buffer), tpo_file_out);
+       gbfwrite(temp_buffer, 1, sizeof(temp_buffer), tpo_file_out);
 
        /* 4 more unknown bytes, possibly sign flags for the longitude and latitude? */
-       fwrite(unknown1, 1, sizeof(unknown1), tpo_file_out);
+       gbfwrite(unknown1, 1, sizeof(unknown1), tpo_file_out);
 
        /* the starting point of the route */
     /* convert lat/long to NAD27/CONUS datum */
@@ -1772,17 +1679,16 @@ tpo_track_hdr(const route_head *rte)
        output_track_lon_scale = output_track_lat_scale / cos(GPS_Math_Deg_To_Rad(first_track_waypoint_lat));
 
        /* 8 bytes - longitude */
-    tpo_fwrite_double(first_track_waypoint_lon, tpo_file_out);
+    gbfputdbl(first_track_waypoint_lon, tpo_file_out);
 
     /* 8 bytes - latitude */
-    tpo_fwrite_double(first_track_waypoint_lat, tpo_file_out);
+    gbfputdbl(first_track_waypoint_lat, tpo_file_out);
 
     /* 8 bytes: seems to be bounding box info */
-       fwrite(bounding_box, 1, sizeof(bounding_box), tpo_file_out);
+       gbfwrite(bounding_box, 1, sizeof(bounding_box), tpo_file_out);
 
        /* number of route points */
-       le_write16(temp_buffer, rte->rte_waypt_ct);
-       fwrite(temp_buffer, 1, 2, tpo_file_out);
+       gbfputint16(rte->rte_waypt_ct, tpo_file_out);
 
        /* initialize the track length computation */
        track_length = 0;
@@ -1800,7 +1706,6 @@ tpo_track_disp(const waypoint *waypointp)
 {
        double lat, lon, amt, x, y, z;
        short lat_delta, lon_delta;
-    unsigned char temp_buffer[2];
 
 /* fprintf(stderr, "%f/%f\n", waypointp->latitude, waypointp->longitude); */
 
@@ -1837,47 +1742,42 @@ tpo_track_disp(const waypoint *waypointp)
 
        /* longitude delta from first route point */
        lon_delta = (short)((first_track_waypoint_lon - lon) / output_track_lon_scale);
-       le_write16(temp_buffer, lon_delta);
-       fwrite(temp_buffer, 1, 2, tpo_file_out);
+       gbfputint16(lon_delta, tpo_file_out);
 
        /* latitude delta from first route point */
        lat_delta = (short)((first_track_waypoint_lat - lat) / output_track_lat_scale);
-       le_write16(temp_buffer, lat_delta);
+       gbfputint16(lat_delta, tpo_file_out);
 
 /*
 fprintf(stderr, "%f %f: %x %x - %f %f %f / %f\n", lon, lat, lon_delta, lat_delta, first_track_waypoint_lat, lat, output_track_lat_scale, (first_track_waypoint_lat - lat) );
 */
 
-       fwrite(temp_buffer, 1, 2, tpo_file_out);
 }
 
 static void
 tpo_track_tlr(const route_head *rte)
 {
-       unsigned char temp_buffer[4];
-
        unsigned char unknown1[] = { 0x06, 0x00 };
 
        unsigned char continue_marker[] = { 0x01, 0x80 };
        unsigned char end_marker[] = { 0x00, 0x00 };
 
        /* pixel to degree scaling factors */
-       tpo_fwrite_double(output_track_lon_scale, tpo_file_out);
-       tpo_fwrite_double(output_track_lat_scale, tpo_file_out);
+       gbfputdbl(output_track_lon_scale, tpo_file_out);
+       gbfputdbl(output_track_lat_scale, tpo_file_out);
 
     /* 4 bytes: the total length of the route */
-       le_write32(temp_buffer, (unsigned int)track_length);
-    fwrite(temp_buffer, 1, 4, tpo_file_out);
+        gbfputint32(track_length, tpo_file_out);
 
        /* 2 unknown bytes */
-       fwrite(unknown1, 1, sizeof(unknown1), tpo_file_out);
+       gbfwrite(unknown1, 1, sizeof(unknown1), tpo_file_out);
 
        /* the last track ends with 0x0000 instead of 0x0180 */
        track_out_count++;
        if (track_out_count == track_count()) {         
-           fwrite(end_marker, 1, sizeof(end_marker), tpo_file_out);
+           gbfwrite(end_marker, 1, sizeof(end_marker), tpo_file_out);
        } else {
-           fwrite(continue_marker, 1, sizeof(continue_marker), tpo_file_out);
+           gbfwrite(continue_marker, 1, sizeof(continue_marker), tpo_file_out);
        }
 }
 
@@ -1889,7 +1789,7 @@ tpo_wr_init(const char *fname)
                fatal(MYNAME ": this file format only supports tracks, not waypoints or routes.\n");
        }
 
-       tpo_file_out = xfopen(fname, "wb", MYNAME);
+       tpo_file_out = gbfopen_le(fname, "wb", MYNAME);
        tpo_write_file_header();
 }
 
@@ -1899,31 +1799,28 @@ tpo_wr_deinit(void)
        /* the file footer is six bytes of zeroes */
        unsigned char file_footer_bytes[6];
        memset(file_footer_bytes, 0, sizeof(file_footer_bytes));
-       fwrite(file_footer_bytes, 1, sizeof(file_footer_bytes), tpo_file_out);
+       gbfwrite(file_footer_bytes, 1, sizeof(file_footer_bytes), tpo_file_out);
 
-       fclose(tpo_file_out);
+       gbfclose(tpo_file_out);
 }
 
 static void
 tpo_write(void)
 {
-       unsigned char buffer[8];        
        unsigned char unknown1[] = { 0xFF, 0xFF, 0x01, 0x00 };
 
        char* chunk_name = "CTopoRoute";
        int chunk_name_length = strlen(chunk_name);
 
        /* write the total number of tracks */
-    le_write16(buffer, track_count());
-       fwrite(buffer, 1, 2, tpo_file_out);
+        gbfputint16(track_count(), tpo_file_out);
        
        /* 4 unknown bytes */
-       fwrite(unknown1, 1, 4, tpo_file_out);
+       gbfwrite(unknown1, 1, 4, tpo_file_out);
 
        /* chunk name: "CTopoRoute" */
-       le_write16(buffer, chunk_name_length);
-       fwrite(buffer, 1, 2, tpo_file_out);
-       fwrite(chunk_name, 1, chunk_name_length, tpo_file_out);
+       gbfputint16(chunk_name_length, tpo_file_out);
+       gbfwrite(chunk_name, 1, chunk_name_length, tpo_file_out);
 
        track_out_count = 0;
        track_disp_all(tpo_track_hdr, tpo_track_tlr, tpo_track_disp);
index 71ba4300705fc5803393cd3fa76c48aa97d9ffd7..388c6b242835e8e02313021f28731d021846871f 100644 (file)
--- a/unicsv.c
+++ b/unicsv.c
@@ -2,7 +2,7 @@
     Universal CSV - support for csv files, divining field order from the header.
 
     Copyright (C) 2006 Robert Lipe, robertlipe@usa.net,
-    copyright (C) 2007 Olaf Klein, o.b.klein@gpsbabel.org
+    copyright (C) 2007,2008 Olaf Klein, o.b.klein@gpsbabel.org
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -57,6 +57,9 @@ typedef enum {
        fld_bng_zone,
        fld_bng_northing,
        fld_bng_easting,
+       fld_swiss,
+       fld_swiss_northing,
+       fld_swiss_easting,
        fld_hdop,
        fld_pdop,
        fld_vdop,
@@ -77,6 +80,14 @@ typedef enum {
        fld_time,
        fld_datetime,
        fld_iso_time,
+       fld_year,
+       fld_month,
+       fld_day,
+       fld_hour,
+       fld_min,
+       fld_sec,
+       fld_ns,
+       fld_ew,
        fld_garmin_city,
        fld_garmin_postal_code,
        fld_garmin_state,
@@ -93,6 +104,8 @@ typedef enum {
 #define STR_EQUAL      8
 #define STR_CASE       16
 
+#define unicsv_unknown 1e25
+
 typedef struct {
        char *name;
        field_e type;
@@ -104,16 +117,24 @@ typedef struct {
  * we check a second time after replacing underscores with spaces
  */
 static field_t fields_def[] = {
+       /* unhandled columns */
+       { "index",      fld_terminator, STR_ANY },
+       { "no",         fld_terminator, STR_EQUAL },
+       { "mini",       fld_terminator, STR_ANY },      /* maybe minimum anything, so
+                                                          avoid detection as 'min' for minute */
+       /* handled columns */
        { "name",       fld_shortname, STR_ANY },
+       { "title",      fld_shortname, STR_ANY },
        { "desc",       fld_description, STR_ANY },
        { "notes",      fld_notes, STR_ANY },
-       { "omment",     fld_notes, STR_ANY },
+       { "omment",     fld_notes, STR_ANY },           /* works also for German "Kommentar" */
        { "text",       fld_notes, STR_ANY },
        { "url",        fld_url, STR_ANY },
        { "icon",       fld_symbol, STR_ANY },
        { "symb",       fld_symbol, STR_ANY },
        { "lat",        fld_latitude, STR_ANY },
        { "lon",        fld_longitude, STR_ANY },
+       { "lng",        fld_longitude, STR_ANY },
        { "x",          fld_longitude, STR_EQUAL },
        { "y",          fld_latitude, STR_EQUAL },
        { "z",          fld_altitude, STR_EQUAL },
@@ -121,6 +142,7 @@ static field_t fields_def[] = {
        { "y_pos",      fld_latitude, STR_ANY },
        { "alt",        fld_altitude, STR_ANY },
        { "ele",        fld_altitude, STR_ANY },
+       { "height",     fld_altitude, STR_ANY },
        { "utm_z",      fld_utm_zone, STR_ANY },
        { "utm_c",      fld_utm_zone_char, STR_ANY },
        { "utm_zc",     fld_utm_zone_char, STR_ANY },
@@ -135,6 +157,11 @@ static field_t fields_def[] = {
        { "bng",        fld_bng, STR_EQUAL },
        { "bng_coo",    fld_bng, STR_ANY },
        { "bng_pos",    fld_bng, STR_ANY },
+       { "swiss_e",    fld_swiss_easting, STR_ANY },
+       { "swiss_n",    fld_swiss_northing, STR_ANY },
+       { "swiss",      fld_swiss, STR_EQUAL },
+       { "swiss_coo",  fld_swiss, STR_ANY },
+       { "swiss_pos",  fld_swiss, STR_ANY },
        { "hdop",       fld_hdop, STR_ANY },
        { "pdop",       fld_pdop, STR_ANY },
        { "vdop",       fld_vdop, STR_ANY },
@@ -145,6 +172,7 @@ static field_t fields_def[] = {
        { "head",       fld_course, STR_ANY },
        { "cour",       fld_course, STR_ANY },
        { "speed",      fld_speed, STR_ANY },
+       { "velo",       fld_speed, STR_ANY },
        { "geschw",     fld_speed, STR_ANY },           /* speed in german */
        { "tempf",      fld_temperature_f, STR_EQUAL }, /* degrees fahrenheit */
        { "temp",       fld_temperature, STR_ANY },     /* degrees celsius by default */
@@ -153,7 +181,18 @@ static field_t fields_def[] = {
        { "prox",       fld_proximity, STR_ANY },
        { "depth",      fld_depth, STR_ANY },
        { "date",       fld_date, STR_ANY },
+       { "datum",      fld_date, STR_ANY },
        { "time",       fld_time, STR_ANY },
+       { "zeit",       fld_time, STR_ANY },
+       { "hour",       fld_hour, STR_LEFT },
+       { "min",        fld_min, STR_LEFT },
+       { "sec",        fld_sec, STR_LEFT },
+       { "year",       fld_year, STR_LEFT },
+       { "month",      fld_month, STR_LEFT },
+       { "day",        fld_day, STR_LEFT },
+       { "n/s",        fld_ns, STR_ANY },
+       { "e/w",        fld_ew, STR_ANY },
+
        /* garmin specials */
        { "addr",       fld_garmin_addr, STR_ANY },
        { "street",     fld_garmin_addr, STR_ANY },
@@ -164,15 +203,13 @@ static field_t fields_def[] = {
        { "phone",      fld_garmin_phone_nr, STR_ANY },
        { "state",      fld_garmin_state, STR_ANY },
        { "faci",       fld_garmin_facility, STR_ANY },
-       /* unhandled columns */
-       { "index",      fld_terminator, STR_ANY },
-       { "no",         fld_terminator, STR_EQUAL },
        { NULL,         fld_terminator, 0 }
 };
 
 static field_e *unicsv_fields_tab;
 static int unicsv_fields_tab_ct;
-static double unicsv_altscale;
+static double unicsv_altscale, unicsv_depthscale, unicsv_proximityscale
+;
 static char *unicsv_fieldsep;
 static gbfile *fin, *fout;
 static gpsdata_type unicsv_data_type;
@@ -180,7 +217,7 @@ static route_head *unicsv_track, *unicsv_route;
 static unsigned long long unicsv_outp_flags;
 static grid_type unicsv_grid_idx;
 static int unicsv_datum_idx;
-static char *opt_datum, *opt_grid;
+static char *opt_datum, *opt_grid, *opt_utc;
 static int unicsv_waypt_ct;
 static char unicsv_detect;
 
@@ -189,6 +226,8 @@ static arglist_t unicsv_args[] = {
                "WGS 84", ARGTYPE_STRING, ARG_NOMINMAX}, 
        {"grid",  &opt_grid,  "Write position using this grid.",
                NULL, ARGTYPE_STRING, ARG_NOMINMAX},
+       {"utc",   &opt_utc,   "Write timestamps with offset x to UTC time", 
+               NULL, ARGTYPE_INT, "-23", "+23"},
        ARG_TERMINATOR };
 
 
@@ -212,23 +251,33 @@ unicsv_strrcmp(const char *s1, const char *s2)
 }
 
 static int
-unicsv_parse_date(const char *str)
+unicsv_parse_date(const char *str, int *consumed)
 {
        int p1, p2, p3, ct;
        char sep[2];
        struct tm tm;
+       int lconsumed = 0;
        
        memset(&tm, 0, sizeof(tm));
-       ct = sscanf(str, "%d%1[-.//]%d%1[-.//]%d", &p1, sep, &p2, sep, &p3);
-       is_fatal(ct != 5, MYNAME ": Could not parse date string (%s).", str);
+       ct = sscanf(str, "%d%1[-.//]%d%1[-.//]%d%n", &p1, sep, &p2, sep, &p3, &lconsumed);
+       if (consumed && lconsumed) {
+               *consumed = lconsumed;
+       }
+       if (ct != 5) {
+               if (consumed) {         /* don't stop here; it's only sniffing */
+                       *consumed = 0;  /* for a possible date */
+                       return 0;
+               }
+               fatal(MYNAME ": Could not parse date string (%s).\n", str);
+       }
        
        if ((p1 > 99) || (sep[0] == '-')) { /* Y-M-D (iso like) */
                tm.tm_year = p1;
                tm.tm_mon = p2;
                tm.tm_mday = p3;
        }
-       else if (sep[0] == '.') {       /* Germany any other countries */
-               tm.tm_mday = p1;        /* have fixed D.M.Y format */
+       else if (sep[0] == '.') {       /* Germany and any other countries */
+               tm.tm_mday = p1;        /* have fixed D.M.Y format */
                tm.tm_mon = p2;
                tm.tm_year = p3;
        }
@@ -242,8 +291,13 @@ unicsv_parse_date(const char *str)
                else tm.tm_year += 1900;
        }
        /* some low-level checks */
-       if ((tm.tm_mon > 12) || (tm.tm_mon < 1) || (tm.tm_mday > 31) || (tm.tm_mday < 1))
+       if ((tm.tm_mon > 12) || (tm.tm_mon < 1) || (tm.tm_mday > 31) || (tm.tm_mday < 1)) {
+               if (consumed) {
+                       *consumed = 0;
+                       return 0;       /* don't stop here */
+               }
                fatal(MYNAME ": Could not parse date string (%s).\n", str);
+       }
        
        tm.tm_year -= 1900;
        tm.tm_mon -= 1;
@@ -252,17 +306,30 @@ unicsv_parse_date(const char *str)
 }
 
 static int
-unicsv_parse_time(const char *str, int *msec)
+unicsv_parse_time(const char *str, int *msec, int *date)
 {
        int hour, min, ct, sec;
-       char sep[2];
-       char *dot;
+       int consumed = 0;
+       double ms;
+       char sep[1];
+       int ldate;
+
+       /* If we have somethine we're pretty sure is a date, parse that
+        * first, skip over it, and pass that back to the caller)
+        */
+       ldate = unicsv_parse_date(str, &consumed);
+       if (consumed && ldate) {
+               str += consumed;
+               if (date) {
+                       *date = ldate;
+               }
+       }
        
-       ct = sscanf(str, "%d%1[.://]%d%1[.://]%d", &hour, sep, &min, sep, &sec);
-       is_fatal(ct != 5, MYNAME ": Could not parse time string (%s).\n", str);
-       if ((dot = strchr(str, '.'))) {
-               *msec = (atof(dot) + 0.0000005) * 1000000;
-               if (*msec >= 1000000) {
+       ct = sscanf(str, "%d%1[.://]%d%1[.://]%d%lf", &hour, sep, &min, sep, &sec, &ms);
+       is_fatal(ct < 5, MYNAME ": Could not parse time string (%s).\n", str);
+       if (ct == 6) {
+               *msec = (ms * 1000000) + 0.5;
+               if (*msec > 999999) {
                        *msec = 0;
                        sec++;
                }
@@ -394,6 +461,16 @@ unicsv_fondle_header(char *ibuf)
                                unicsv_altscale = FEET_TO_METERS(1);
                        }
                }
+               if (f->type == fld_depth) {
+                       if (UNICSV_CONTAINS("ft") || UNICSV_CONTAINS("feet")) {
+                               unicsv_depthscale = FEET_TO_METERS(1);
+                       }
+               }
+               if (f->type == fld_proximity) {
+                       if (UNICSV_CONTAINS("ft") || UNICSV_CONTAINS("feet")) {
+                               unicsv_proximityscale = FEET_TO_METERS(1);
+                       }
+               }
                if ((f->type == fld_time) || (f->type == fld_date)) {
                        if (UNICSV_CONTAINS("iso"))
                                f->type = fld_iso_time;
@@ -407,6 +484,8 @@ unicsv_rd_init(const char *fname)
 {
        char *c;
        unicsv_altscale = 1.0;
+       unicsv_depthscale = 1.0;
+       unicsv_proximityscale = 1.0;
        
        unicsv_fields_tab = NULL;
        unicsv_fields_tab_ct = 0;
@@ -444,14 +523,22 @@ unicsv_parse_one_line(char *ibuf)
        char bng_zone[3] = "";
        double bng_easting = 0;
        double bng_northing = 0;
+       double swiss_easting = unicsv_unknown;
+       double swiss_northing = unicsv_unknown;
        int checked = 0;
        int date = -1, time = -1, msec = -1;
        char is_localtime = 0;
        garmin_fs_t *gmsd;
+       double d;
+       struct tm ymd;
+       int src_datum = unicsv_datum_idx;
+       int ns = 1;
+       int ew = 1;
 
        wpt = waypt_new();
-       wpt->latitude = -9999;
-       wpt->longitude = -9999;
+       wpt->latitude = unicsv_unknown;
+       wpt->longitude = unicsv_unknown;
+       memset(&ymd, 0, sizeof(ymd));
 
        column = -1;
        while ((s = csv_lineparse(ibuf, unicsv_fieldsep, "\"", 0))) {
@@ -465,7 +552,6 @@ unicsv_parse_one_line(char *ibuf)
 
                s = lrtrim(s);
                if (! *s) continue;     /* skip empty columns */
-               
                switch(unicsv_fields_tab[column]) {
 
                case fld_time:
@@ -482,10 +568,12 @@ unicsv_parse_one_line(char *ibuf)
                
                case fld_latitude:
                        human_to_dec( s, &wpt->latitude, &wpt->longitude, 1 );
+                       wpt->latitude = wpt->latitude * ns;
                        break;
                        
                case fld_longitude:
                        human_to_dec( s, &wpt->latitude, &wpt->longitude, 2 );
+                       wpt->longitude = wpt->longitude * ew;
                        break;
                        
                case fld_shortname:
@@ -505,7 +593,10 @@ unicsv_parse_one_line(char *ibuf)
                        break;
 
                case fld_altitude:
-                       wpt->altitude = atof(s) * unicsv_altscale;
+                       if (parse_distance(s, &d, unicsv_altscale, MYNAME)) {
+                               if (fabs(d) < fabs(unknown_alt))
+                                       wpt->altitude = d;
+                       }
                        break;
 
                case fld_utm_zone:
@@ -525,13 +616,19 @@ unicsv_parse_one_line(char *ibuf)
                        break;
                        
                case fld_utm:
-                       parse_coordinates(s, DATUM_WGS84, grid_utm,
+                       parse_coordinates(s, unicsv_datum_idx, grid_utm,
                                &wpt->latitude, &wpt->longitude, MYNAME);
+                       /* coordinates from parse_coordinates are in WGS84
+                          don't convert a second time */
+                       src_datum = DATUM_WGS84;
                        break;
 
                case fld_bng:
                        parse_coordinates(s, DATUM_OSGB36, grid_bng,
                                &wpt->latitude, &wpt->longitude, MYNAME);
+                       /* coordinates from parse_coordinates are in WGS84
+                          don't convert a second time */
+                       src_datum = DATUM_WGS84;
                        break;
                        
                case fld_bng_zone:
@@ -547,6 +644,22 @@ unicsv_parse_one_line(char *ibuf)
                        bng_easting = atof(s);
                        break;
                        
+               case fld_swiss:
+                       parse_coordinates(s, DATUM_WGS84, grid_swiss,
+                               &wpt->latitude, &wpt->longitude, MYNAME);
+                       /* coordinates from parse_coordinates are in WGS84
+                          don't convert a second time */
+                       src_datum = DATUM_WGS84;
+                       break;
+
+               case fld_swiss_easting:
+                       swiss_easting = atof(s);
+                       break;
+
+               case fld_swiss_northing:
+                       swiss_northing = atof(s);
+                       break;
+
                case fld_hdop:
                        wpt->hdop = atof(s);
                        if (unicsv_detect) unicsv_data_type = trkdata;
@@ -584,21 +697,24 @@ unicsv_parse_one_line(char *ibuf)
 
                case fld_utc_date:
                        if ((is_localtime < 2) && (date < 0)) {
-                               date = unicsv_parse_date(s);
+                               date = unicsv_parse_date(s, NULL);
                                is_localtime = 0;
                        }
                        break;
 
                case fld_utc_time:
                        if ((is_localtime < 2) && (time < 0)) {
-                               time = unicsv_parse_time(s, &msec);
+                               time = unicsv_parse_time(s, &msec, &date);
                                is_localtime = 0;
                        }
                        break;
 
                case fld_speed:
-                       WAYPT_SET(wpt, speed, atof(s));
-                       if (unicsv_detect) unicsv_data_type = trkdata;
+                       if (parse_speed(s, &d, 1.0, MYNAME)) {
+                               WAYPT_SET(wpt, speed, d);
+                               if (unicsv_detect)
+                                       unicsv_data_type = trkdata;
+                       }
                        break;
 
                case fld_course:
@@ -607,11 +723,13 @@ unicsv_parse_one_line(char *ibuf)
                        break;
                        
                case fld_temperature:
-                       WAYPT_SET(wpt, temperature, atof(s));
+                       d = atof(s);
+                       if (fabs(d) < 999999) WAYPT_SET(wpt, temperature, d);
                        break;
 
                case fld_temperature_f:
-                       WAYPT_SET(wpt, temperature, FAHRENHEIT_TO_CELSIUS(atof(s)));
+                       d = atof(s);
+                       if (fabs(d) < 999999) WAYPT_SET(wpt, temperature, FAHRENHEIT_TO_CELSIUS(d));
                        break;
 
                case fld_heartrate:
@@ -625,11 +743,13 @@ unicsv_parse_one_line(char *ibuf)
                        break;
 
                case fld_proximity:
-                       WAYPT_SET(wpt, proximity, atof(s));
+                       if (parse_distance(s, &d, unicsv_proximityscale, MYNAME))
+                               WAYPT_SET(wpt, proximity, d);
                        break;
 
                case fld_depth:
-                       WAYPT_SET(wpt, depth, atof(s));
+                       if (parse_distance(s, &d, unicsv_depthscale, MYNAME))
+                               WAYPT_SET(wpt, depth, d);
                        break;
                        
                case fld_symbol:
@@ -644,22 +764,53 @@ unicsv_parse_one_line(char *ibuf)
 
                case fld_time:
                        if ((is_localtime < 2) && (time < 0)) {
-                               time = unicsv_parse_time(s, &msec);
+                               time = unicsv_parse_time(s, &msec, &date);
                                is_localtime = 1;
                        }
                        break;
 
                case fld_date: 
                        if ((is_localtime < 2) && (date < 0)) {
-                               date = unicsv_parse_date(s);
+                               date = unicsv_parse_date(s, NULL);
                                is_localtime = 1;
                        }
                        break;
+                       
+               case fld_year:
+                       ymd.tm_year = atoi(s);
+                       break;
+
+               case fld_month:
+                       ymd.tm_mon = atoi(s);
+                       break;
+
+               case fld_day:
+                       ymd.tm_mday = atoi(s);
+                       break;
+
+               case fld_hour:
+                       ymd.tm_hour = atoi(s);
+                       break;
+
+               case fld_min:
+                       ymd.tm_min = atoi(s);
+                       break;
+
+               case fld_sec:
+                       ymd.tm_sec = atoi(s);
+                       break;
 
                case fld_datetime:
                        /* not implemented */
                        break;
-
+               case fld_ns:
+                       ns = tolower(s[0]) == 'n' ? 1 : -1;
+                       wpt->latitude *= ns;
+                       break;
+               case fld_ew:
+                       ew = tolower(s[0]) == 'e' ? 1 : -1;
+                       wpt->longitude *= ew;
+                       break;
                case fld_garmin_city:
                case fld_garmin_postal_code:
                case fld_garmin_state:
@@ -702,7 +853,10 @@ unicsv_parse_one_line(char *ibuf)
                        if (is_localtime) {
                                struct tm tm;
                                tm = *gmtime(&t);
-                               wpt->creation_time = mklocaltime(&tm);
+                               if (opt_utc)
+                                       wpt->creation_time = mkgmtime(&tm);
+                               else
+                                       wpt->creation_time = mklocaltime(&tm);
                        }
                        else
                                wpt->creation_time = t;
@@ -711,15 +865,42 @@ unicsv_parse_one_line(char *ibuf)
                        wpt->creation_time = time;
                else if (date >= 0)
                        wpt->creation_time = date;
+               else if (ymd.tm_year || ymd.tm_mon || ymd.tm_mday) {
+                       if (ymd.tm_year < 100) {
+                               if (ymd.tm_year <= 70) ymd.tm_year += 2000;
+                               else ymd.tm_year += 1900;
+                       }
+                       ymd.tm_year -= 1900;
+                       
+                       if (ymd.tm_mon == 0) ymd.tm_mon = 1;
+                       if (ymd.tm_mday == 0) ymd.tm_mday = 1;
+                       
+                       ymd.tm_mon--;
+                       if (opt_utc)
+                               wpt->creation_time = mkgmtime(&ymd);
+                       else
+                               wpt->creation_time = mklocaltime(&ymd);
+               }
+               else if (ymd.tm_hour || ymd.tm_min || ymd.tm_sec) {
+                       if (opt_utc)
+                               wpt->creation_time = mkgmtime(&ymd);
+                       else
+                               wpt->creation_time = mklocaltime(&ymd);
+               }
+
                if (msec >= 0)
                        wpt->microseconds = msec;
+               
+               if (opt_utc)
+                       wpt->creation_time += atoi(opt_utc) * SECONDS_PER_HOUR;
        }
        
-       /* utm/bng can be optional */
-       if ((wpt->latitude == -9999) && (wpt->longitude == -9999)) {
+       /* utm/bng/swiss can be optional */
+
+       if ((wpt->latitude == unicsv_unknown) && (wpt->longitude == unicsv_unknown)) {
                if (utm_zone != -9999) {
                        GPS_Math_UTM_EN_To_Known_Datum(&wpt->latitude, &wpt->longitude,
-                               utm_easting, utm_northing, utm_zone, utm_zc, DATUM_WGS84);
+                               utm_easting, utm_northing, utm_zone, utm_zc, unicsv_datum_idx);
                }
                else if (bng_zone[0]) {
                        if (! GPS_Math_UKOSMap_To_WGS84_M(
@@ -727,7 +908,20 @@ unicsv_parse_one_line(char *ibuf)
                                &wpt->latitude, &wpt->longitude))
                        fatal(MYNAME ": Unable to convert BNG coordinates (%s %.f %.f)!\n",
                                bng_zone, bng_easting, bng_northing);
+                       src_datum = DATUM_WGS84;        /* don't convert afterwards */
                }
+               else if ((swiss_easting != unicsv_unknown) && (swiss_northing != unicsv_unknown)) {
+                       GPS_Math_CH1903_NGEN_To_WGS84(swiss_easting, swiss_northing,
+                               &wpt->latitude, &wpt->longitude);
+                       src_datum = DATUM_WGS84;        /* don't convert afterwards */
+               }
+       }
+       
+       if ((src_datum != DATUM_WGS84) && 
+           (wpt->latitude != unicsv_unknown) && (wpt->longitude != unicsv_unknown)) {
+               double alt;
+               GPS_Math_Known_Datum_To_WGS84_M(wpt->latitude, wpt->longitude, (double) 0.0, 
+                       &wpt->latitude, &wpt->longitude, &alt, src_datum);
        }
 
        switch(unicsv_data_type) {
@@ -766,12 +960,14 @@ unicsv_rd(void)
 
 /* =========================================================================== */
 
-static char *
-strassign(char **old, char *new)
+static void
+unicsv_fatal_outside(const waypoint *wpt)
 {
-       if (*old) xfree(*old);
-       *old = new;
-       return new;
+       gbfprintf(fout, "#####\n");
+       fatal(MYNAME ": %s (%s) is outside of convertable area of grid \"%s\"!\n",
+               wpt->shortname ? wpt->shortname : "Waypoint",
+               pretty_deg_format(wpt->latitude, wpt->longitude, 'd', NULL, 0),
+               gt_get_mps_grid_longname(unicsv_grid_idx, MYNAME));
 }
 
 static void
@@ -893,9 +1089,18 @@ unicsv_waypt_disp_cb(const waypoint *wpt)
                gbfputs(cout, fout);
                break;
                
-       case grid_lat_lon_dms:
+       case grid_lat_lon_dms: {
+               char *sep, *tmp;
                cout = pretty_deg_format(lat, lon, 's', unicsv_fieldsep, 0);
-               gbfputs(strassign(&cout, strenquote(cout, UNICSV_QUOT_CHAR)), fout);
+               sep = strchr(cout, ',');
+               *sep = '\0';
+               tmp = strenquote(cout, UNICSV_QUOT_CHAR);
+               gbfprintf(fout, "%s%s", tmp, unicsv_fieldsep);
+               xfree(tmp);
+               tmp = strenquote(sep+1, UNICSV_QUOT_CHAR);
+               gbfputs(tmp, fout);
+               xfree(tmp);
+               }
                break;
 
        case grid_bng: {
@@ -903,7 +1108,7 @@ unicsv_waypt_disp_cb(const waypoint *wpt)
                double north, east;
 
                if (! GPS_Math_WGS84_To_UKOSMap_M(wpt->latitude, wpt->longitude, &east, &north, map))
-                       fatal(MYNAME ": Some (or all?) of the coordinates cannot be displayed using \"BNG\".\n");
+                       unicsv_fatal_outside(wpt);
                gbfprintf(fout, "%s%s%5.0f%s%5.0f",
                        map, unicsv_fieldsep, 
                        east, unicsv_fieldsep, 
@@ -917,7 +1122,7 @@ unicsv_waypt_disp_cb(const waypoint *wpt)
 
                if (! GPS_Math_Known_Datum_To_UTM_EN(lat, lon,
                        &east, &north, &zone, &zonec, unicsv_datum_idx))
-                       fatal(MYNAME ": Some (or all?) of the coordinates cannot be displayed using \"UTM\".\n");
+                       unicsv_fatal_outside(wpt);
                gbfprintf(fout, "%02d%s%c%s%.0f%s%.0f",
                        zone, unicsv_fieldsep, 
                        zonec, unicsv_fieldsep,
@@ -925,6 +1130,15 @@ unicsv_waypt_disp_cb(const waypoint *wpt)
                        north);
                break;
        }
+       case grid_swiss: {
+               double north, east;
+               
+               if (! GPS_Math_WGS84_To_CH1903_NGEN(wpt->latitude, wpt->longitude, &east, &north))
+                       unicsv_fatal_outside(wpt);
+               gbfprintf(fout, "%.f%s%.f%s",
+                       east, unicsv_fieldsep, north, unicsv_fieldsep);
+
+       }
        default:
                gbfprintf(fout, "%.6f%s%.6f", lat, unicsv_fieldsep, lon);
                break;
@@ -976,17 +1190,15 @@ unicsv_waypt_disp_cb(const waypoint *wpt)
        if FIELD_USED(fld_fix) {
                char *fix;
                switch(wpt->fix) {
-                       case fix_none: fix = "none";
-                       case fix_2d: fix = "2d";
-                       case fix_3d: fix = "3d";
-                       case fix_dgps: fix = "dgps";
-                       case fix_pps: fix = "pps";
-                               unicsv_print_str(fix);
-                               break;
-                       default:
-                               gbfputs(unicsv_fieldsep, fout);
-                               break;
+                       case fix_none: fix = "none"; break;
+                       case fix_2d: fix = "2d"; break;
+                       case fix_3d: fix = "3d"; break;
+                       case fix_dgps: fix = "dgps"; break;
+                       case fix_pps: fix = "pps"; break;
+                       default: fix = NULL;
                }
+               if (fix) unicsv_print_str(fix);
+               else gbfputs(unicsv_fieldsep, fout);
        }
        if FIELD_USED(fld_hdop) {
                if (wpt->hdop > 0)
@@ -1028,7 +1240,13 @@ unicsv_waypt_disp_cb(const waypoint *wpt)
                if (wpt->creation_time >= SECONDS_PER_DAY) {
                        struct tm tm;
                        char buf[32];
-                       tm = *localtime(&wpt->creation_time);
+                       time_t time = wpt->creation_time;
+                       
+                       if (opt_utc) {
+                               time += atoi(opt_utc) * SECONDS_PER_HOUR;
+                               tm = *gmtime(&time);
+                       }
+                       else tm = *localtime(&wpt->creation_time);
                        tm.tm_year += 1900;
                        tm.tm_mon += 1;
                        snprintf(buf, sizeof(buf), "%04d/%02d/%02d", tm.tm_year, tm.tm_mon, tm.tm_mday);
@@ -1041,8 +1259,13 @@ unicsv_waypt_disp_cb(const waypoint *wpt)
                if (wpt->creation_time != 0) {
                        struct tm tm;
                        char buf[32], msec[12];
-
-                       tm = *localtime(&wpt->creation_time);
+                       time_t time = wpt->creation_time;
+                       
+                       if (opt_utc) {
+                               time += atoi(opt_utc) * SECONDS_PER_HOUR;
+                               tm = *gmtime(&time);
+                       }
+                       else tm = *localtime(&wpt->creation_time);
                        snprintf(buf, sizeof(buf), "%02d:%02d:%02d", tm.tm_hour, tm.tm_min, tm.tm_sec);
 
                        if (wpt->microseconds > 0) {
@@ -1080,7 +1303,7 @@ unicsv_waypt_disp_cb(const waypoint *wpt)
 static void
 unicsv_wr_init(const char *filename)
 {
-       fout = gbfopen(filename, "w", MYNAME);
+       fout = gbfopen(filename, "wb", MYNAME);
 
        unicsv_outp_flags = 0;
        unicsv_grid_idx = grid_unknown;
@@ -1104,6 +1327,9 @@ unicsv_wr_init(const char *filename)
                /* force datum to "Ord Srvy Grt Britn" / OSGB36 */
                /* ! ignore parameter "Datum" ! */
                unicsv_datum_idx = DATUM_OSGB36;
+       else if (unicsv_grid_idx == grid_swiss)
+               /* ! ignore parameter "Datum" ! */
+               unicsv_datum_idx = DATUM_WGS84; /* internal, becomes CH1903 */
        else
                unicsv_datum_idx = gt_lookup_datum_index(opt_datum, MYNAME);
 }
@@ -1148,6 +1374,10 @@ unicsv_wr(void)
                gbfprintf(fout, "UTM-Zone%sUTM-Ch%sUTM-East%sUTM-North",
                        unicsv_fieldsep, unicsv_fieldsep, unicsv_fieldsep);
                break;
+       case grid_swiss: 
+               gbfprintf(fout, "Swiss-East%sSwiss-North",
+                       unicsv_fieldsep);
+               break;
        default: 
                gbfprintf(fout, "Latitude%sLongitude", unicsv_fieldsep);
        }
diff --git a/util.c b/util.c
index 51b78cd3bd5268c7800427289a4bef6126b02898..8ded3ea2a3df63a75ffdb185a6e5da93792166b7 100644 (file)
--- a/util.c
+++ b/util.c
@@ -101,7 +101,7 @@ xcalloc(size_t nmemb, size_t size)
 #endif
 
        if (!obj) {
-               fatal("gpsbabel: Unable to allocate %ld bytes of memory.\n", (unsigned long) size);
+               fatal("gpsbabel: Unable to allocate %ld units of %ld bytes of memory.\n", (unsigned long) nmemb, (unsigned long) size);
        }
 
        return obj;
@@ -299,6 +299,19 @@ xfputs(const char *errtxt, const char *s, FILE *stream)
 
 int
 xasprintf(char **strp, const char *fmt, ...)
+{
+       va_list args;
+       int res;
+       
+       va_start(args, fmt);
+       res = xvasprintf(strp, fmt, args);
+       va_end(args);
+       
+       return res;
+}
+
+int
+xvasprintf(char **strp, const char *fmt, va_list ap)
 {
 /* From http://perfec.to/vsnprintf/pasprintf.c */
 /* size of first buffer malloc; start small to exercise grow routines */
@@ -331,7 +344,7 @@ xasprintf(char **strp, const char *fmt, ...)
                        return -1;
                }
 
-               va_start(args, fmt);
+               va_copy(args, ap);
                outsize = vsnprintf(buf, bufsize, fmt, args);
                va_end(args);
                
@@ -383,6 +396,7 @@ xasprintf(char **strp, const char *fmt, ...)
        return outsize;
 }
 
+
 /* 
  * Duplicate a pascal string into a normal C string.
  */
@@ -693,6 +707,13 @@ le_read16(const void *addr)
        return p[0] | (p[1] << 8);
 }
 
+unsigned int
+le_readu16(const void *addr)
+{
+       const unsigned char *p = addr;
+       return p[0] | (p[1] << 8);
+}
+
 signed int
 le_read32(const void *addr)
 {
@@ -700,6 +721,13 @@ le_read32(const void *addr)
        return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
 }
 
+unsigned int
+le_readu32(const void *addr)
+{
+       const unsigned char *p = addr;
+       return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
+}
+
 /*
  *  Read a little-endian 64-bit value from 'src' and return it in 'dest' 
  *  in host endianness.
@@ -897,6 +925,7 @@ get_cache_icon(const waypoint *waypointp)
                default:
                        break;
        }
+
        switch (waypointp->gc_data.container) {
                case gc_micro: 
                        return "Micro-Cache";
@@ -904,6 +933,11 @@ get_cache_icon(const waypoint *waypointp)
                default:
                        break;
        }
+
+       if (waypointp->gc_data.diff > 1) {
+               return "Geocache";
+       }
+
        return NULL;
 }
 
@@ -1029,118 +1063,6 @@ double degrees2ddmm(double deg_val) {
        return (double) (deg * 100.0) + ((deg_val - deg) * 60.0);
 }
 
-/* 
- * Convert string 'str' into geodetic latitide & longitude values. The format
- * will be interpreted depending on 'grid' parameter.
- *
- * return value: number of characters efective parsed
- */
-
-int
-parse_coordinates(const char *str, int datum, const grid_type grid, 
-       double *latitude, double *longitude, const char *module)
-{
-       double lat, lon;
-       unsigned char lathemi, lonhemi;
-       int deg_lat, deg_lon, min_lat, min_lon;
-       char map[3];
-       int utmz;
-       double utme, utmn;
-       char utmc;
-       int valid, result, ct;
-       double lx, ly;
-       const char *format;
-       
-       valid = 1;
-       
-       switch(grid) {
-
-               case grid_lat_lon_ddd:
-                       format = "%c%lf %c%lf%n";
-                       ct = sscanf(str, format,
-                               &lathemi, &lat, &lonhemi, &lon, &result);
-                       valid = (ct == 4);
-                       break;
-
-               case grid_lat_lon_dmm:
-                       format = "%c%d %lf %c%d %lf%n";
-                       ct = sscanf(str, format,
-                               &lathemi, &deg_lat, &lat, &lonhemi, &deg_lon, &lon, &result);
-                       valid = (ct == 6);
-                       if (valid) {
-                               lat = (double)deg_lat + (lat / (double)60);
-                               lon = (double)deg_lon + (lon / (double)60);
-                       }
-                       break;
-               
-               case grid_lat_lon_dms:
-                       format = "%c%d %d %lf %c%d %d %lf%n";
-                       ct = sscanf(str, format,
-                               &lathemi, &deg_lat, &min_lat, &lat, &lonhemi, &deg_lon, &min_lon, &lon,
-                               &result);
-                       valid = (ct == 8);
-                       if (valid) {
-                               lat = (double)deg_lat + ((double)min_lat / (double)60) + (lat / (double)3600.0);
-                               lon = (double)deg_lon + ((double)min_lon / (double)60) + (lon / (double)3600.0);
-                       }
-                       break;
-               
-               case grid_bng:
-                       format = "%2s %lf %lf%n";
-                       ct = sscanf(str, format,
-                               map, &lx, &ly,
-                               &result);
-                       valid = (ct == 3);
-                       if (valid) {
-                               if (! GPS_Math_UKOSMap_To_WGS84_M(map, lx, ly, &lat, &lon))
-                                       fatal("%s: Unable to convert BNG coordinates (%s)!\n",
-                                               module, str);
-                       }
-                       datum = DATUM_WGS84;    /* fix */
-                       lathemi = lonhemi = '\0';
-                       break;
-                       
-               case grid_utm:
-                       format = "%d %c %lf %lf%n";
-                       ct = sscanf(str, format,
-                               &utmz, &utmc, &utme, &utmn,
-                               &result);
-                       valid = (ct == 4);
-                       if (valid) {
-                               if (! GPS_Math_UTM_EN_To_Known_Datum(&lat, &lon, utme, utmn, utmz, utmc, datum))
-                                       fatal("%s: Unable to convert UTM coordinates (%s)!\n",
-                                               module, str);
-                       }
-                       lathemi = lonhemi = '\0';
-                       break;
-                       
-               default:
-                       /* this should never happen in a release version */
-                       fatal("%s/util: Unknown grid in parse_coordinates (%d)!\n",
-                               module, (int)grid);
-       }
-       
-       if (! valid) {
-               warning("%s: sscanf error using format \"%s\"!\n", module, format);
-               warning("%s: parsing has stopped at parameter number %d.\n", module, ct);
-               fatal("%s: could not convert coordinates \"%s\"!\n", module, str);
-       }
-       
-       if (lathemi == 'S') lat = -lat;
-       if (lonhemi == 'W') lon = -lon;
-
-       if (datum != DATUM_WGS84) {
-               double alt;
-               GPS_Math_Known_Datum_To_WGS84_M(lat, lon, (double) 0.0,
-                       &lat, &lon, &alt, datum);
-       }
-
-       if (latitude) *latitude = lat;
-       if (longitude) *longitude = lon;
-               
-       return result;
-}
-
 /*
  * replace a single occurrence of "search" in  "s" with "replace".
  * Returns an allocated copy if substitution was made, otherwise returns NULL.
@@ -1181,14 +1103,30 @@ strsub(const char *s, const char *search, const char *replace)
 char *
 gstrsub(const char *s, const char *search, const char *replace)
 {
-       char *o = xstrdup(s);
+       int ooffs = 0;
+       char *o, *c;
+       char *src = (char *)s;
+       int olen = strlen(src);
+       int slen = strlen(search);
+       int rlen = strlen(replace);
 
-       while (strstr(o, search)) {
-               char *oo = o;
-               o = strsub(o, search, replace);
-               xfree(oo);
+       o = xmalloc(olen + 1);
+       
+       while ((c = strstr(src, search))) {
+               olen += (rlen - slen);
+               o = xrealloc(o, olen + 1);
+               memcpy(o + ooffs, src, c - src);
+               ooffs += (c - src);
+               src = c + slen;
+               if (rlen) {
+                       memcpy(o + ooffs, replace, rlen);
+                       ooffs += rlen;
+               }
        }
 
+       if (ooffs < olen)
+               memcpy(o + ooffs, src, olen - ooffs);
+       o[olen] = '\0';
        return o;
 }
 
diff --git a/vcf.c b/vcf.c
index 05c6a752a918fc770a611a3a27cff6b0dc2608f9..0792af96367afbff71ff90463bbe4060ff3fbae1 100644 (file)
--- a/vcf.c
+++ b/vcf.c
@@ -58,7 +58,7 @@ wr_deinit(void)
 static void
 vcf_print_utf(const utf_string *s)
 {
-       char *p, *p2;
+       char *p, *p2, *p3;
        char *stripped_html;
 
        if (!s)
@@ -67,9 +67,11 @@ vcf_print_utf(const utf_string *s)
        stripped_html = strip_html(s);
        p = gstrsub(stripped_html, "\n", "\\n");
        p2 = gstrsub(p, "<p>", "\\n");
-       gbfputs(p2, file_out);
+       p3 = gstrsub(p2, ";", "\\;");
+       gbfputs(p3, file_out);
        xfree(p);
        xfree(p2);
+       xfree(p3);
        xfree(stripped_html);
 }
 
@@ -96,7 +98,7 @@ vcf_disp(const waypoint *wpt)
 
        gbfprintf(file_out, "BEGIN:VCARD\nVERSION:3.0\n");
        gbfprintf(file_out, "N:%s;%s;;;\n", wpt->description,wpt->shortname);
-       gbfprintf(file_out, "ORG:%c%d %06.3f %c%d %06.3f\n", wpt->latitude < 0 ? 'S' : 'N',  abs(latint), 60.0 * (fabs(wpt->latitude) - latint), wpt->longitude < 0 ? 'W' : 'E', abs(lonint), 60.0 * (fabs(wpt->longitude) - lonint));
+       gbfprintf(file_out, "ADR:%c%d %06.3f %c%d %06.3f\n", wpt->latitude < 0 ? 'S' : 'N',  abs(latint), 60.0 * (fabs(wpt->latitude) - latint), wpt->longitude < 0 ? 'W' : 'E', abs(lonint), 60.0 * (fabs(wpt->longitude) - lonint));
 
        if (wpt->url) {
                gbfprintf(file_out, "URL:%s\n", wpt->url);
diff --git a/vecs.c b/vecs.c
index f71bd0822bb1fcc959970c96b5847453201508cd..c091ae4351a7d7c009cf15aec90c5ad5a3503b63 100644 (file)
--- a/vecs.c
+++ b/vecs.c
@@ -1,7 +1,7 @@
 /*
     Describe vectors containing file operations.
  
-    Copyright (C) 2002, 2004, 2005, 2006  Robert Lipe, robertlipe@usa.net
+    Copyright (C) 2002, 2004, 2005, 2006, 2007 Robert Lipe, robertlipe@usa.net
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@
 #include "defs.h"
 #include "csv_util.h"
 #include "inifile.h"
+#include "gbversion.h"
 
 #define MYNAME "vecs.c"
 
@@ -44,6 +45,7 @@ extern ff_vecs_t compegps_vecs;
 extern ff_vecs_t copilot_vecs;
 extern ff_vecs_t coto_vecs;
 extern ff_vecs_t cst_vecs;
+extern ff_vecs_t dg100_vecs;
 extern ff_vecs_t easygps_vecs;
 extern ff_vecs_t garmin_vecs;
 extern ff_vecs_t garmin_txt_vecs;
@@ -77,6 +79,8 @@ extern ff_vecs_t magX_fvecs;
 extern ff_vecs_t mapsend_vecs;
 extern ff_vecs_t mps_vecs;
 extern ff_vecs_t msroute_vecs;
+extern ff_vecs_t mtk_vecs;
+extern ff_vecs_t mtk_fvecs;
 extern ff_vecs_t navicache_vecs;
 extern ff_vecs_t netstumbler_vecs;
 extern ff_vecs_t nmea_vecs;
@@ -91,8 +95,12 @@ extern ff_vecs_t psp_vecs;
 extern ff_vecs_t quovadis_vecs;
 extern ff_vecs_t saroute_vecs;
 extern ff_vecs_t shape_vecs;
+#if CSVFMTS_ENABLED
 extern ff_vecs_t stmsdf_vecs;
+#endif
+#if CSVFMTS_ENABLED
 extern ff_vecs_t stmwpp_vecs;
+#endif
 extern ff_vecs_t tef_xml_vecs;
 extern ff_vecs_t text_vecs;
 extern ff_vecs_t tiger_vecs;
@@ -118,6 +126,17 @@ extern ff_vecs_t vitovtt_vecs;
 extern ff_vecs_t ggv_log_vecs;
 extern ff_vecs_t g7towin_vecs;
 extern ff_vecs_t garmin_gpi_vecs;
+extern ff_vecs_t lmx_vecs;
+extern ff_vecs_t random_vecs;
+extern ff_vecs_t xol_vecs;
+extern ff_vecs_t navilink_vecs;
+extern ff_vecs_t ik3d_vecs;
+extern ff_vecs_t osm_vecs;
+extern ff_vecs_t destinator_poi_vecs;
+extern ff_vecs_t destinator_trl_vecs;
+extern ff_vecs_t destinator_itn_vecs;
+extern ff_vecs_t exif_vecs;
+extern ff_vecs_t vidaone_vecs;
 
 static
 vecs_t vec_list[] = {
@@ -160,24 +179,43 @@ vecs_t vec_list[] = {
                "Magellan SD files (as for eXplorist)", 
                "upt"
        },
+       {
+               &garmin_vecs,
+               "garmin",
+               "Garmin serial/USB protocol", 
+               NULL
+       },
        {
                &mapsend_vecs,
                "mapsend",
                "Magellan Mapsend", 
                NULL
        },
-       {
-               &pcx_vecs,
-               "pcx",
-               "Garmin PCX5",
-               "pcx"
-       },
        {
                &mps_vecs,
                "mapsource",
                "Garmin MapSource - mps",
                "mps"
        },
+       {
+               &nmea_vecs,
+               "nmea",
+               "NMEA 0183 sentences",
+               NULL
+       },
+        {
+                &kml_vecs,
+                "kml",
+                "Google Earth (Keyhole) Markup Language",
+                "kml"
+       },
+#if MAXIMAL_ENABLED
+       {
+               &pcx_vecs,
+               "pcx",
+               "Garmin PCX5",
+               "pcx"
+       },
        {
                &gpsutil_vecs,
                "gpsutil",
@@ -222,12 +260,6 @@ vecs_t vec_list[] = {
                "pdb"
        },
 #endif /* PDBFMTS_ENABLED */
-       {
-               &garmin_vecs,
-               "garmin",
-               "Garmin serial/USB protocol", 
-               NULL
-       },
        {
                &holux_vecs,
                "holux",
@@ -344,12 +376,6 @@ vecs_t vec_list[] = {
                "OziExplorer",
                NULL
        },
-       {
-               &nmea_vecs,
-               "nmea",
-               "NMEA 0183 sentences",
-               NULL
-       },
        {
                &text_vecs,
                "text",
@@ -394,6 +420,18 @@ vecs_t vec_list[] = {
                 "Brauniger IQ Series Barograph Download",
                 NULL
         },
+        {
+                &mtk_vecs,
+                "mtk",
+                "MTK Logger (iBlue 747,Qstarz BT-1000,...) download",
+                NULL
+        },
+        {
+                &mtk_fvecs,
+                "mtk-bin",
+                "MTK Logger (iBlue 747,...) Binary File Format",
+                "bin"
+        },
         {
                 &wbt_svecs,
                 "wbt",
@@ -424,12 +462,6 @@ vecs_t vec_list[] = {
                 "Garmin Logbook XML",
                 "xml"
         },
-        {
-                &kml_vecs,
-                "kml",
-                "Google Earth (Keyhole) Markup Language",
-                "kml"
-       },
        {
                 &vcf_vecs,
                 "vcard",
@@ -520,18 +552,22 @@ vecs_t vec_list[] = {
                "IGN Rando track files",
                "rdn"
        },
+#if CSVFMTS_ENABLED
        {
                &stmsdf_vecs,
                "stmsdf",
                "Suunto Trek Manager (STM) .sdf files",
                "sdf"
        },
+#endif
+#if CSVFMTS_ENABLED
        {
                &stmwpp_vecs,
                "stmwpp",
                "Suunto Trek Manager (STM) WaypointPlus files",
                "txt"
        },
+#endif //  CSVFMTS_ENABLED
        {
                &msroute_vecs,
                "msroute",
@@ -666,6 +702,79 @@ vecs_t vec_list[] = {
                 "Garmin Points of Interest (.gpi)",
                 "gpi"
         },
+        {
+                &lmx_vecs,
+                "lmx",
+                "Nokia Landmark Exchange",
+                NULL
+        },
+        {
+                &random_vecs,
+                "random",
+                "Internal GPS data generator",
+                NULL
+        },
+        {
+                &xol_vecs,
+                "xol",
+                "Swiss Map # (.xol) format",
+                "xol"
+        },
+        {
+                &dg100_vecs,
+                "dg-100",
+                "GlobalSat DG-100/BT-335 Download",
+                NULL
+        },
+        {
+                &navilink_vecs,
+                "navilink",
+                "NaviGPS GT-11/BGT-11 Download",
+                NULL
+        },
+        {
+                &ik3d_vecs,
+                "ik3d",
+                "MagicMaps IK3D project file (.ikt)",
+                "ikt"
+        },
+        {
+                &osm_vecs,
+                "osm",
+                "OpenStreetMap data files",
+                "xml"
+        },
+        {
+                &destinator_poi_vecs,
+                "destinator_poi",
+                "Destinator Points of Interest (.dat)",
+                "dat"
+        },
+        {
+                &destinator_itn_vecs,
+                "destinator_itn",
+                "Destinator Itineraries (.dat)",
+                "dat"
+        },
+        {
+                &destinator_trl_vecs,
+                "destinator_trl",
+                "Destinator TrackLogs (.dat)",
+                "dat"
+        },
+        {
+                &exif_vecs,
+                "exif",
+                "Embedded Exif-GPS data (.jpg)",
+               "jpg"
+        },
+        {
+                &vidaone_vecs,
+                "vidaone",
+                "VidaOne GPS for Pocket PC (.gpb)",
+               "gpb"
+        },
+#endif // MAXIMAL_ENABLED
        {
                NULL,
                NULL,
@@ -832,7 +941,9 @@ find_vec(char *const vecname, char **opts)
                if (global_opts.debug_level >= 1)
                        disp_vec_options(vec->name, vec->vec->args);
                
+#if CSVFMTS_ENABLED            
                xcsv_setup_internal_style( NULL );
+#endif // CSVFMTS_ENABLED              
                xfree(v);
                return vec->vec;
                
@@ -884,8 +995,9 @@ find_vec(char *const vecname, char **opts)
 
                if (global_opts.debug_level >= 1)
                        disp_vec_options(svec->name, vec_list[0].vec->args);
-               
+#if CSVFMTS_ENABLED            
                xcsv_setup_internal_style(svec->style_buf);
+#endif // CSVFMTS_ENABLED              
 
                xfree(v);
 
@@ -974,13 +1086,19 @@ sort_and_unify_vecs(int *ctp)
        int vc;
        vecs_t **svp;
        vecs_t *vec;
+#if CSVFMTS_ENABLED
        style_vecs_t *svec;
+#endif
        int i = 0;
 
        /* Get a count from both the vec (normal) and the svec (csv) lists */
 
+#if CSVFMTS_ENABLED
        extern size_t nstyles;
-       vc = sizeof vec_list / sizeof vec_list[0] -1 + nstyles;
+       vc = sizeof vec_list / sizeof vec_list[0] - 1 + nstyles;
+#else
+       vc = sizeof vec_list / sizeof vec_list[0] - 1;
+#endif // CSVFMTS_ENABLED
 
 
        svp = xcalloc(vc, sizeof(style_vecs_t *));
@@ -992,6 +1110,7 @@ sort_and_unify_vecs(int *ctp)
                }
        }
 
+#if CSVFMTS_ENABLED
        /* Walk the style list, parse the entries, dummy up a "normal" vec */
        for (svec = style_list; svec->name; svec++, i++)  {
                xcsv_read_internal_style(svec->style_buf);
@@ -1026,6 +1145,8 @@ sort_and_unify_vecs(int *ctp)
                svp[i]->desc = xcsv_file.description;
                svp[i]->parent = "xcsv";
        }
+#endif // CSVFMTS_ENABLED
+
        /* Now that we have everything in an array, alphabetize them */
        qsort(svp, vc, sizeof(*svp), alpha);
 
@@ -1139,14 +1260,26 @@ name_option(long type)
        return at[0];
 }
 
+static 
+void disp_help_url(const vecs_t *vec, arglist_t *arg)
+{
+       printf("\t" WEB_DOC_DIR "/fmt_%s.html", vec->name);
+       if (arg) {
+               printf("#fmt_%s_o_%s",vec->name, arg->argstring);
+       }
+       printf("\n");
+}
+
+
 static void 
-disp_v3(vecs_t *vec)
+disp_v3(const vecs_t *vec)
 {
        arglist_t *ap;
 
+       disp_help_url(vec, NULL);
        for (ap = vec->vec->args; ap && ap->argstring; ap++) {
-               if ( !(ap->argtype & ARGTYPE_HIDDEN))
-                       printf("option\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",
+               if ( !(ap->argtype & ARGTYPE_HIDDEN)) {
+                       printf("option\t%s\t%s\t%s\t%s\t%s\t%s\t%s",
                        vec->name, 
                        ap->argstring, 
                        ap->helpstring, 
@@ -1154,6 +1287,9 @@ disp_v3(vecs_t *vec)
                        ap->defaultvalue? ap->defaultvalue : "",
                        ap->minvalue? ap->minvalue : "",
                        ap->maxvalue? ap->maxvalue : "");
+               }
+               disp_help_url(vec, ap);
+               printf("\n");
        }
 }
 
diff --git a/vidaone.c b/vidaone.c
new file mode 100644 (file)
index 0000000..91cfcaf
--- /dev/null
+++ b/vidaone.c
@@ -0,0 +1,134 @@
+/*
+
+    Support for VidaOne GPS for Pocket PC (.gpb) files
+
+    Copyright (C) 2008 Olaf Klein, o.b.klein@gpsbabel.org
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+ */
+
+ /*
+    Simple layout:
+
+       struct
+       {
+               double dLatitude
+               double dLongitude
+               float fReserved
+       };
+ */
+#include "defs.h"
+#include <ctype.h>
+#include <math.h>
+
+#define MYNAME "vidaone"
+
+static
+arglist_t vidaone_args[] = {
+       ARG_TERMINATOR
+};
+
+static gbfile *fin, *fout;
+
+/*******************************************************************************
+* %%%        global callbacks called by gpsbabel main process              %%% *
+*******************************************************************************/
+
+static void
+vidaone_rd_init(const char *fname)
+{
+       fin = gbfopen(fname, "rb", MYNAME);
+}
+
+static void 
+vidaone_rd_deinit(void)
+{
+       gbfclose(fin);
+}
+
+static void
+vidaone_read(void)
+{
+       route_head *trk = NULL;
+       
+       while (! gbfeof(fin)) {
+               waypoint *wpt = waypt_new();
+
+               wpt->latitude = gbfgetdbl(fin);
+               wpt->longitude = gbfgetdbl(fin);
+               (void) gbfgetflt(fin);
+               
+               /* Only one basic check of data integrity */
+               if ((fabs(wpt->latitude) > 90) || (fabs(wpt->longitude) > 180))
+                       fatal(MYNAME ": Latitude and/or longitude out of range.\n");
+
+               if (!trk) {
+                       trk = route_head_alloc();
+                       track_add_head(trk);
+               }
+
+               track_add_wpt(trk, wpt);
+       }
+}
+
+static void
+vidaone_wr_init(const char *fname)
+{
+       fout = gbfopen(fname, "wb", MYNAME);
+}
+
+static void
+vidaone_wr_deinit(void)
+{
+       gbfclose(fout);
+}
+
+static void
+vidaone_trkpt(const waypoint *wpt)
+{
+       gbfputdbl(wpt->latitude, fout);
+       gbfputdbl(wpt->longitude, fout);
+       gbfputflt(0, fout);
+}
+
+static void
+vidaone_write(void)
+{
+       track_disp_all(NULL, NULL, vidaone_trkpt);
+}
+
+/**************************************************************************/
+
+ff_vecs_t vidaone_vecs = {
+       ff_type_file,
+       { 
+               ff_cap_none                     /* waypoints */, 
+               ff_cap_read | ff_cap_write      /* tracks */, 
+               ff_cap_none                     /* routes */
+       },
+       vidaone_rd_init,        
+       vidaone_wr_init,        
+       vidaone_rd_deinit,      
+       vidaone_wr_deinit,      
+       vidaone_read,
+       vidaone_write,
+       NULL,
+       vidaone_args,
+       CET_CHARSET_UTF8, 1
+};
+
+/**************************************************************************/
index 6d953177f3e2c396356a46dda60eb17f41f99ef7..1297eb7b41b9b85483cd105858e71c4e1fc0c5f1 100644 (file)
--- a/vitosmt.c
+++ b/vitosmt.c
@@ -28,8 +28,8 @@
 #include "defs.h"
 #include "grtcirc.h"
 
-static FILE                            *infile =0;
-static FILE                            *ofs    =0;
+static gbfile                          *infile =NULL;
+static gbfile                          *ofs    =NULL;
 static long                            count   =0;
 
 const long                             vitosmt_version                 =2;
@@ -37,31 +37,12 @@ const long                          vitosmt_subversion              =1000;
 const size_t                   vitosmt_headersize              =24;
 const size_t                   vitosmt_datasize                =64;
 
-static unsigned long
-ReadLong(FILE * f)
-{
-       gbuint32 result = 0;
-
-       fread(&result, sizeof (result), 1, f);
-       return le_read32(&result);
-}
-
-static double
-ReadDouble(FILE * f)
-{
-       unsigned char buffer[8] = "\0\0\0\0\0\0\0\0";
-       fread(buffer, sizeof (buffer), 1, f);
-       return le_read_double(buffer );
-}
-
-
 static unsigned char *
-ReadRecord(FILE * f,
-          size_t size)
+ReadRecord(gbfile *f, gbsize_t size)
 {
        unsigned char *result = (unsigned char *) xmalloc(size);
 
-       fread(result, size, 1, f);
+       gbfread(result, size, 1, f);
        return result;
 }
 
@@ -77,13 +58,13 @@ WriteDouble(void* ptr, double d)
 static void
 rd_init(const char *fname)
 {
-       infile = xfopen(fname, "rb", MYNAME);
+       infile = gbfopen_le(fname, "rb", MYNAME);
 }
 
 static void
 rd_deinit(void)
 {
-       fclose(infile);
+       gbfclose(infile);
 }
 
 static void
@@ -115,12 +96,12 @@ vitosmt_read(void)
        /* 
         * 24 bytes header 
         */
-       version         = ReadLong(infile);     /* 2    */
-       subversion      = ReadLong(infile);     /* 1000 */
-       count           = ReadLong(infile);     /* n    */
-       check1          = ReadLong(infile);     /* 0    */
-       check2          = ReadLong(infile);     /* not sure */
-       check3          = ReadLong(infile);     /* n    */
+       version         = gbfgetint32(infile);  /* 2    */
+       subversion      = gbfgetint32(infile);  /* 1000 */
+       count           = gbfgetint32(infile);  /* n    */
+       check1          = gbfgetint32(infile);  /* 0    */
+       check2          = gbfgetint32(infile);  /* not sure */
+       check3          = gbfgetint32(infile);  /* n    */
 
        if (version!=vitosmt_version) {
        
@@ -146,32 +127,32 @@ vitosmt_read(void)
                /*
                 *      64 bytes of data        
                 */
-               if (feof(infile)||ferror(infile)) 
+               if (gbfeof(infile)||gbferror(infile)) 
                {
                        warning("%s (%d) reading file.  Unexpected end of file %s\n",
                                MYNAME, __LINE__, strerror(errno) );
                        break;
                }
 #if 0
-               fprintf(stderr, "Looptop %d\n", ftell(infile));
+               fprintf(stderr, "Looptop %d\n", gbftell(infile));
 #endif
-               latrad          =ReadDouble(infile);    /* WGS84 latitude in radians */
-               lonrad          =ReadDouble(infile);    /* WGS84 longitude in radians */
-               elev            =ReadDouble(infile);    /* elevation in meters */
+               latrad          =gbfgetdbl(infile);     /* WGS84 latitude in radians */
+               lonrad          =gbfgetdbl(infile);     /* WGS84 longitude in radians */
+               elev            =gbfgetdbl(infile);     /* elevation in meters */
 #if 0
-               fprintf(stderr, "before %d\n", ftell(infile));
+               fprintf(stderr, "before %d\n", gbftell(infile));
 #endif
                timestamp       =ReadRecord(infile,5);  /* UTC time yr/mo/dy/hr/mi */
 #if 0
-               fprintf(stderr, "%d latrad %f/%f ele %f\n", ftell(infile),latrad, DEG(latrad), elev);
+               fprintf(stderr, "%d latrad %f/%f ele %f\n", gbftell(infile),latrad, DEG(latrad), elev);
 #endif
-               seconds         =ReadDouble(infile);    /* seconds */
-               speed           =ReadDouble(infile);    /* speed in knots */
-               course          =ReadDouble(infile);    /* course in degrees */
-               pdop            =ReadDouble(infile);    /* dilution of precision */
-               gpsfix          =fgetc(infile);                 /* fix type x08,x10, x20  */    
-               gpsvalid        =fgetc(infile);                 /* fix is valid */
-       gpssats =fgetc(infile);                         /* number of sats */
+               seconds         =gbfgetdbl(infile);     /* seconds */
+               speed           =gbfgetdbl(infile);    /* speed in knots */
+               course          =gbfgetdbl(infile);     /* course in degrees */
+               pdop            =gbfgetdbl(infile);     /* dilution of precision */
+               gpsfix          =gbfgetc(infile);       /* fix type x08,x10, x20  */    
+               gpsvalid        =gbfgetc(infile);       /* fix is valid */
+               gpssats         =gbfgetc(infile);       /* number of sats */
 
                wpt_tmp = waypt_new();
                
@@ -248,13 +229,13 @@ static void
 wr_init(const char *fname)
 {
        warning(MYNAME " write: format is experimental and may crash Vito Navigator II.\n");
-       ofs = xfopen(fname, "wb", MYNAME);
+       ofs = gbfopen_le(fname, "wb", MYNAME);
 }
 
 static void
 wr_deinit(void)
 {
-       fclose(ofs);
+       gbfclose(ofs);
 
 }
 
@@ -330,11 +311,7 @@ vitosmt_waypt_pr(const waypoint *waypointp)
        else
                workbuffer[position++] = 0;
        
-       if (fwrite(workbuffer,vitosmt_datasize,1,ofs)!=1)
-       {
-               fatal("%s (%d) writing output file.  Error was '%s'.\n",
-                       MYNAME, __LINE__, strerror(errno));
-       }
+       (void)gbfwrite(workbuffer,vitosmt_datasize,1,ofs);
        
        xfree(workbuffer);
 }
@@ -355,11 +332,7 @@ vitosmt_write(void)
 
        /* leave a spacer for the header */
        memset(workbuffer,0,vitosmt_headersize);
-       if (fwrite(workbuffer,vitosmt_headersize,1,ofs)!=1)
-       {
-               fatal("%s (%d) writing output file.  Error was '%s'.\n",
-                       MYNAME, __LINE__, strerror(errno));
-       }
+       (void)gbfwrite(workbuffer,vitosmt_headersize,1,ofs);
 
        if      (doing_wpts)    /* process as waypoints */
        {
@@ -389,12 +362,8 @@ vitosmt_write(void)
        le_write32(&workbuffer[position],count);
        position += sizeof(gbuint32);
 
-       rewind(ofs);
-       if (fwrite(workbuffer,vitosmt_headersize,1,ofs)!=1)
-       {
-               fatal("%s (%d) writing output file.  Error was '%s'.\n",
-                       MYNAME, __LINE__, strerror(errno));
-       }
+       gbfrewind(ofs);
+       (void)gbfwrite(workbuffer,vitosmt_headersize,1,ofs);
 
        xfree(workbuffer);
 }
diff --git a/waypt.c b/waypt.c
index d3860bd5f0333a63fe1751b0e854a7f768b7a5ee..b1d49e3db9c2f7a16821ef8b3b28fe1f255eb4f6 100644 (file)
--- a/waypt.c
+++ b/waypt.c
 #include "defs.h"
 #include "cet_util.h"
 #include "grtcirc.h"
+#include "garmin_fs.h"
 
 queue waypt_head;
 static unsigned int waypt_ct;
 static short_handle mkshort_handle;
+int geocaches_present;
 
 void
 waypt_init(void)
@@ -140,6 +142,16 @@ waypt_add(waypoint *wpt)
                        }
                }
        }
+
+       /* This is a bit tacky, but it allows a hint whether we've seen
+        * geocaches or not in the life cycle of this run.   Of course,
+        * the caches could have been filtered out of existance and not
+        * all waypoints may have this and a few other pitfalls, but it's
+        * an easy and fast test here.
+        */
+       if (wpt->gc_data.diff && wpt->gc_data.terr) {
+               geocaches_present = 1;
+       }
 }
 
 void
@@ -454,6 +466,18 @@ waypt_add_url(waypoint *wpt, char *link, char *url_link_text)
        }
 }
 
+static double
+gcgeodist(const double lat1, const double lon1,
+            const double lat2, const double lon2)
+{
+       double res;
+
+       res = radtometers(gcdist(RAD(lat1), RAD(lon1), RAD(lat2), RAD(lon2)));
+       if (res < 0.1) res = 0; /* calc. diffs on 32- and 64-bit hosts */
+       
+       return res;
+}
+
 /*
  * returns full creation_time with parts of seconds in fractional portion
  */
@@ -468,7 +492,68 @@ waypt_time(const waypoint *wpt)
 }
 
 /*
- * calculates the speed between points "A" and "B"
+ * Calculates the distance between points "A" and "B" including
+ * special data (Garmin interstep links)
+ * The result comes in meters.
+ */ 
+
+double
+waypt_distance_ex(const waypoint *A, const waypoint *B)
+{
+       double res = 0;
+       garmin_fs_p gmsd;
+       
+       if ((A == NULL) || (B == NULL)) return 0;
+       
+       if ((gmsd = GMSD_FIND(A)) && (gmsd->ilinks != NULL))
+       {
+               garmin_ilink_t *link = gmsd->ilinks;
+               
+               res = gcgeodist(A->latitude, A->longitude, link->lat, link->lon);
+               while (link->next != NULL)
+               {
+                       garmin_ilink_t *prev = link;
+                       link = link->next;
+                       res += gcgeodist(prev->lat, prev->lon, link->lat, link->lon);
+               }
+               res += gcgeodist(link->lat, link->lon, B->latitude, B->longitude);
+       }
+       else
+               res = gcgeodist(A->latitude, A->longitude, B->latitude, B->longitude);
+
+       return res;
+}
+
+double
+waypt_distance(const waypoint *A, const waypoint *B)
+{
+       if ((A == NULL) || (B == NULL)) return 0;
+       else return gcgeodist(A->latitude, A->longitude, B->latitude, B->longitude);
+}
+
+/*
+ * Calculates the speed between points "A" and "B" including
+ * special data (Garmin interstep links)
+ * The result comes in meters per second and is always positive.
+ */ 
+
+double
+waypt_speed_ex(const waypoint *A, const waypoint *B)
+{
+       double dist, time;
+       
+       dist = waypt_distance_ex(A, B);
+       if (dist == 0) return 0;
+       
+       time = fabs(waypt_time(A) - waypt_time(B));
+       if (time > 0)
+               return (dist / time);
+       else
+               return 0;
+}
+
+/*
+ * Calculates the speed between points "A" and "B"
  * the result comes in meters per second and is always positive
  */ 
 
@@ -477,10 +562,7 @@ waypt_speed(const waypoint *A, const waypoint *B)
 {
        double dist, time;
        
-       dist = radtometers(gcdist(
-               RAD(A->latitude), RAD(A->longitude),
-               RAD(B->latitude), RAD(B->longitude)));
-       if (dist < 0.1) dist = 0;       /* calc. diffs on 32- and 64-bit hosts */
+       dist = waypt_distance(A, B);
        if (dist == 0) return 0;
        
        time = fabs(waypt_time(A) - waypt_time(B));
@@ -489,3 +571,15 @@ waypt_speed(const waypoint *A, const waypoint *B)
        else
                return 0;
 }
+
+/*
+ * Calculates "Course True" from A to B
+ */
+double
+waypt_course(const waypoint *A, const waypoint *B)
+{
+       if (A && B)
+               return heading_true_degrees(RAD(A->latitude), RAD(A->longitude), RAD(B->latitude), RAD(B->longitude));
+       else
+               return 0;
+}
index 338f79f00ae206d90ecc1c11f645d55840edd420..9bb790ac308f559ebcb51e9dae1af4e4b1ea6ec0 100644 (file)
Binary files a/win32/GPSBabelGUI.exe and b/win32/GPSBabelGUI.exe differ
index 0324535691938637ae59f410efc4e34ce8d06af4..efe8d802571a2b5024619dfd9a4e01193b3249a1 100644 (file)
@@ -1,8 +1,8 @@
 MAINICON ICON "@srcdir@/win32/gpsbabel.ico"
 
 1 VERSIONINFO
-FILEVERSION @GBMAJOR@,@GBMINOR@,@GBMICRO@,0
-PRODUCTVERSION @GBMAJOR@,@GBMINOR@,@GBMICRO@,0
+FILEVERSION @GBMAJOR@,@GBMINOR@,@GBMICRO@,@GBBUILD@
+PRODUCTVERSION @GBMAJOR@,@GBMINOR@,@GBMICRO@,@GBBUILD@
 FILEOS 0x4
 FILETYPE 0x1
 FILESUBTYPE 0x0L
@@ -16,7 +16,7 @@ FILEFLAGSMASK 0x3fL
                VALUE "FileDescription", "GPS format converter\0"
                VALUE "FileVersion", "@GBMAJOR@.@GBMINOR@.@GBMICRO@@PACKAGE_RELEASE@\0"
                VALUE "InternalName", "\0"
-               VALUE "LegalCopyright", "(C) 2002-2007 The people behind GPSBabel\0"
+               VALUE "LegalCopyright", "(C) 2002-2008 The people behind GPSBabel\0"
                VALUE "LegalTrademarks", "\0"
                VALUE "OriginalFilename", "gpsbabel.exe\0"
                VALUE "ProductName", "GPSBabel\0"
index 511e5eef37c7411f4127a39419c4aa0ddce8968d..8adc0e882812025cbc16b3a998e1d6ec2dd07a1b 100644 (file)
@@ -31,5 +31,5 @@
 -M\r
 -$M16384,1048576\r
 -K$00400000\r
--LNd:\borland\delphi4\Lib\r
+-LNc:\programme\borland\delphi4\Lib\r
 -DMSWINDOWS\r
index fe1787057d4e714d0d4e6eec4c35bfcd8b76d54b..a1981ffe95ecca339b918cb7c053d97581716379 100644 (file)
@@ -56,8 +56,8 @@ IncludeVerInfo=1
 AutoIncBuild=0\r
 MajorVer=0\r
 MinorVer=2\r
-Release=8\r
-Build=2\r
+Release=15\r
+Build=0\r
 Debug=0\r
 PreRelease=0\r
 Special=0\r
@@ -68,9 +68,9 @@ CodePage=1252
 [Version Info Keys]\r
 CompanyName=GPSBabel Makers\r
 FileDescription=GPSBabel Windows Frontend\r
-FileVersion=0.2.8.2\r
+FileVersion=0.2.15.0\r
 InternalName=\r
-LegalCopyright=(C) 2005,2006 Olaf Klein (o.b.klein@gpsbabel.org)\r
+LegalCopyright=(C) 2005-2008 Olaf Klein (o.b.klein@gpsbabel.org)\r
 LegalTrademarks=\r
 OriginalFilename=GPSBabelGUI.exe\r
 ProductName=GPSBabel\r
index bd8b0f83b2d833407def4e993e9fcbccfbf2475c..9dd0094e0b0ea559ea9de5c39d991c4263b8d5e8 100644 (file)
@@ -1,6 +1,6 @@
 program GPSBabelGUI;\r
 {\r
-    Copyright (C) 2005 Olaf Klein, o.b.klein@gpsbabel.org\r
+    Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org\r
 \r
     This program is free software; you can redistribute it and/or modify\r
     it under the terms of the GNU General Public License as published by\r
@@ -30,7 +30,6 @@ uses
   common in 'common.pas',\r
   filter in 'filter.pas' {frmFilter},\r
   about in 'about.pas' {frmAbout},\r
-  readme in 'readme.pas' {frmReadme},\r
   options in 'options.pas' {frmOptions},\r
   select in 'select.pas' {frmSelect};\r
 \r
@@ -47,8 +46,8 @@ begin
 {$IFOPT D+}\r
 //  UseLanguage('fr');                 // for testing\r
 {$ENDIF}\r
+\r
   Application.Initialize;\r
   Application.CreateForm(TfrmMain, frmMain);\r
-  Application.CreateForm(TfrmReadme, frmReadme);\r
   Application.Run;\r
 end.\r
index 1a5d2408dc4478155379b92392c6b729db25ec9f..ce791d526d9c02f1bf8f3ba8322062bac10449a4 100644 (file)
Binary files a/win32/gui-2/GPSBabelGUI.res and b/win32/gui-2/GPSBabelGUI.res differ
index 3322d791d9e4420893a049f628c4b3e79a6feaa2..116e8dde778fcb49c0fc2754ca4288aaa1849997 100644 (file)
@@ -8,9 +8,9 @@ RC = brcc32.exe
 \r
 SRC = delphi.pas gnugettext.pas gnugettextD4.pas gnugettextD5.pas \\r
   gnugettextDx.pas common.pas utils.pas \\r
-  about.pas filter.pas options.pas main.pas readme.pas select.pas\r
+  about.pas filter.pas options.pas main.pas select.pas\r
 \r
-FRM = about.dfm filter.dfm options.dfm main.dfm readme.dfm select.dfm \r
+FRM = about.dfm filter.dfm options.dfm main.dfm select.dfm \r
 \r
 LANG = \\r
   locale\de\LC_MESSAGES\delphi.mo \\r
@@ -54,8 +54,8 @@ GPSBabelGUI.res: GPSBabelGUI.dof dof2rc.exe
        $(RC) GPSBabelGUI.rc\r
 \r
 clean:\r
-       rm -f *.bak *.dcu *.exe *.mo *.dll *.res *.rc\r
        rm -f *.~* *.??~ \r
+       rm -f *.bak *.dcu *.exe *.mo *.dll *.res *.rc\r
        rm -f readme.html README readme.xml\r
        rm -f locale\de\LC_MESSAGES\*.mo\r
        rm -f locale\es\LC_MESSAGES\*.mo\r
index d4dab20eea907246c481cf10cc1367af63c70004..da7417a420d02497e7c9f9a6225fbeb2cb903f02 100644 (file)
Binary files a/win32/gui-2/about.dfm and b/win32/gui-2/about.dfm differ
index 68aa609737e298a4e911411ed0197ba8b41611b5..ecc118f9771be3de738e396d8103ce6ea9c622f0 100644 (file)
@@ -1,7 +1,7 @@
 unit about;\r
 \r
 {\r
-    Copyright (C) 2005,2006 Olaf Klein, o.b.klein@gpsbabel.org\r
+    Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org\r
 \r
     This program is free software; you can redistribute it and/or modify\r
     it under the terms of the GNU General Public License as published by\r
index 6fddbb42f1a936b8539e582d5337adbef88f450f..352485aae5326cda134b69afb6b19f8324a0a0a3 100644 (file)
@@ -1,7 +1,7 @@
 unit common;\r
 \r
 {\r
-    Copyright (C) 2005,2006 Olaf Klein, o.b.klein@gpsbabel.org\r
+    Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org\r
 \r
     This program is free software; you can redistribute it and/or modify\r
     it under the terms of the GNU General Public License as published by\r
@@ -72,7 +72,7 @@ const
   SREG_GLOBAL_LANG = 'Global:Language';\r
   \r
 const\r
-  Profile: array[0..11] of string =\r
+  Profile: array[0..12] of string =\r
   ('?',\r
    SREG_SOURCE_DIR,\r
    SREG_SOURCE_FMT,\r
@@ -84,7 +84,8 @@ const
    SREG_TARGET_SER,\r
    SREG_TARGET_FILE,\r
    SREG_SOURCE_FILE,\r
-   SREG_GLOBAL_LANG);\r
+   SREG_GLOBAL_LANG,\r
+   'Main:Layout');\r
 \r
 const\r
   GPSBabel_Domain = 'gpsbabel';\r
@@ -96,6 +97,7 @@ type
     Ext:   string;\r
     internal: string;\r
     Capas: Integer;\r
+    url: PChar;\r
   end;\r
 \r
 type\r
index c7b21a61e0bb448de60ea0297fae4703090473a3..a6a38a91c4e2e4b4571612a63d2835ce0f867d3b 100644 (file)
Binary files a/win32/gui-2/filter.dfm and b/win32/gui-2/filter.dfm differ
index 396e947e59d84142fb39f07a461678db652dba1a..82497865de90305cfe6e80c09a5e1ed014970ab6 100644 (file)
@@ -1,7 +1,7 @@
 unit filter;\r
 \r
 {\r
-    Copyright (C) 2005,2006 Olaf Klein, o.b.klein@gpsbabel.org\r
+    Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org\r
 \r
     This program is free software; you can redistribute it and/or modify\r
     it under the terms of the GNU General Public License as published by\r
@@ -108,6 +108,7 @@ type
       Shift: TShiftState);\r
     procedure btnHelpClick(Sender: TObject);\r
     procedure cbTransformClick(Sender: TObject);\r
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);\r
     procedure cbGPSfixClick(Sender: TObject);\r
   private\r
     { Private-Deklarationen }\r
@@ -175,6 +176,7 @@ var
 \r
 begin\r
   TranslateComponent(SELF);\r
+  RestoreBounds('filter_form', Self);\r
 \r
   cobTransformType.Items.Clear;\r
   cobTransformType.Items.Add(_('Waypoints') + ' -> ' + _('Routes'));\r
@@ -253,6 +255,9 @@ begin
 \r
   gbTransform.Enabled := (common.gpsbabel_vfmt >= '001.003.002');\r
   EnableAll(gbTransform, gbTransform.Enabled);\r
+\r
+  cobTransformType.Enabled := cbTransform.Checked;\r
+  cbTransformDelete.Enabled := cbTransform.Checked;\r
 end;\r
 \r
 function TfrmFilter.ValidateNumerical(AEdit: TCustomEdit; AMin, AMax: Extended): Boolean;\r
@@ -512,7 +517,8 @@ end;
 \r
 procedure TfrmFilter.cbTrackMergeClick(Sender: TObject);\r
 begin\r
-  if cbTrackMerge.Checked then cbTrackPack.Checked := False;\r
+  if cbTrackMerge.Checked then\r
+    cbTrackPack.Checked := False;\r
 end;\r
 \r
 procedure TfrmFilter.cbWayptMergeDistanceClick(Sender: TObject);\r
@@ -738,11 +744,17 @@ end;
 procedure TfrmFilter.cbTransformClick(Sender: TObject);\r
 begin\r
   cobTransformType.Enabled := cbTransform.Checked;\r
+  cbTransformDelete.Enabled := cbTransform.Checked;\r
+end;\r
+\r
+procedure TfrmFilter.FormClose(Sender: TObject; var Action: TCloseAction);\r
+begin\r
+  StoreBounds('filter_form', Self);\r
 end;\r
 \r
 procedure TfrmFilter.cbGPSfixClick(Sender: TObject);\r
 begin\r
-  cobGPSfixes.Enabled := cbGPSfix.Checked;\r
+  cobGPSfixes.Enabled := TCheckBox(Sender).Checked;\r
 end;\r
 \r
 end.\r
index c86cf33d42e15756600ec9accae340fe32ee38cd..d703b5e7afc1b0919f8950ffc65be3a06e636f38 100644 (file)
@@ -1,14 +1,14 @@
 ; Script generated by the Inno Setup Script Wizard.\r
 ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!\r
 \r
-#define Version "1.3.2"\r
-#define Release ""\r
+#define Version "1.3.5"\r
+#define Release "-beta20070807"\r
 \r
 [Setup]\r
 AppName=GPSBabel\r
 AppVerName=GPSBabel-{#Version}{#Release}\r
 RestartIfNeededByRun=false\r
-DefaultDirName={pf}\GPSBabel-{#Version}\r
+DefaultDirName={pf}\GPSBabel\r
 ShowLanguageDialog=auto\r
 OutputDir=C:\TEMP\r
 SourceDir=.\\r
@@ -48,10 +48,6 @@ Source: ..\..\gpsbabel.exe; DestDir: {app}; Flags: comparetimestamp ignoreversio
 Source: ..\..\gpsbabel.html; DestDir: {app}; Tasks: ; Languages: \r
 Source: ..\..\COPYING; DestDir: {app}\r
 Source: ..\..\README.contrib; DestDir: {app}\r
-Source: ..\..\README.igc; DestDir: {app}\r
-Source: ..\..\README.magnav; DestDir: {app}\r
-Source: ..\..\README.mapconverter; DestDir: {app}\r
-Source: ..\..\README.psp; DestDir: {app}\r
 Source: ..\..\AUTHORS; DestDir: {app}; Tasks: ; Languages: \r
 Source: ..\..\CHANGELOG; DestDir: {app}\r
 \r
index 74b6fda3aa2951f1cf5cfc5984d9bab25055c55f..cae0ee6b109843a7b3a9d61a684cc327f4490d29 100644 (file)
@@ -16,6 +16,9 @@ msgstr ""
 msgid "Ad-hoc open icon name"\r
 msgstr ""\r
 \r
+msgid "After output job done sleep n second(s)"\r
+msgstr ""\r
+\r
 msgid "Allow whitespace synth. shortnames"\r
 msgstr ""\r
 \r
@@ -34,6 +37,9 @@ msgstr ""
 msgid "Basename prepended to URL on output"\r
 msgstr ""\r
 \r
+msgid "Bitmap of categories"\r
+msgstr ""\r
+\r
 msgid "Category name (Cache)"\r
 msgstr ""\r
 \r
@@ -49,6 +55,9 @@ msgstr ""
 msgid "Complete date-free tracks with given date (YYYYMMDD)."\r
 msgstr ""\r
 \r
+msgid "Create unique waypoint names (default = yes)"\r
+msgstr ""\r
+\r
 msgid "Create waypoints from geocache log entries"\r
 msgstr ""\r
 \r
@@ -67,6 +76,9 @@ msgstr ""
 msgid "Decimal seconds to pause between groups of strings"\r
 msgstr ""\r
 \r
+msgid "Default category on output"\r
+msgstr ""\r
+\r
 msgid "Default category on output (1..16)"\r
 msgstr ""\r
 \r
@@ -76,12 +88,24 @@ msgstr ""
 msgid "Default location"\r
 msgstr ""\r
 \r
+msgid "Default proximity"\r
+msgstr ""\r
+\r
+msgid "Default speed"\r
+msgstr ""\r
+\r
 msgid "Default speed for waypoints (knots/hr)"\r
 msgstr ""\r
 \r
 msgid "Degrees output as 'ddd', 'dmm'(default) or 'dms'"\r
 msgstr ""\r
 \r
+msgid "Delete all routes"\r
+msgstr ""\r
+\r
+msgid "Delete all track points"\r
+msgstr ""\r
+\r
 msgid "Delete all waypoints"\r
 msgstr ""\r
 \r
@@ -94,12 +118,21 @@ msgstr ""
 msgid "Do not add geocache data to description"\r
 msgstr ""\r
 \r
+msgid "Do not add URLs to description"\r
+msgstr ""\r
+\r
+msgid "Don't show gpi bitmap on device"\r
+msgstr ""\r
+\r
 msgid "Draw extrusion line from trackpoint to ground"\r
 msgstr ""\r
 \r
 msgid "Drop route points that do not have an equivalent waypoint (hidden points)"\r
 msgstr ""\r
 \r
+msgid "Enable alerts on speed or proximity distance"\r
+msgstr ""\r
+\r
 msgid "Encrypt hints using ROT13"\r
 msgstr ""\r
 \r
@@ -118,6 +151,9 @@ msgstr ""
 msgid "Full path to XCSV style file"\r
 msgstr ""\r
 \r
+msgid "Generate # points"\r
+msgstr ""\r
+\r
 msgid "Generate file with lat/lon for centering map"\r
 msgstr ""\r
 \r
@@ -130,7 +166,7 @@ msgstr ""
 msgid "Height in pixels of map"\r
 msgstr ""\r
 \r
-msgid "Ignore event marker icons"\r
+msgid "Ignore event marker icons on read"\r
 msgstr ""\r
 \r
 msgid "Include extended data for trackpoints (default = 1)"\r
@@ -169,6 +205,9 @@ msgstr ""
 msgid "Index of URL field in .dbf"\r
 msgstr ""\r
 \r
+msgid "Indicate direction of travel in track icons (default = 0)"\r
+msgstr ""\r
+\r
 msgid "Infrastructure closed icon name"\r
 msgstr ""\r
 \r
@@ -220,6 +259,9 @@ msgstr ""
 msgid "Merge output with existing file"\r
 msgstr ""\r
 \r
+msgid "MTK compatible CSV output file"\r
+msgstr ""\r
+\r
 msgid "Name of the 'unassigned' category"\r
 msgstr ""\r
 \r
@@ -253,6 +295,9 @@ msgstr ""
 msgid "Precision of coordinates"\r
 msgstr ""\r
 \r
+msgid "Proximity distance"\r
+msgstr ""\r
+\r
 msgid "Radius for circles"\r
 msgstr ""\r
 \r
@@ -292,6 +337,9 @@ msgstr ""
 msgid "Road type changes"\r
 msgstr ""\r
 \r
+msgid "Set waypoint name to source filename."\r
+msgstr ""\r
+\r
 msgid "Shortname is MAC address"\r
 msgstr ""\r
 \r
@@ -304,6 +352,9 @@ msgstr ""
 msgid "Split into multiple routes at turns"\r
 msgstr ""\r
 \r
+msgid "Starting seed of the internal number generator"\r
+msgstr ""\r
+\r
 msgid "Stealth encrypted icon name"\r
 msgstr ""\r
 \r
@@ -331,6 +382,9 @@ msgstr ""
 msgid "Symbol to use for point data"\r
 msgstr ""\r
 \r
+msgid "Sync GPS time to computer time"\r
+msgstr ""\r
+\r
 msgid "Synthesize track times"\r
 msgstr ""\r
 \r
@@ -343,12 +397,18 @@ msgstr ""
 msgid "The icon description is already the marker"\r
 msgstr ""\r
 \r
+msgid "Treat waypoints as icons on write"\r
+msgstr ""\r
+\r
 msgid "Type of .an1 file"\r
 msgstr ""\r
 \r
 msgid "Units for altitude (f)eet or (m)etres"\r
 msgstr ""\r
 \r
+msgid "Units used for names with @speed ('s'tatute or 'm'etric)"\r
+msgstr ""\r
+\r
 msgid "Units used when writing comments ('s'tatute or 'm'etric)"\r
 msgstr ""\r
 \r
@@ -364,6 +424,9 @@ msgstr ""
 msgid "Use shortname instead of description"\r
 msgstr ""\r
 \r
+msgid "Use specified bitmap on output"\r
+msgstr ""\r
+\r
 msgid "Version of gdb file to generate (1..3)"\r
 msgstr ""\r
 \r
@@ -385,6 +448,27 @@ msgstr ""
 msgid "Width of lines, in pixels"\r
 msgstr ""\r
 \r
+msgid "Write additional node tag key/value pairs"\r
+msgstr ""\r
+\r
+msgid "Write additional way tag key/value pairs"\r
+msgstr ""\r
+\r
+msgid "Write all tracks into one file"\r
+msgstr ""\r
+\r
+msgid "Write description to address field"\r
+msgstr ""\r
+\r
+msgid "Write each waypoint in a separate file"\r
+msgstr ""\r
+\r
+msgid "Write notes to address field"\r
+msgstr ""\r
+\r
+msgid "Write position to address field"\r
+msgstr ""\r
+\r
 msgid "Write position using this grid."\r
 msgstr ""\r
 \r
@@ -394,6 +478,9 @@ msgstr ""
 msgid "Write tracks compatible with Carto Exploreur"\r
 msgstr ""\r
 \r
+msgid "Write tracks for Gisteq Phototracker"\r
+msgstr ""\r
+\r
 msgid "Zoom level to reduce points"\r
 msgstr ""\r
 \r
index 040ea4da6c5e8b584ef7d7afa74cff816375f376..ce9ae415f523bdc85cd4d89625ae5e5fe2a1ae5c 100644 (file)
-msgid ""\r
-msgstr ""\r
-"Project-Id-Version: GPSBabel command line program\n"\r
-"POT-Creation-Date: 2005-11-19 01:14\n"\r
-"PO-Revision-Date: 2007-05-01 20:18+0100\n"\r
-"Last-Translator: Olaf Klein <o.b.klein@t-online.de>\n"\r
-"MIME-Version: 1.0\n"\r
-"Content-Type: text/plain; charset=utf-8\n"\r
-"Content-Transfer-Encoding: 8bit\n"\r
-"X-Generator: dxgettext 1.2.1\n"\r
-"Language-Team:  <o.b.klein@gpsbabel.org>\n"\r
-"X-Poedit-SourceCharset: iso-8859-1\n"\r
-"X-Poedit-Language: German\n"\r
-\r
-msgid "(integer sec or 'auto') Barograph to GPS time diff"\r
-msgstr "Zeitdifferent zwischen Barograph und GPS (ganzz. Sekunden oder 'auto')"\r
-\r
-msgid "(USR input) Break segments into separate tracks"\r
-msgstr "USR Eingabe: Segmente in seperate Tracks aufteilen"\r
-\r
-msgid "(USR output) Merge into one segmented track"\r
-msgstr "USR-Ausgabe: zu einem segmentierten Track zusammenfassen"\r
-\r
-msgid "Ad-hoc closed icon name"\r
-msgstr "Icon allgemein für \"geschlossen\""\r
-\r
-msgid "Ad-hoc open icon name"\r
-msgstr "Icon allgemein für \"offen\""\r
-\r
-msgid "Allow whitespace synth. shortnames"\r
-msgstr "Erlaube Leerzeichen in Kurznamen"\r
-\r
-msgid "Altitudes are absolute and not clamped to ground"\r
-msgstr "Absolute Höhenangaben (nicht bodenverbunden)"\r
-\r
-msgid "Append icon_descr to description"\r
-msgstr "Erweitere Beschreibung um Symbolbeschreibung"\r
-\r
-msgid "Append realtime positioning data to the output file instead of truncating"\r
-msgstr ""\r
-\r
-msgid "Base URL for link tag in output"\r
-msgstr "Basis-URL für Verknüpfungseintrag "\r
-\r
-msgid "Basename prepended to URL on output"\r
-msgstr "Basis-Adresse für erzeugte URL's"\r
-\r
-msgid "Category name (Cache)"\r
-msgstr "Kategoriename (Cache)"\r
-\r
-msgid "Category number to use for written waypoints"\r
-msgstr "Benutze Kategorie # beim Schreiben von Wegpunkten  (1..16)"\r
-\r
-msgid "Color for lines or mapnotes"\r
-msgstr "Farbe für Linien oder Kartenangaben"\r
-\r
-msgid "Command unit to power itself down"\r
-msgstr "Gerät im Anschluß abschalten"\r
-\r
-msgid "Complete date-free tracks with given date (YYYYMMDD)."\r
-msgstr "Komplettiere Tracks ohne Datumsangaben mit Datum ... (YYYYMMDD)"\r
-\r
-msgid "Create waypoints from geocache log entries"\r
-msgstr "Erzeuge Wegpunkte aus Geocache Log-Einträgen"\r
-\r
-msgid "Database name"\r
-msgstr "Interner Name für die Palm/OS Datenbank"\r
-\r
-msgid "Database name (filename)"\r
-msgstr "Datenbankname (Dateiname)"\r
-\r
-msgid "Datum (default=NAD27)"\r
-msgstr "GPS-Datum (Vorgabe: NAD27)"\r
-\r
-msgid "Days after which points are considered old"\r
-msgstr "Anzahl an Tagen, nach denen Punkte als alt betrachtet werden"\r
-\r
-msgid "Decimal seconds to pause between groups of strings"\r
-msgstr "Pause (in Sekunden) zwischen Zeilengruppen"\r
-\r
-msgid "Default category on output (1..16)"\r
-msgstr "Standard Kategorie (1..16)"\r
-\r
-msgid "Default icon name"\r
-msgstr "Standard Symbol"\r
-\r
-msgid "Default location"\r
-msgstr ""\r
-\r
-msgid "Default speed for waypoints (knots/hr)"\r
-msgstr "Vorgabegeschwindigkeit (Knoten/h)"\r
-\r
-msgid "Degrees output as 'ddd', 'dmm'(default) or 'dms'"\r
-msgstr "Schreibe Gradangaben in 'ddd', 'dmm' (Vorgabe) oder 'dms' (Gitter)"\r
-\r
-msgid "Delete all waypoints"\r
-msgstr "Lösche alle Wegpunkte"\r
-\r
-msgid "Display labels on track and routepoints  (default = 1)"\r
-msgstr "Zeige Beschriftung bei Track- und Routenpunkten (Vorgabe: 1)"\r
-\r
-msgid "Distance unit [m=metric, s=statute]"\r
-msgstr "Entfernungsangaben [m=Metrisch, s=Statute]"\r
-\r
-msgid "Do not add geocache data to description"\r
-msgstr "Keine Geocache-Daten zur Beschreibung hinzufügen"\r
-\r
-msgid "Draw extrusion line from trackpoint to ground"\r
-msgstr "Zeichne eine Verbindungslinie vom Trackpunkt zum Erdboden"\r
-\r
-msgid "Drop route points that do not have an equivalent waypoint (hidden points)"\r
-msgstr "Lösche versteckte Wegpunkte (automatisch berechnete Routenpunkte)"\r
-\r
-msgid "Encrypt hints using ROT13"\r
-msgstr "Verschlüsselung mit ROT13"\r
-\r
-msgid "Encrypt hints with ROT13"\r
-msgstr "Verschlüsselung mit ROT13"\r
-\r
-msgid "Erase device data after download"\r
-msgstr "Nach Download Daten auf dem Gerät löschen"\r
-\r
-msgid "Export linestrings for tracks and routes"\r
-msgstr "Exportiere Linendaten (linestrings) für Tracks und Routen (Vorgabe: JA)"\r
-\r
-msgid "Export placemarks for tracks and routes"\r
-msgstr "Exportiere Markierungen für Tracks und Routen"\r
-\r
-msgid "Full path to XCSV style file"\r
-msgstr "Pfad zur 'XCSV-Style'-Datei"\r
-\r
-msgid "Generate file with lat/lon for centering map"\r
-msgstr "Erzeuge Datei mit Breiten- und Längengradwerten (für Kartenzentrierung)"\r
-\r
-msgid "Give points (waypoints/route points) a default radius (proximity)"\r
-msgstr "Gebe Wegpunkten/Routenpunkten diesen Radius "\r
-\r
-msgid "GPS datum (def. WGS 84)"\r
-msgstr "GPS-Datum (Vorgabe: WGS 84)"\r
-\r
-msgid "Height in pixels of map"\r
-msgstr "Kartenhöhe in Pixel"\r
-\r
-msgid "Ignore event marker icons"\r
-msgstr "Ignoriere Symbole vor Ereignismarkierungen"\r
-\r
-msgid "Include extended data for trackpoints (default = 1)"\r
-msgstr "Erweiterte Daten in Trackpoints mit einbeziehen (Vorgabe = 1)"\r
-\r
-msgid "Include groundspeak logs if present"\r
-msgstr "Groundspeak Log's beifügen (wenn vorhandan)"\r
-\r
-msgid "Include major turn points (with description) from calculated route"\r
-msgstr ""\r
-\r
-msgid "Include only via stations in route"\r
-msgstr "Übernehme nur Stationspunkte ('viastations') der Route"\r
-\r
-msgid "Include short name in bookmarks"\r
-msgstr "Übernehme Kurznamen in Lesezeichen"\r
-\r
-msgid "Index of name field in .dbf"\r
-msgstr "Index des Namensfeldes innerhalb der .dbf"\r
-\r
-msgid "Index of route (if more the one in source)"\r
-msgstr "Index des Route (falls mehrere im Eingabeformat)"\r
-\r
-msgid "Index of route to write (if more the one in source)"\r
-msgstr "Routen-Index (wenn mehrere vorhanden)"\r
-\r
-msgid "Index of route/track to write (if more the one in source)"\r
-msgstr "Route oder Track-Index (wenn mehrere vorhanden)"\r
-\r
-msgid "Index of track (if more the one in source)"\r
-msgstr "Index des Tracks (falls mehrere im Eingabeformat)"\r
-\r
-msgid "Index of track to write (if more the one in source)"\r
-msgstr "Track-Index (wenn mehrere vorhanden)"\r
-\r
-msgid "Index of URL field in .dbf"\r
-msgstr "Index der URL innerhalb der .dbf"\r
-\r
-msgid "Infrastructure closed icon name"\r
-msgstr "Icon \"Komplex (Infrastruktur) geschlossen\""\r
-\r
-msgid "Infrastructure open icon name"\r
-msgstr "Icon \"Komplex (Infrastruktur) offen\""\r
-\r
-msgid "Keep turns if simplify filter is used"\r
-msgstr "Erhalte Abbiegungen bei Benutzung des Simplify-Filters (Vereinfachen)"\r
-\r
-msgid "Length of generated shortnames"\r
-msgstr "Maximale Länge der generierten Kurznamen"\r
-\r
-msgid "Length of generated shortnames (default 16)"\r
-msgstr "Maximale Länge der zu generierten Kurznamen"\r
-\r
-msgid "Line color, specified in hex AABBGGRR"\r
-msgstr "Linienfarbe (hex. Angabe in Form AABBGGRR)"\r
-\r
-msgid "Make synth. shortnames unique"\r
-msgstr "Eindeutige Kurznamen erzeugen"\r
-\r
-msgid "MapSend version TRK file to generate (3,4)"\r
-msgstr "Generiere TRK-Datei in MapSend-Version # (3,4)"\r
-\r
-msgid "Margin for map.  Degrees or percentage"\r
-msgstr "Begrenzung der Karte (in Grad oder Prozent)"\r
-\r
-msgid "Marker type for new points"\r
-msgstr "Markierungstyp für neue Punkte"\r
-\r
-msgid "Marker type for old points"\r
-msgstr "Markierungstyp für alte Punkte"\r
-\r
-msgid "Marker type for unfound points"\r
-msgstr "Markierungstyp für nicht gefundene Punkte"\r
-\r
-msgid "Max length of waypoint name to write"\r
-msgstr "Max. Länge der zu schreibenden Wegpunktnamen"\r
-\r
-msgid "Max number of comments to write (maxcmts=200)"\r
-msgstr "Maximale Anzahl an Kommentaren für die Ausgabe"\r
-\r
-msgid "Max shortname length when used with -s"\r
-msgstr "Maximale Länge der generierten Kurznamen"\r
-\r
-msgid "Max synthesized shortname length"\r
-msgstr "Maximale Länge der generierten Kurznamen"\r
-\r
-msgid "Merge output with existing file"\r
-msgstr "Ausgabe in existierende Datei einfügen"\r
-\r
-msgid "Name of the 'unassigned' category"\r
-msgstr "Name der 'unassigned'-Kategorie"\r
-\r
-msgid "New name for the route"\r
-msgstr "Name der neuen Route"\r
-\r
-msgid "No separator lines between waypoints"\r
-msgstr "keine Trennlinien zwischen den Wegpunkten"\r
-\r
-msgid "No whitespace in generated shortnames"\r
-msgstr "Leerzeichen in Kurznamen unterdrücken"\r
-\r
-msgid "Non-stealth encrypted icon name"\r
-msgstr "Sichtbar verschlüsselter Symbolname"\r
-\r
-msgid "Non-stealth non-encrypted icon name"\r
-msgstr "Sichtbar und unverschlüsselter Symbolname"\r
-\r
-msgid "Numeric value of bitrate (baud=4800)"\r
-msgstr "Baudrate (Vorgabe: 4800)"\r
-\r
-msgid "Omit Placer name"\r
-msgstr "Placername auslassen"\r
-\r
-msgid "Only read turns; skip all other points"\r
-msgstr "Lese nur Abbiegungen und ignoriere alle sonstigen Punkte"\r
-\r
-msgid "Path to HTML style sheet"\r
-msgstr "Pfad zum HTML-Style-Sheet"\r
-\r
-msgid "Precision of coordinates"\r
-msgstr "Präzision der Koordinaten (Anzahl Nachkommastellen)"\r
-\r
-msgid "Radius for circles"\r
-msgstr "Kreisradius"\r
-\r
-msgid "Radius of our big earth (default 6371000 meters)"\r
-msgstr "Erdradius in Meter (Vorgabe: 6371000 Meter)"\r
-\r
-msgid "Read control points as waypoint/route/none"\r
-msgstr "Lese Kontrollpunkte als Wegpunkt/Route/nichts"\r
-\r
-msgid "Read/Write date format (i.e. DDMMYYYY)"\r
-msgstr "Datumsformat für Ein-/Ausgabe (z.B. DDMMYYYY)"\r
-\r
-msgid "Read/Write date format (i.e. yyyy/mm/dd)"\r
-msgstr "Datumsformat (z.B. DD.MM.YYYY)"\r
-\r
-msgid "Read/write GPGGA sentences"\r
-msgstr "Schreibe/Lese GPGGA Sequenzen"\r
-\r
-msgid "Read/write GPGSA sentences"\r
-msgstr "Schreibe/Lese GPGSA Sequenzen"\r
-\r
-msgid "Read/write GPRMC sentences"\r
-msgstr "Schreibe/Lese GPRMC Sequenzen"\r
-\r
-msgid "Read/write GPVTG sentences"\r
-msgstr "Schreibe/Lese GPVTG Sequenzen"\r
-\r
-msgid "Read/Write time format (i.e. HH:mm:ss xx)"\r
-msgstr "Zeitformat (z.B. HH:mm:ss xx)"\r
-\r
-msgid "Retain at most this number of position points  (0 = unlimited)"\r
-msgstr "Behalte höchstens diese Anzahl an Positionspunkten (0 = kein Limit)"\r
-\r
-msgid "Return current position as a waypoint"\r
-msgstr "Übertrage aktuelle Position als Wegpunkt"\r
-\r
-msgid "Road type changes"\r
-msgstr "Straßentyp-Wechsel"\r
-\r
-msgid "Shortname is MAC address"\r
-msgstr "Kurzname ergibt sich aus MAC-Adresse"\r
-\r
-msgid "Speed in bits per second of serial port (baud=4800)"\r
-msgstr "Übertragungsrate des seriellen Ports in Bits/Sekunde (Vorgabe: baud=4800)"\r
-\r
-msgid "Split input into separate files"\r
-msgstr "Teile gelesene Daten in seperate Dateien"\r
-\r
-msgid "Split into multiple routes at turns"\r
-msgstr "Route an Abbiegungen teilen"\r
-\r
-msgid "Stealth encrypted icon name"\r
-msgstr "Unsichtbar verschlüsselter Symbolname"\r
-\r
-msgid "Stealth non-encrypted icon name"\r
-msgstr "Unsichtbarer unverschlüsselter Symbolname"\r
-\r
-msgid "String to separate concatenated address fields (default=\", \")"\r
-msgstr "Trennzeichen für zusammengefügte Adressfelder (Vorgabe: \", \")"\r
-\r
-msgid "Suppress labels on generated pins"\r
-msgstr "Unterdücke Kennzeichnung für erzeugte Pins"\r
-\r
-msgid "Suppress retired geocaches"\r
-msgstr "Unterdrücke zurückgezogene (?) Geocaches"\r
-\r
-msgid "Suppress separator lines between waypoints"\r
-msgstr "Keine Trennlinien zwischen den Wegpunkten"\r
-\r
-msgid "Suppress use of handshaking in name of speed"\r
-msgstr "Kein 'Handshaking' (im Namen der Geschwindigkeit)"\r
-\r
-msgid "Suppress whitespace in generated shortnames"\r
-msgstr "Keine Leerzeichen in Kurznamen"\r
-\r
-msgid "Symbol to use for point data"\r
-msgstr "Symbol für Punkte"\r
-\r
-msgid "Synthesize track times"\r
-msgstr "Erzeuge Tracknamen"\r
-\r
-msgid "Target GPX version for output"\r
-msgstr "Schreibe in GPX-Version (1.0 oder 1.1)"\r
-\r
-msgid "Temperature unit [c=Celsius, f=Fahrenheit]"\r
-msgstr "Temperatureinheit [c=Celsius, F=Fahrenheit]"\r
-\r
-msgid "The icon description is already the marker"\r
-msgstr "Die Symbolbeschreibung ist bereits die Markierung"\r
-\r
-msgid "Type of .an1 file"\r
-msgstr ".an1 Dateityp"\r
-\r
-msgid "Units for altitude (f)eet or (m)etres"\r
-msgstr "Höhenangaben in Fuß oder Meter ('f' oder 'm')"\r
-\r
-msgid "Units used when writing comments ('s'tatute or 'm'etric)"\r
-msgstr "Einheit innerhalb von Kommentaren ( 's'tatute oder 'm'etrisch)"\r
-\r
-msgid "UPPERCASE synth. shortnames"\r
-msgstr "Erzeuge Kurznamen in Großbuchstaben"\r
-\r
-msgid "Use depth values on output (default is ignore)"\r
-msgstr "Tiefenangaben mit ausgeben (normalerweise ausgeschaltet)"\r
-\r
-msgid "Use proximity values on output (default is ignore)"\r
-msgstr "Benutze Proximity-Werte bei der Ausgabe (Vorgabe: NEIN)"\r
-\r
-msgid "Use shortname instead of description"\r
-msgstr "Benutze den Kurznamen anstelle der Beschreibung"\r
-\r
-msgid "Version of gdb file to generate (1..3)"\r
-msgstr "Schreibe GDB-Version 1, 2 oder 3"\r
-\r
-msgid "Version of mapsource file to generate (3,4,5)"\r
-msgstr "Schreibe MapSource Datei in Version ... (3,4 oder 5)"\r
-\r
-msgid "Waypoint background color"\r
-msgstr "Wegpunkt Hintergrundfarbe"\r
-\r
-msgid "Waypoint foreground color"\r
-msgstr "Wegpunkt Vordergrundfarbe"\r
-\r
-msgid "Waypoint type"\r
-msgstr "Wegpunkt Typ"\r
-\r
-msgid "Width in pixels of map"\r
-msgstr "Kartenbreite in Pixel"\r
-\r
-msgid "Width of lines, in pixels"\r
-msgstr "Linienhöhe in Pixel"\r
-\r
-msgid "Write position using this grid."\r
-msgstr ""\r
-\r
-msgid "Write timestamps with offset x to UTC time"\r
-msgstr "Schreibe Zeitstempel relativ zur UTC + x"\r
-\r
-msgid "Write tracks compatible with Carto Exploreur"\r
-msgstr "Erzeuge Tracks ohne Titel (kompatibel zu \"Carto Exploreur\")"\r
-\r
-msgid "Zoom level to reduce points"\r
-msgstr "Vergrößerungsfakter um Punkte zu unterdrücken"\r
-\r
+msgid ""
+msgstr ""
+"Project-Id-Version: GPSBabel command line program\n"
+"POT-Creation-Date: 2005-11-19 01:14\n"
+"PO-Revision-Date: 2008-04-26 21:18+0100\n"
+"Last-Translator: oliskoli <o.b.klein@gpsbabel.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: dxgettext 1.2.1\n"
+"Language-Team:  <o.b.klein@gpsbabel.org>\n"
+"X-Poedit-SourceCharset: iso-8859-1\n"
+"X-Poedit-Language: German\n"
+"X-Poedit-Country: GERMANY\n"
+
+msgid "(integer sec or 'auto') Barograph to GPS time diff"
+msgstr "Zeitdifferent zwischen Barograph und GPS (ganzz. Sekunden oder 'auto')"
+
+msgid "(USR input) Break segments into separate tracks"
+msgstr "USR Eingabe: Segmente in seperate Tracks aufteilen"
+
+msgid "(USR output) Merge into one segmented track"
+msgstr "USR-Ausgabe: zu einem segmentierten Track zusammenfassen"
+
+msgid "Ad-hoc closed icon name"
+msgstr "Icon allgemein für \"geschlossen\""
+
+msgid "Ad-hoc open icon name"
+msgstr "Icon allgemein für \"offen\""
+
+msgid "After output job done sleep n second(s)"
+msgstr "Pausiere im Anschluß n sekunde(n)"
+
+msgid "Allow whitespace synth. shortnames"
+msgstr "Erlaube Leerzeichen in Kurznamen"
+
+msgid "Altitudes are absolute and not clamped to ground"
+msgstr "Absolute Höhenangaben (nicht bodenverbunden)"
+
+msgid "Append icon_descr to description"
+msgstr "Erweitere Beschreibung um Symbolbeschreibung"
+
+msgid "Append realtime positioning data to the output file instead of truncating"
+msgstr ""
+
+msgid "Base URL for link tag in output"
+msgstr "Basis-URL für Verknüpfungseintrag "
+
+msgid "Basename prepended to URL on output"
+msgstr "Basis-Adresse für erzeugte URL's"
+
+msgid "Bitmap of categories"
+msgstr "Mehrfachkategorie, als Dezimal- oder Hexadezimalwert"
+
+msgid "Category name (Cache)"
+msgstr "Kategoriename (Cache)"
+
+msgid "Category number to use for written waypoints"
+msgstr "Benutze Kategorie # beim Schreiben von Wegpunkten  (1..16)"
+
+msgid "Color for lines or mapnotes"
+msgstr "Farbe für Linien oder Kartenangaben"
+
+msgid "Command unit to power itself down"
+msgstr "Gerät im Anschluß abschalten"
+
+msgid "Complete date-free tracks with given date (YYYYMMDD)."
+msgstr "Komplettiere Tracks ohne Datumsangaben mit Datum ... (YYYYMMDD)"
+
+msgid "Create unique waypoint names (default = yes)"
+msgstr "Erzeuge eindeutige Wegpunktnamen (Vorgabe: JA)"
+
+msgid "Create waypoints from geocache log entries"
+msgstr "Erzeuge Wegpunkte aus Geocache Log-Einträgen"
+
+msgid "Database name"
+msgstr "Interner Name für die Palm/OS Datenbank"
+
+msgid "Database name (filename)"
+msgstr "Datenbankname (Dateiname)"
+
+msgid "Datum (default=NAD27)"
+msgstr "GPS-Datum (Vorgabe: NAD27)"
+
+msgid "Days after which points are considered old"
+msgstr "Anzahl an Tagen, nach denen Punkte als alt betrachtet werden"
+
+msgid "Decimal seconds to pause between groups of strings"
+msgstr "Pause (in Sekunden) zwischen Zeilengruppen"
+
+msgid "Default category on output"
+msgstr "Standardkategorie beim Schreiben"
+
+msgid "Default category on output (1..16)"
+msgstr "Standard Kategorie (1..16)"
+
+msgid "Default icon name"
+msgstr "Standard Symbol"
+
+msgid "Default location"
+msgstr "Vorgabestandort"
+
+msgid "Default proximity"
+msgstr "Vorgabe-Annäherungsabstand"
+
+msgid "Default speed"
+msgstr "Standardgeschwindigkeit"
+
+msgid "Default speed for waypoints (knots/hr)"
+msgstr "Vorgabegeschwindigkeit (Knoten/h)"
+
+msgid "Degrees output as 'ddd', 'dmm'(default) or 'dms'"
+msgstr "Schreibe Gradangaben in 'ddd', 'dmm' (Vorgabe) oder 'dms' (Gitter)"
+
+msgid "Delete all routes"
+msgstr "Lösche alle Routen"
+
+msgid "Delete all track points"
+msgstr "Lösche alle Trackpunkte"
+
+msgid "Delete all waypoints"
+msgstr "Lösche alle Wegpunkte"
+
+msgid "Display labels on track and routepoints  (default = 1)"
+msgstr "Zeige Beschriftung bei Track- und Routenpunkten (Vorgabe: 1)"
+
+msgid "Distance unit [m=metric, s=statute]"
+msgstr "Entfernungsangaben [m=Metrisch, s=Statute]"
+
+msgid "Do not add geocache data to description"
+msgstr "Keine Geocache-Daten zur Beschreibung hinzufügen"
+
+msgid "Do not add URLs to description"
+msgstr "Hänge keine URL's an die Beschreibung an"
+
+msgid "Don't show gpi bitmap on device"
+msgstr "Zeige keine Bitmap (Icon) auf dem GPS"
+
+msgid "Draw extrusion line from trackpoint to ground"
+msgstr "Zeichne eine Verbindungslinie vom Trackpunkt zum Erdboden"
+
+msgid "Drop route points that do not have an equivalent waypoint (hidden points)"
+msgstr "Lösche versteckte Wegpunkte (automatisch berechnete Routenpunkte)"
+
+msgid "Enable alerts on speed or proximity distance"
+msgstr "Aktiviere Alarm für Annäherung and Geschwindigkeit"
+
+msgid "Encrypt hints using ROT13"
+msgstr "Verschlüsselung mit ROT13"
+
+msgid "Encrypt hints with ROT13"
+msgstr "Verschlüsselung mit ROT13"
+
+msgid "Erase device data after download"
+msgstr "Nach Download Daten auf dem Gerät löschen"
+
+msgid "Export linestrings for tracks and routes"
+msgstr "Exportiere Linendaten (linestrings) für Tracks und Routen (Vorgabe: JA)"
+
+msgid "Export placemarks for tracks and routes"
+msgstr "Exportiere Markierungen für Tracks und Routen"
+
+msgid "Full path to XCSV style file"
+msgstr "Pfad zur 'XCSV-Style'-Datei"
+
+msgid "Generate # points"
+msgstr "Erzeuge # Punkte"
+
+msgid "Generate file with lat/lon for centering map"
+msgstr "Erzeuge Datei mit Breiten- und Längengradwerten (für Kartenzentrierung)"
+
+msgid "Give points (waypoints/route points) a default radius (proximity)"
+msgstr "Gebe Wegpunkten/Routenpunkten diesen Radius "
+
+msgid "GPS datum (def. WGS 84)"
+msgstr "GPS-Datum (Vorgabe: WGS 84)"
+
+msgid "Height in pixels of map"
+msgstr "Kartenhöhe in Pixel"
+
+msgid "Ignore event marker icons on read"
+msgstr "Ignoriere Ereignis-Icons beim Lesen"
+
+msgid "Include extended data for trackpoints (default = 1)"
+msgstr "Erweiterte Daten in Trackpoints mit einbeziehen (Vorgabe = 1)"
+
+msgid "Include groundspeak logs if present"
+msgstr "Groundspeak Log's beifügen (wenn vorhandan)"
+
+msgid "Include major turn points (with description) from calculated route"
+msgstr "Beziehe Hauptrichtungsänderungen (Ansage vorhanden) mit ein"
+
+msgid "Include only via stations in route"
+msgstr "Übernehme nur Stationspunkte ('viastations') der Route"
+
+msgid "Include short name in bookmarks"
+msgstr "Übernehme Kurznamen in Lesezeichen"
+
+msgid "Index of name field in .dbf"
+msgstr "Index des Namensfeldes innerhalb der .dbf"
+
+msgid "Index of route (if more the one in source)"
+msgstr "Index des Route (falls mehrere im Eingabeformat)"
+
+msgid "Index of route to write (if more the one in source)"
+msgstr "Routen-Index (wenn mehrere vorhanden)"
+
+msgid "Index of route/track to write (if more the one in source)"
+msgstr "Route oder Track-Index (wenn mehrere vorhanden)"
+
+msgid "Index of track (if more the one in source)"
+msgstr "Index des Tracks (falls mehrere im Eingabeformat)"
+
+msgid "Index of track to write (if more the one in source)"
+msgstr "Track-Index (wenn mehrere vorhanden)"
+
+msgid "Index of URL field in .dbf"
+msgstr "Index der URL innerhalb der .dbf"
+
+msgid "Indicate direction of travel in track icons (default = 0)"
+msgstr "Erzeuge spezielle Icons (Richtungspfeile)"
+
+msgid "Infrastructure closed icon name"
+msgstr "Icon \"Komplex (Infrastruktur) geschlossen\""
+
+msgid "Infrastructure open icon name"
+msgstr "Icon \"Komplex (Infrastruktur) offen\""
+
+msgid "Keep turns if simplify filter is used"
+msgstr "Erhalte Abbiegungen bei Benutzung des Simplify-Filters (Vereinfachen)"
+
+msgid "Length of generated shortnames"
+msgstr "Maximale Länge der generierten Kurznamen"
+
+msgid "Length of generated shortnames (default 16)"
+msgstr "Maximale Länge der zu generierten Kurznamen"
+
+msgid "Line color, specified in hex AABBGGRR"
+msgstr "Linienfarbe (hex. Angabe in Form AABBGGRR)"
+
+msgid "Make synth. shortnames unique"
+msgstr "Eindeutige Kurznamen erzeugen"
+
+msgid "MapSend version TRK file to generate (3,4)"
+msgstr "Generiere TRK-Datei in MapSend-Version # (3,4)"
+
+msgid "Margin for map.  Degrees or percentage"
+msgstr "Begrenzung der Karte (in Grad oder Prozent)"
+
+msgid "Marker type for new points"
+msgstr "Markierungstyp für neue Punkte"
+
+msgid "Marker type for old points"
+msgstr "Markierungstyp für alte Punkte"
+
+msgid "Marker type for unfound points"
+msgstr "Markierungstyp für nicht gefundene Punkte"
+
+msgid "Max length of waypoint name to write"
+msgstr "Max. Länge der zu schreibenden Wegpunktnamen"
+
+msgid "Max number of comments to write (maxcmts=200)"
+msgstr "Maximale Anzahl an Kommentaren für die Ausgabe"
+
+msgid "Max shortname length when used with -s"
+msgstr "Maximale Länge der generierten Kurznamen"
+
+msgid "Max synthesized shortname length"
+msgstr "Maximale Länge der generierten Kurznamen"
+
+msgid "Merge output with existing file"
+msgstr "Ausgabe in existierende Datei einfügen"
+
+msgid "MTK compatible CSV output file"
+msgstr "Ausgabe-CSV-Datei kompatibel zum MTK-Datalogger"
+
+msgid "Name of the 'unassigned' category"
+msgstr "Name der 'unassigned'-Kategorie"
+
+msgid "New name for the route"
+msgstr "Name der neuen Route"
+
+msgid "No separator lines between waypoints"
+msgstr "keine Trennlinien zwischen den Wegpunkten"
+
+msgid "No whitespace in generated shortnames"
+msgstr "Leerzeichen in Kurznamen unterdrücken"
+
+msgid "Non-stealth encrypted icon name"
+msgstr "Sichtbar verschlüsselter Symbolname"
+
+msgid "Non-stealth non-encrypted icon name"
+msgstr "Sichtbar und unverschlüsselter Symbolname"
+
+msgid "Numeric value of bitrate (baud=4800)"
+msgstr "Baudrate (Vorgabe: 4800)"
+
+msgid "Omit Placer name"
+msgstr "Placername auslassen"
+
+msgid "Only read turns; skip all other points"
+msgstr "Lese nur Abbiegungen und ignoriere alle sonstigen Punkte"
+
+msgid "Path to HTML style sheet"
+msgstr "Pfad zum HTML-Style-Sheet"
+
+msgid "Precision of coordinates"
+msgstr "Präzision der Koordinaten (Anzahl Nachkommastellen)"
+
+msgid "Proximity distance"
+msgstr "Standardmäßiger Annäherungsabstand"
+
+msgid "Radius for circles"
+msgstr "Kreisradius"
+
+msgid "Radius of our big earth (default 6371000 meters)"
+msgstr "Erdradius in Meter (Vorgabe: 6371000 Meter)"
+
+msgid "Read control points as waypoint/route/none"
+msgstr "Lese Kontrollpunkte als Wegpunkt/Route/nichts"
+
+msgid "Read/Write date format (i.e. DDMMYYYY)"
+msgstr "Datumsformat für Ein-/Ausgabe (z.B. DDMMYYYY)"
+
+msgid "Read/Write date format (i.e. yyyy/mm/dd)"
+msgstr "Datumsformat (z.B. DD.MM.YYYY)"
+
+msgid "Read/write GPGGA sentences"
+msgstr "Schreibe/Lese GPGGA Sequenzen"
+
+msgid "Read/write GPGSA sentences"
+msgstr "Schreibe/Lese GPGSA Sequenzen"
+
+msgid "Read/write GPRMC sentences"
+msgstr "Schreibe/Lese GPRMC Sequenzen"
+
+msgid "Read/write GPVTG sentences"
+msgstr "Schreibe/Lese GPVTG Sequenzen"
+
+msgid "Read/Write time format (i.e. HH:mm:ss xx)"
+msgstr "Zeitformat (z.B. HH:mm:ss xx)"
+
+msgid "Retain at most this number of position points  (0 = unlimited)"
+msgstr "Behalte höchstens diese Anzahl an Positionspunkten (0 = kein Limit)"
+
+msgid "Return current position as a waypoint"
+msgstr "Übertrage aktuelle Position als Wegpunkt"
+
+msgid "Road type changes"
+msgstr "Straßentyp-Wechsel"
+
+msgid "Set waypoint name to source filename."
+msgstr "Erzeuge den Wegpunktnamen an Hand des Dateinames"
+
+msgid "Shortname is MAC address"
+msgstr "Kurzname ergibt sich aus MAC-Adresse"
+
+msgid "Speed in bits per second of serial port (baud=4800)"
+msgstr "Übertragungsrate des seriellen Ports in Bits/Sekunde (Vorgabe: baud=4800)"
+
+msgid "Split input into separate files"
+msgstr "Teile gelesene Daten in seperate Dateien"
+
+msgid "Split into multiple routes at turns"
+msgstr "Route an Abbiegungen teilen"
+
+msgid "Starting seed of the internal number generator"
+msgstr "Startwert für internen Zufallszahlengenerator"
+
+msgid "Stealth encrypted icon name"
+msgstr "Unsichtbar verschlüsselter Symbolname"
+
+msgid "Stealth non-encrypted icon name"
+msgstr "Unsichtbarer unverschlüsselter Symbolname"
+
+msgid "String to separate concatenated address fields (default=\", \")"
+msgstr "Trennzeichen für zusammengefügte Adressfelder (Vorgabe: \", \")"
+
+msgid "Suppress labels on generated pins"
+msgstr "Unterdücke Kennzeichnung für erzeugte Pins"
+
+msgid "Suppress retired geocaches"
+msgstr "Unterdrücke zurückgezogene (?) Geocaches"
+
+msgid "Suppress separator lines between waypoints"
+msgstr "Keine Trennlinien zwischen den Wegpunkten"
+
+msgid "Suppress use of handshaking in name of speed"
+msgstr "Kein 'Handshaking' (im Namen der Geschwindigkeit)"
+
+msgid "Suppress whitespace in generated shortnames"
+msgstr "Keine Leerzeichen in Kurznamen"
+
+msgid "Symbol to use for point data"
+msgstr "Symbol für Punkte"
+
+msgid "Sync GPS time to computer time"
+msgstr "Synchronisiere PC-Uhr mit dem GPS (PC -> GPS)"
+
+msgid "Synthesize track times"
+msgstr "Erzeuge Tracknamen"
+
+msgid "Target GPX version for output"
+msgstr "Schreibe in GPX-Version (1.0 oder 1.1)"
+
+msgid "Temperature unit [c=Celsius, f=Fahrenheit]"
+msgstr "Temperatureinheit [c=Celsius, F=Fahrenheit]"
+
+msgid "The icon description is already the marker"
+msgstr "Die Symbolbeschreibung ist bereits die Markierung"
+
+msgid "Treat waypoints as icons on write"
+msgstr "Behandle Wegpunkte als Icons beim Schreiben"
+
+msgid "Type of .an1 file"
+msgstr ".an1 Dateityp"
+
+msgid "Units for altitude (f)eet or (m)etres"
+msgstr "Höhenangaben in Fuß oder Meter ('f' oder 'm')"
+
+msgid "Units used for names with @speed ('s'tatute or 'm'etric)"
+msgstr "Einheit für Geschwindigkeit in Wegpunkten [...@30]  ( 's'tatute oder 'm'etrisch)"
+
+msgid "Units used when writing comments ('s'tatute or 'm'etric)"
+msgstr "Einheit innerhalb von Kommentaren ( 's'tatute oder 'm'etrisch)"
+
+msgid "UPPERCASE synth. shortnames"
+msgstr "Erzeuge Kurznamen in Großbuchstaben"
+
+msgid "Use depth values on output (default is ignore)"
+msgstr "Tiefenangaben mit ausgeben (normalerweise ausgeschaltet)"
+
+msgid "Use proximity values on output (default is ignore)"
+msgstr "Benutze Proximity-Werte bei der Ausgabe (Vorgabe: NEIN)"
+
+msgid "Use shortname instead of description"
+msgstr "Benutze den Kurznamen anstelle der Beschreibung"
+
+msgid "Use specified bitmap on output"
+msgstr "Benutze spezifische Bitmap (.BMP) für die Ausgabe"
+
+msgid "Version of gdb file to generate (1..3)"
+msgstr "Schreibe GDB-Version 1, 2 oder 3"
+
+msgid "Version of mapsource file to generate (3,4,5)"
+msgstr "Schreibe MapSource Datei in Version ... (3,4 oder 5)"
+
+msgid "Waypoint background color"
+msgstr "Wegpunkt Hintergrundfarbe"
+
+msgid "Waypoint foreground color"
+msgstr "Wegpunkt Vordergrundfarbe"
+
+msgid "Waypoint type"
+msgstr "Wegpunkt Typ"
+
+msgid "Width in pixels of map"
+msgstr "Kartenbreite in Pixel"
+
+msgid "Width of lines, in pixels"
+msgstr "Linienhöhe in Pixel"
+
+msgid "Write additional node tag key/value pairs"
+msgstr "Schreibe zusätzliche Wegpunkt (node) Informationspaare (tags)"
+
+msgid "Write additional way tag key/value pairs"
+msgstr "Schreibe zusätzliche Routen (way) Informationspaare (tags)"
+
+msgid "Write all tracks into one file"
+msgstr "Schreibe alle Tracks in eine Datei"
+
+msgid "Write description to address field"
+msgstr "Platziere die Beschreibung im Adressfeld"
+
+msgid "Write each waypoint in a separate file"
+msgstr "Schreibe jeden Wegpunkt in eine separate Datei"
+
+msgid "Write notes to address field"
+msgstr "Schreibe Kommentar (Notizen) in das Adressfeld"
+
+msgid "Write position to address field"
+msgstr "Platziere die Koordinaten im Adressfeld"
+
+msgid "Write position using this grid."
+msgstr "Erzeuge Koordinaten unter Benutzung dieses Gitters (Grids)."
+
+msgid "Write timestamps with offset x to UTC time"
+msgstr "Schreibe Zeitstempel relativ zur UTC + x"
+
+msgid "Write tracks compatible with Carto Exploreur"
+msgstr "Erzeuge Tracks ohne Titel (kompatibel zu \"Carto Exploreur\")"
+
+msgid "Write tracks for Gisteq Phototracker"
+msgstr "Schreibe Tracks für \"Gisteq Phototracker\""
+
+msgid "Zoom level to reduce points"
+msgstr "Vergrößerungsfakter um Punkte zu unterdrücken"
+
index c1f149334a5e21973529de20a7016c740d4e7c19..dd1c4a02e8ee64fb69b0868279e3a81ef97b623f 100644 (file)
-msgid ""\r
-msgstr ""\r
-"Project-Id-Version: GPSBabel command line program\n"\r
-"POT-Creation-Date: 2006-10-29 16:00\n"\r
-"PO-Revision-Date: 2007-05-01 20:23+0100\n"\r
-"Last-Translator: Olaf Klein <o.b.klein@t-online.de>\n"\r
-"Language-Team: Daniel Díaz <Daniel.Diaz.Quintero@gmail.com>\n"\r
-"MIME-Version: 1.0\n"\r
-"Content-Type: text/plain; charset=UTF-8\n"\r
-"Content-Transfer-Encoding: 8bit\n"\r
-"X-Poedit-Country: SPAIN\n"\r
-\r
-msgid "(integer sec or 'auto') Barograph to GPS time diff"\r
-msgstr "Dif. de tiempos de barógrafo a GPS (núm de segs. o 'auto')"\r
-\r
-msgid "(USR input) Break segments into separate tracks"\r
-msgstr "(Entrada USR) Dividir segmentos en tracks separadas"\r
-\r
-msgid "(USR output) Merge into one segmented track"\r
-msgstr "(Salida USR) Combinar en track segmentada"\r
-\r
-msgid "Ad-hoc closed icon name"\r
-msgstr "Cerrar nombre de icono Ad-hoc"\r
-\r
-msgid "Ad-hoc open icon name"\r
-msgstr "Abrir nombre de icono Ad-hoc"\r
-\r
-msgid "Allow whitespace synth. shortnames"\r
-msgstr "Permitir espacios en los nombres cortos a generar"\r
-\r
-msgid "Altitudes are absolute and not clamped to ground"\r
-msgstr "Altitudes absolutas, no relativas al suelo"\r
-\r
-msgid "Append icon_descr to description"\r
-msgstr "Añadir descripción de icono a la descripción"\r
-\r
-msgid "Append realtime positioning data to the output file instead of truncating"\r
-msgstr ""\r
-\r
-msgid "Base URL for link tag in output"\r
-msgstr "URL base para marca de enlace en salida"\r
-\r
-msgid "Basename prepended to URL on output"\r
-msgstr "Prefijo de la URL del resultado"\r
-\r
-msgid "Category name (Cache)"\r
-msgstr "Nombre de categoría (Cache)"\r
-\r
-msgid "Category number to use for written waypoints"\r
-msgstr "Número de categoría a usar en los puntos de trazado."\r
-\r
-msgid "Color for lines or mapnotes"\r
-msgstr "Color para líneas o notas de mapa"\r
-\r
-msgid "Command unit to power itself down"\r
-msgstr "Enviar comando de apagado a la unidad"\r
-\r
-msgid "Complete date-free tracks with given date (YYYYMMDD)."\r
-msgstr "Listado completo de trazas de la fecha (AAAAMMDD)."\r
-\r
-msgid "Create waypoints from geocache log entries"\r
-msgstr "Crear puntos de trazado a partir de entradas de log de geocache"\r
-\r
-msgid "Database name"\r
-msgstr "Nombre de la base de datos"\r
-\r
-msgid "Database name (filename)"\r
-msgstr "Nombre de la base de datos (nombre de fichero)"\r
-\r
-msgid "Datum (default=NAD27)"\r
-msgstr "Datum (por defecto=NAD27)"\r
-\r
-msgid "Days after which points are considered old"\r
-msgstr "Días después de los cuales los puntos se consideran antiguos"\r
-\r
-msgid "Decimal seconds to pause between groups of strings"\r
-msgstr "Segundos de pausa (en decimal) entre grupos de cadenas."\r
-\r
-msgid "Default category on output (1..16)"\r
-msgstr "Categoría por defecto del resultado (1..16)"\r
-\r
-msgid "Default icon name"\r
-msgstr "Nombre del icono por defecto"\r
-\r
-msgid "Default location"\r
-msgstr ""\r
-\r
-msgid "Default speed for waypoints (knots/hr)"\r
-msgstr "Velocidad por defecto para los puntos de trazado (nudos/hora)"\r
-\r
-msgid "Degrees output as 'ddd', 'dmm'(default) or 'dms'"\r
-msgstr "Salida en grados como 'ggg', 'gmm' (defecto) o 'gms'"\r
-\r
-msgid "Delete all waypoints"\r
-msgstr "Borrar todos los puntos de trazado."\r
-\r
-msgid "Display labels on track and routepoints  (default = 1)"\r
-msgstr "Mostrar etiquetas en rutas y puntos de ruta (defecto=1)"\r
-\r
-msgid "Distance unit [m=metric, s=statute]"\r
-msgstr "Unidades de distancia [m=metrico,s=imperial]"\r
-\r
-msgid "Do not add geocache data to description"\r
-msgstr "No añadir datos de geocache a la descripción"\r
-\r
-msgid "Draw extrusion line from trackpoint to ground"\r
-msgstr "Dibujar línea de extrusión desde el punto de trazado a tierra."\r
-\r
-msgid "Drop route points that do not have an equivalent waypoint (hidden points)"\r
-msgstr "Descartar puntos de la ruta que no tengan punto de ruta equivalente (oculto)"\r
-\r
-msgid "Encrypt hints using ROT13"\r
-msgstr "Encriptar sugerencias mediante ROT13"\r
-\r
-msgid "Encrypt hints with ROT13"\r
-msgstr "Encriptar sugerencias mediante ROT13"\r
-\r
-msgid "Erase device data after download"\r
-msgstr "Borrar datos del dispositivo después de descargar."\r
-\r
-msgid "Export linestrings for tracks and routes"\r
-msgstr "Exportar cadenas de líneas para tracks y rutas"\r
-\r
-msgid "Export placemarks for tracks and routes"\r
-msgstr "Exportar marcas para tracks y rutas"\r
-\r
-msgid "Full path to XCSV style file"\r
-msgstr "Ruta completa de la hoja de estilo XCSV"\r
-\r
-msgid "Generate file with lat/lon for centering map"\r
-msgstr "Generar fichero con lat/lon para centrar mapa"\r
-\r
-msgid "Give points (waypoints/route points) a default radius (proximity)"\r
-msgstr "Dar a los puntos (puntos de ruta/puntos de la ruta) un radio por defecto (proximidad)"\r
-\r
-msgid "GPS datum (def. WGS 84)"\r
-msgstr "Datum GPS (def. WGS 84)"\r
-\r
-msgid "Height in pixels of map"\r
-msgstr "Alto del mapa, en pixels"\r
-\r
-msgid "Ignore event marker icons"\r
-msgstr "Ignorar iconos de marca de eventos"\r
-\r
-msgid "Include extended data for trackpoints (default = 1)"\r
-msgstr "Incluir datos extendidos para los puntos de ruta."\r
-\r
-msgid "Include groundspeak logs if present"\r
-msgstr "Incluir registros de groundspeak, si existen"\r
-\r
-msgid "Include major turn points (with description) from calculated route"\r
-msgstr ""\r
-\r
-msgid "Include only via stations in route"\r
-msgstr "Suprimir puntos de ruta calculados"\r
-\r
-msgid "Include short name in bookmarks"\r
-msgstr "Incluir nombre corto en Favoritos"\r
-\r
-msgid "Index of name field in .dbf"\r
-msgstr "Índice del campo nombre en .dbf"\r
-\r
-msgid "Index of route (if more the one in source)"\r
-msgstr "Índice de ruta (si hay más de una en el origen)"\r
-\r
-msgid "Index of route to write (if more the one in source)"\r
-msgstr "Índice de la ruta a escribir (si existe más de una en origen)"\r
-\r
-msgid "Index of route/track to write (if more the one in source)"\r
-msgstr "Índice de la ruta/track a escribir (si existe más de una)"\r
-\r
-msgid "Index of track (if more the one in source)"\r
-msgstr "Índice de traza (si hay más de una en el origen)"\r
-\r
-msgid "Index of track to write (if more the one in source)"\r
-msgstr "Índice de track a escribir (si hay más de una en el origen)"\r
-\r
-msgid "Index of URL field in .dbf"\r
-msgstr "Índice del campo URL en .dbf"\r
-\r
-msgid "Infrastructure closed icon name"\r
-msgstr "Nombre de icono para cerrar infraestructura."\r
-\r
-msgid "Infrastructure open icon name"\r
-msgstr "Nombre de icono para abrir infraestructura."\r
-\r
-msgid "Keep turns if simplify filter is used"\r
-msgstr "Mantener giros si se usa el filtro de simplificación"\r
-\r
-msgid "Length of generated shortnames"\r
-msgstr "Longitud de nombres cortos a generar"\r
-\r
-msgid "Length of generated shortnames (default 16)"\r
-msgstr "Longitud de nombres cortos a generar"\r
-\r
-msgid "Line color, specified in hex AABBGGRR"\r
-msgstr "Color de línea, especificado en hex AABBGGRR"\r
-\r
-msgid "Make synth. shortnames unique"\r
-msgstr "Crear nombres cortos únicos"\r
-\r
-msgid "MapSend version TRK file to generate (3,4)"\r
-msgstr "Versión de fichero TRK de MapSend a generar (3,4)"\r
-\r
-msgid "Margin for map.  Degrees or percentage"\r
-msgstr "Márgen para el mapa. Grados de porcentaje."\r
-\r
-msgid "Marker type for new points"\r
-msgstr "Tipo de marcador para puntos nuevos"\r
-\r
-msgid "Marker type for old points"\r
-msgstr "Tipo de marcador para puntos antiguos"\r
-\r
-msgid "Marker type for unfound points"\r
-msgstr "Tipo de marcador para puntos no encontrados"\r
-\r
-msgid "Max length of waypoint name to write"\r
-msgstr "Longitud máxima de nombre de los puntos de rutas a escribir"\r
-\r
-msgid "Max number of comments to write (maxcmts=200)"\r
-msgstr "Máximo número de comentarios a escribir (maxcmts=200)"\r
-\r
-msgid "Max shortname length when used with -s"\r
-msgstr "Longitud máxima de nombre corto cuando se use con -s"\r
-\r
-msgid "Max synthesized shortname length"\r
-msgstr "Longitud máxima de nombre corto a generar"\r
-\r
-msgid "Merge output with existing file"\r
-msgstr "Combinar salida con fichero existente"\r
-\r
-msgid "Name of the 'unassigned' category"\r
-msgstr "Nombre de la categoría 'Sin asignar'"\r
-\r
-msgid "New name for the route"\r
-msgstr "Nuevo nombre de la ruta"\r
-\r
-msgid "No separator lines between waypoints"\r
-msgstr "Sin líneas de separación entre puntos de trazado."\r
-\r
-msgid "No whitespace in generated shortnames"\r
-msgstr "Sin espacios en blanco en nombres cortos."\r
-\r
-msgid "Non-stealth encrypted icon name"\r
-msgstr "Nombre de icono encriptado (No oculto)"\r
-\r
-msgid "Non-stealth non-encrypted icon name"\r
-msgstr "Nombre de icono no encriptado (No oculto)"\r
-\r
-msgid "Numeric value of bitrate (baud=4800)"\r
-msgstr "Valor numérico de bitrate (baudios=4800)"\r
-\r
-msgid "Omit Placer name"\r
-msgstr "Omitir nombre del creador"\r
-\r
-msgid "Only read turns; skip all other points"\r
-msgstr "Sólo leer giros; ignorar todos los demás puntos"\r
-\r
-msgid "Path to HTML style sheet"\r
-msgstr "Ruta de la hoja de estilo HTML"\r
-\r
-msgid "Precision of coordinates"\r
-msgstr "Precisión de las coordenadas."\r
-\r
-msgid "Radius for circles"\r
-msgstr "Radio para los círculos"\r
-\r
-msgid "Radius of our big earth (default 6371000 meters)"\r
-msgstr "Radio de nuestra gran Tierra (por defecto 6371000 metros)"\r
-\r
-msgid "Read control points as waypoint/route/none"\r
-msgstr "Leer puntos de control como punto de ruta/ruta/ninguno"\r
-\r
-msgid "Read/Write date format (i.e. DDMMYYYY)"\r
-msgstr "Formato de fecha en Lectura/Escritura (p.e. DDMMAAAA)"\r
-\r
-msgid "Read/Write date format (i.e. yyyy/mm/dd)"\r
-msgstr "Formato de fecha en Lectura/Escritura (p.e. aaaa/mm/dd)"\r
-\r
-msgid "Read/write GPGGA sentences"\r
-msgstr "Comandos de Lectura/Escritura en GPGGA"\r
-\r
-msgid "Read/write GPGSA sentences"\r
-msgstr "Comandos de Lectura/Escritura en GPGSA"\r
-\r
-msgid "Read/write GPRMC sentences"\r
-msgstr "Comandos de Lectura/Escritura en GPRMC"\r
-\r
-msgid "Read/write GPVTG sentences"\r
-msgstr "Comandos de Lectura/Escritura en GPVTG"\r
-\r
-msgid "Read/Write time format (i.e. HH:mm:ss xx)"\r
-msgstr "Formato de hora en Lectura/Escritura (p.e. HH:mm:ss xx)"\r
-\r
-msgid "Retain at most this number of position points  (0 = unlimited)"\r
-msgstr "Almacenar como poco este número de puntos de posición (0=ilimitado)"\r
-\r
-msgid "Return current position as a waypoint"\r
-msgstr "Devolver la posición actual como un punto de ruta"\r
-\r
-msgid "Road type changes"\r
-msgstr "Cambios en tipo de carretera."\r
-\r
-msgid "Shortname is MAC address"\r
-msgstr "El nombre corto es la dirección MAC"\r
-\r
-msgid "Speed in bits per second of serial port (baud=4800)"\r
-msgstr "Velocidad en bits por segundos del puerto serie (4800 baudios)"\r
-\r
-msgid "Split input into separate files"\r
-msgstr "Dividir la entrada en archivos separados"\r
-\r
-msgid "Split into multiple routes at turns"\r
-msgstr "Dividir en múltiples rutas en los giros"\r
-\r
-msgid "Stealth encrypted icon name"\r
-msgstr "Nombre de icono encriptado (Oculto)"\r
-\r
-msgid "Stealth non-encrypted icon name"\r
-msgstr "Nombre de icono no encriptado (Oculto)"\r
-\r
-msgid "String to separate concatenated address fields (default=\", \")"\r
-msgstr "Separar la cadena en campos de dirección concatenados (defecto=\",\")"\r
-\r
-msgid "Suppress labels on generated pins"\r
-msgstr "Quitar etiquetas en pins generados"\r
-\r
-msgid "Suppress retired geocaches"\r
-msgstr "Eliminar geocaches retirados"\r
-\r
-msgid "Suppress separator lines between waypoints"\r
-msgstr "Quitar líneas de separación entre puntos de ruta"\r
-\r
-msgid "Suppress use of handshaking in name of speed"\r
-msgstr "Eliminar uso de handshaking en nombre de velocidad (???)"\r
-\r
-msgid "Suppress whitespace in generated shortnames"\r
-msgstr "Quitar espacios en nombres cortos generados"\r
-\r
-msgid "Symbol to use for point data"\r
-msgstr "Símbolo a usar para los datos de puntos"\r
-\r
-msgid "Synthesize track times"\r
-msgstr "Tratar tiempos de las trazas"\r
-\r
-msgid "Target GPX version for output"\r
-msgstr "Versión GPX destino para la salida"\r
-\r
-msgid "Temperature unit [c=Celsius, f=Fahrenheit]"\r
-msgstr "Unidades de temperatura [c=Celsius, f=Fahrenheit]"\r
-\r
-msgid "The icon description is already the marker"\r
-msgstr "La descripción del icono ya es el marcador"\r
-\r
-msgid "Type of .an1 file"\r
-msgstr "Fichero de tipo .an1"\r
-\r
-msgid "Units for altitude (f)eet or (m)etres"\r
-msgstr "Unidades de altitud (p)íes o (m)etros"\r
-\r
-msgid "Units used when writing comments ('s'tatute or 'm'etric)"\r
-msgstr "Unidades utilizadas en los comentarios ('i'mperial o 'm'étrico')"\r
-\r
-msgid "UPPERCASE synth. shortnames"\r
-msgstr "Nombres cortos a generar en MAYÚSCULAS"\r
-\r
-msgid "Use depth values on output (default is ignore)"\r
-msgstr "Usar valores de profundidad en resultado (por defecto: ignorar)"\r
-\r
-msgid "Use proximity values on output (default is ignore)"\r
-msgstr "Usar valores de proximidad en resultado (por defecto: ignorar)"\r
-\r
-msgid "Use shortname instead of description"\r
-msgstr "Usar el nombre corto en lugar de la descripción"\r
-\r
-msgid "Version of gdb file to generate (1..3)"\r
-msgstr ""\r
-\r
-msgid "Version of mapsource file to generate (3,4,5)"\r
-msgstr "Versión de fichero mapsource a generar (3,4,5)"\r
-\r
-msgid "Waypoint background color"\r
-msgstr "Color de fondo para los puntos de ruta"\r
-\r
-msgid "Waypoint foreground color"\r
-msgstr "Color primer plano para los puntos de ruta"\r
-\r
-msgid "Waypoint type"\r
-msgstr "Tipo de punto de trazado"\r
-\r
-msgid "Width in pixels of map"\r
-msgstr "Ancho del mapa, en pixels"\r
-\r
-msgid "Width of lines, in pixels"\r
-msgstr "Ancho de líneas, en pixels"\r
-\r
-msgid "Write position using this grid."\r
-msgstr ""\r
-\r
-msgid "Write timestamps with offset x to UTC time"\r
-msgstr "Escribir marcas de tiempo con un desplazamiento de 'x' sobre la hora UTC"\r
-\r
-msgid "Write tracks compatible with Carto Exploreur"\r
-msgstr "Crear trazas compatibles con Carto Exploreur"\r
-\r
-msgid "Zoom level to reduce points"\r
-msgstr "Nivel de Zoom para reducir puntos"\r
-\r
+msgid ""
+msgstr ""
+"Project-Id-Version: GPSBabel command line program\n"
+"POT-Creation-Date: 2006-10-29 16:00\n"
+"PO-Revision-Date: 2008-05-01 10:24+0100\n"
+"Last-Translator: Daniel Díaz <Daniel.Diaz.Quintero@gmail.com>\n"
+"Language-Team: Daniel Díaz <Daniel.Diaz.Quintero@gmail.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Country: SPAIN\n"
+
+msgid "(integer sec or 'auto') Barograph to GPS time diff"
+msgstr "Dif. de tiempos de barógrafo a GPS (núm de segs. o 'auto')"
+
+msgid "(USR input) Break segments into separate tracks"
+msgstr "(Entrada USR) Dividir segmentos en trazas separadas"
+
+msgid "(USR output) Merge into one segmented track"
+msgstr "(Salida USR) Combinar en una traza segmentada"
+
+msgid "Ad-hoc closed icon name"
+msgstr "Cerrar nombre de icono Ad-hoc"
+
+msgid "Ad-hoc open icon name"
+msgstr "Abrir nombre de icono Ad-hoc"
+
+msgid "After output job done sleep n second(s)"
+msgstr "Después de la conversión, para 'n' segundos."
+
+msgid "Allow whitespace synth. shortnames"
+msgstr "Permitir espacios en los nombres cortos a generar"
+
+msgid "Altitudes are absolute and not clamped to ground"
+msgstr "Altitudes absolutas, no relativas al suelo"
+
+msgid "Append icon_descr to description"
+msgstr "Añadir descripción de icono a la descripción"
+
+msgid "Append realtime positioning data to the output file instead of truncating"
+msgstr "Añadir datos de posicionamiento de tiempo real al fichero de salida en vez de truncarlo"
+
+msgid "Base URL for link tag in output"
+msgstr "URL base para marca de enlace en salida"
+
+msgid "Basename prepended to URL on output"
+msgstr "Prefijo de la URL del resultado"
+
+msgid "Bitmap of categories"
+msgstr "Categorías de bitmap"
+
+msgid "Category name (Cache)"
+msgstr "Nombre de categoría (Cache)"
+
+msgid "Category number to use for written waypoints"
+msgstr "Número de categoría a usar en los puntos de ruta"
+
+msgid "Color for lines or mapnotes"
+msgstr "Color para líneas o notas de mapa"
+
+msgid "Command unit to power itself down"
+msgstr "Enviar comando de apagado a la unidad"
+
+msgid "Complete date-free tracks with given date (YYYYMMDD)."
+msgstr "Completar las trazas sin fecha con la fecha facilitada (AAAAMMDD)."
+
+msgid "Create unique waypoint names (default = yes)"
+msgstr "Crear nombres únicos para los puntos de ruta (defecto = si)"
+
+msgid "Create waypoints from geocache log entries"
+msgstr "Crear puntos de ruta a partir de entradas de log de geocache"
+
+msgid "Database name"
+msgstr "Nombre de la base de datos"
+
+msgid "Database name (filename)"
+msgstr "Nombre de la base de datos (nombre de fichero)"
+
+msgid "Datum (default=NAD27)"
+msgstr "Datum (por defecto=NAD27)"
+
+msgid "Days after which points are considered old"
+msgstr "Días después de los cuales los puntos se consideran antiguos"
+
+msgid "Decimal seconds to pause between groups of strings"
+msgstr "Segundos de pausa (en decimal) entre grupos de cadenas."
+
+msgid "Default category on output"
+msgstr "Categoría por defecto en la salida"
+
+msgid "Default category on output (1..16)"
+msgstr "Categoría por defecto del resultado (1..16)"
+
+msgid "Default icon name"
+msgstr "Nombre del icono por defecto"
+
+msgid "Default location"
+msgstr "Localización por defecto"
+
+msgid "Default proximity"
+msgstr "Proximidad por defecto"
+
+msgid "Default speed"
+msgstr "Velocidad por defecto"
+
+msgid "Default speed for waypoints (knots/hr)"
+msgstr "Velocidad por defecto para los puntos de ruta (nudos/hora)"
+
+msgid "Degrees output as 'ddd', 'dmm'(default) or 'dms'"
+msgstr "Salida en grados como 'ggg', 'gmm' (defecto) o 'gms'"
+
+msgid "Delete all routes"
+msgstr "Borrar todas las rutas"
+
+msgid "Delete all track points"
+msgstr "Borrar todos los puntos de la traza"
+
+msgid "Delete all waypoints"
+msgstr "Borrar todos los puntos de ruta"
+
+msgid "Display labels on track and routepoints  (default = 1)"
+msgstr "Mostrar etiquetas en las trazas y puntos de ruta (defecto=1)"
+
+msgid "Distance unit [m=metric, s=statute]"
+msgstr "Unidades de distancia [m=metrico,s=imperial]"
+
+msgid "Do not add geocache data to description"
+msgstr "No añadir datos de geocache a la descripción"
+
+msgid "Do not add URLs to description"
+msgstr "No añadir URL a la descripción"
+
+msgid "Don't show gpi bitmap on device"
+msgstr "No mostrar bitmaps gpi en el dispositivo"
+
+msgid "Draw extrusion line from trackpoint to ground"
+msgstr "Dibujar línea de extrusión desde el punto de trazado a tierra."
+
+msgid "Drop route points that do not have an equivalent waypoint (hidden points)"
+msgstr "Descartar puntos de la ruta que no tengan punto de ruta equivalente (oculto)"
+
+msgid "Enable alerts on speed or proximity distance"
+msgstr "Habilitar alertas de velocidad o proximidad"
+
+msgid "Encrypt hints using ROT13"
+msgstr "Encriptar sugerencias mediante ROT13"
+
+msgid "Encrypt hints with ROT13"
+msgstr "Encriptar sugerencias mediante ROT13"
+
+msgid "Erase device data after download"
+msgstr "Borrar datos del dispositivo después de descargar."
+
+msgid "Export linestrings for tracks and routes"
+msgstr "Exportar las cadenas de caracteres para las trazas y rutas"
+
+msgid "Export placemarks for tracks and routes"
+msgstr "Exportar marcas de situación para trazas y rutas"
+
+msgid "Full path to XCSV style file"
+msgstr "Ruta completa de la hoja de estilo XCSV"
+
+msgid "Generate # points"
+msgstr "Genera # puntos"
+
+msgid "Generate file with lat/lon for centering map"
+msgstr "Generar fichero con lat/lon para centrar mapa"
+
+msgid "Give points (waypoints/route points) a default radius (proximity)"
+msgstr "Dar a los puntos (puntos de ruta/puntos de la ruta) un radio por defecto (proximidad)"
+
+msgid "GPS datum (def. WGS 84)"
+msgstr "Datum GPS (def. WGS 84)"
+
+msgid "Height in pixels of map"
+msgstr "Alto del mapa, en pixels"
+
+msgid "Ignore event marker icons on read"
+msgstr "Ignorar iconos marcadores de eventos en la lectura"
+
+msgid "Include extended data for trackpoints (default = 1)"
+msgstr "Incluir datos extendidos para los puntos de la traza (defecto = 1)"
+
+msgid "Include groundspeak logs if present"
+msgstr "Incluir registros de groundspeak, si existen"
+
+msgid "Include major turn points (with description) from calculated route"
+msgstr "Incluir los puntos de giros más importantes (con descripción) de la ruta calculada"
+
+msgid "Include only via stations in route"
+msgstr "Suprimir puntos de ruta calculados"
+
+msgid "Include short name in bookmarks"
+msgstr "Incluir nombre corto en Favoritos"
+
+msgid "Index of name field in .dbf"
+msgstr "Índice del campo nombre en .dbf"
+
+msgid "Index of route (if more the one in source)"
+msgstr "Índice de ruta (si hay más de una en el origen)"
+
+msgid "Index of route to write (if more the one in source)"
+msgstr "Índice de la ruta a escribir (si existe más de una en origen)"
+
+msgid "Index of route/track to write (if more the one in source)"
+msgstr "Índice de la ruta/traza a escribir (si existe más de una)"
+
+msgid "Index of track (if more the one in source)"
+msgstr "Índice de traza (si hay más de una en el origen)"
+
+msgid "Index of track to write (if more the one in source)"
+msgstr "Índice de la traza a grabar (si hay más de una en el origen)"
+
+msgid "Index of URL field in .dbf"
+msgstr "Índice del campo URL en .dbf"
+
+msgid "Indicate direction of travel in track icons (default = 0)"
+msgstr "Indicar la dirección del viaje en los iconos de la traza"
+
+msgid "Infrastructure closed icon name"
+msgstr "Nombre de icono para cerrar infraestructura."
+
+msgid "Infrastructure open icon name"
+msgstr "Nombre de icono para abrir infraestructura."
+
+msgid "Keep turns if simplify filter is used"
+msgstr "Mantener giros si se usa el filtro de simplificación"
+
+msgid "Length of generated shortnames"
+msgstr "Longitud de nombres cortos a generar"
+
+msgid "Length of generated shortnames (default 16)"
+msgstr "Longitud de nombres cortos a generar"
+
+msgid "Line color, specified in hex AABBGGRR"
+msgstr "Color de línea, especificado en hex AABBGGRR"
+
+msgid "Make synth. shortnames unique"
+msgstr "Crear nombres cortos únicos"
+
+msgid "MapSend version TRK file to generate (3,4)"
+msgstr "Versión de fichero TRK de MapSend a generar (3,4)"
+
+msgid "Margin for map.  Degrees or percentage"
+msgstr "Márgen para el mapa. Grados de porcentaje."
+
+msgid "Marker type for new points"
+msgstr "Tipo de marcador para puntos nuevos"
+
+msgid "Marker type for old points"
+msgstr "Tipo de marcador para puntos antiguos"
+
+msgid "Marker type for unfound points"
+msgstr "Tipo de marcador para puntos no encontrados"
+
+msgid "Max length of waypoint name to write"
+msgstr "Longitud máxima de nombre de los puntos de rutas a escribir"
+
+msgid "Max number of comments to write (maxcmts=200)"
+msgstr "Máximo número de comentarios a escribir (maxcmts=200)"
+
+msgid "Max shortname length when used with -s"
+msgstr "Longitud máxima de nombre corto cuando se use con -s"
+
+msgid "Max synthesized shortname length"
+msgstr "Longitud máxima de nombre corto a generar"
+
+msgid "Merge output with existing file"
+msgstr "Combinar salida con fichero existente"
+
+msgid "MTK compatible CSV output file"
+msgstr "MTK compatible con fichero CSV"
+
+msgid "Name of the 'unassigned' category"
+msgstr "Nombre de la categoría 'Sin asignar'"
+
+msgid "New name for the route"
+msgstr "Nuevo nombre de la ruta"
+
+msgid "No separator lines between waypoints"
+msgstr "Sin líneas de separación entre puntos de ruta"
+
+msgid "No whitespace in generated shortnames"
+msgstr "Sin espacios en blanco en nombres cortos."
+
+msgid "Non-stealth encrypted icon name"
+msgstr "Nombre de icono encriptado (No oculto)"
+
+msgid "Non-stealth non-encrypted icon name"
+msgstr "Nombre de icono no encriptado (No oculto)"
+
+msgid "Numeric value of bitrate (baud=4800)"
+msgstr "Valor numérico de bitrate (baudios=4800)"
+
+msgid "Omit Placer name"
+msgstr "Omitir nombre del creador"
+
+msgid "Only read turns; skip all other points"
+msgstr "Sólo leer giros; ignorar todos los demás puntos"
+
+msgid "Path to HTML style sheet"
+msgstr "Ruta de la hoja de estilo HTML"
+
+msgid "Precision of coordinates"
+msgstr "Precisión de las coordenadas."
+
+msgid "Proximity distance"
+msgstr "Distancia de proximidad"
+
+msgid "Radius for circles"
+msgstr "Radio para los círculos"
+
+msgid "Radius of our big earth (default 6371000 meters)"
+msgstr "Radio de nuestra gran Tierra (por defecto 6371000 metros)"
+
+msgid "Read control points as waypoint/route/none"
+msgstr "Leer puntos de control como punto de ruta/ruta/ninguno"
+
+msgid "Read/Write date format (i.e. DDMMYYYY)"
+msgstr "Formato de fecha en Lectura/Escritura (p.e. DDMMAAAA)"
+
+msgid "Read/Write date format (i.e. yyyy/mm/dd)"
+msgstr "Formato de fecha en Lectura/Escritura (p.e. aaaa/mm/dd)"
+
+msgid "Read/write GPGGA sentences"
+msgstr "Comandos de Lectura/Escritura en GPGGA"
+
+msgid "Read/write GPGSA sentences"
+msgstr "Comandos de Lectura/Escritura en GPGSA"
+
+msgid "Read/write GPRMC sentences"
+msgstr "Comandos de Lectura/Escritura en GPRMC"
+
+msgid "Read/write GPVTG sentences"
+msgstr "Comandos de Lectura/Escritura en GPVTG"
+
+msgid "Read/Write time format (i.e. HH:mm:ss xx)"
+msgstr "Formato de hora en Lectura/Escritura (p.e. HH:mm:ss xx)"
+
+msgid "Retain at most this number of position points  (0 = unlimited)"
+msgstr "Almacenar como poco este número de puntos de posición (0=ilimitado)"
+
+msgid "Return current position as a waypoint"
+msgstr "Devolver la posición actual como un punto de ruta"
+
+msgid "Road type changes"
+msgstr "Cambios en tipo de carretera."
+
+msgid "Set waypoint name to source filename."
+msgstr "Establecer el nombre de los puntos de ruta al fichero origen"
+
+msgid "Shortname is MAC address"
+msgstr "El nombre corto es la dirección MAC"
+
+msgid "Speed in bits per second of serial port (baud=4800)"
+msgstr "Velocidad en bits por segundos del puerto serie (4800 baudios)"
+
+msgid "Split input into separate files"
+msgstr "Dividir la entrada en archivos separados"
+
+msgid "Split into multiple routes at turns"
+msgstr "Dividir en múltiples rutas en los giros"
+
+msgid "Starting seed of the internal number generator"
+msgstr "Iniciando el origen de datos del generador numérico interno"
+
+msgid "Stealth encrypted icon name"
+msgstr "Nombre de icono encriptado (Oculto)"
+
+msgid "Stealth non-encrypted icon name"
+msgstr "Nombre de icono no encriptado (Oculto)"
+
+msgid "String to separate concatenated address fields (default=\", \")"
+msgstr "Separar la cadena en campos de dirección concatenados (defecto=\",\")"
+
+msgid "Suppress labels on generated pins"
+msgstr "Quitar etiquetas en pins generados"
+
+msgid "Suppress retired geocaches"
+msgstr "Eliminar geocaches retirados"
+
+msgid "Suppress separator lines between waypoints"
+msgstr "Quitar líneas de separación entre puntos de ruta"
+
+msgid "Suppress use of handshaking in name of speed"
+msgstr "Eliminar uso de handshaking en nombre de velocidad (???)"
+
+msgid "Suppress whitespace in generated shortnames"
+msgstr "Quitar espacios en nombres cortos generados"
+
+msgid "Symbol to use for point data"
+msgstr "Símbolo a usar para los datos de puntos"
+
+msgid "Sync GPS time to computer time"
+msgstr "Sincronizar la hora del GPS con la del PC"
+
+msgid "Synthesize track times"
+msgstr "Resumir los tiempos de las trazas"
+
+msgid "Target GPX version for output"
+msgstr "Versión GPX destino para la salida"
+
+msgid "Temperature unit [c=Celsius, f=Fahrenheit]"
+msgstr "Unidades de temperatura [c=Celsius, f=Fahrenheit]"
+
+msgid "The icon description is already the marker"
+msgstr "La descripción del icono ya es el marcador"
+
+msgid "Treat waypoints as icons on write"
+msgstr "Tratar los puntos de ruta como iconos en la escritura"
+
+msgid "Type of .an1 file"
+msgstr "Fichero de tipo .an1"
+
+msgid "Units for altitude (f)eet or (m)etres"
+msgstr "Unidades de altitud (p)íes o (m)etros"
+
+msgid "Units used for names with @speed ('s'tatute or 'm'etric)"
+msgstr "Unidades utilizadas para los nombre con @velocidad ('s'tatute o 'm'etrica)"
+
+msgid "Units used when writing comments ('s'tatute or 'm'etric)"
+msgstr "Unidades utilizadas en los comentarios ('i'mperial o 'm'étrico')"
+
+msgid "UPPERCASE synth. shortnames"
+msgstr "Nombres cortos a generar en MAYÚSCULAS"
+
+msgid "Use depth values on output (default is ignore)"
+msgstr "Usar valores de profundidad en resultado (por defecto: ignorar)"
+
+msgid "Use proximity values on output (default is ignore)"
+msgstr "Usar valores de proximidad en resultado (por defecto: ignorar)"
+
+msgid "Use shortname instead of description"
+msgstr "Usar el nombre corto en lugar de la descripción"
+
+msgid "Use specified bitmap on output"
+msgstr "Utilizar el bitmap escificado en la salida"
+
+msgid "Version of gdb file to generate (1..3)"
+msgstr "Versión del fichero gbd a generar (1..3)"
+
+msgid "Version of mapsource file to generate (3,4,5)"
+msgstr "Versión de fichero mapsource a generar (3,4,5)"
+
+msgid "Waypoint background color"
+msgstr "Color de fondo para los puntos de ruta"
+
+msgid "Waypoint foreground color"
+msgstr "Color primer plano para los puntos de ruta"
+
+msgid "Waypoint type"
+msgstr "Tipo de punto de trazado"
+
+msgid "Width in pixels of map"
+msgstr "Ancho del mapa, en pixels"
+
+msgid "Width of lines, in pixels"
+msgstr "Ancho de líneas, en pixels"
+
+msgid "Write additional node tag key/value pairs"
+msgstr "Escribir etiquetas adicionales de clave/valor en los nodos"
+
+msgid "Write additional way tag key/value pairs"
+msgstr "Graba etiquetas adicionales de clave/valor en la ruta"
+
+msgid "Write all tracks into one file"
+msgstr "Graba todas las trazas en un fichero"
+
+msgid "Write description to address field"
+msgstr "Graba la descripción al campo dirección"
+
+msgid "Write each waypoint in a separate file"
+msgstr "Graba cada punto de ruta en un fichero individual"
+
+msgid "Write notes to address field"
+msgstr "Graba las notas al campo dirección"
+
+msgid "Write position to address field"
+msgstr "Graba la posición al campo dirección"
+
+msgid "Write position using this grid."
+msgstr "Graba la posición utilizando esta rejilla"
+
+msgid "Write timestamps with offset x to UTC time"
+msgstr "Escribir marcas de tiempo con un desplazamiento de 'x' sobre la hora UTC"
+
+msgid "Write tracks compatible with Carto Exploreur"
+msgstr "Crear trazas compatibles con Carto Exploreur"
+
+msgid "Write tracks for Gisteq Phototracker"
+msgstr "Graba las trazas para el Gisteq Phototracker "
+
+msgid "Zoom level to reduce points"
+msgstr "Nivel de Zoom para reducir puntos"
+
index 5ccc5d1fdfc2f5771b338ba19e659e254b0809ae..0ef17406725dde5ab1db581bf3aea8e86b5f1540 100644 (file)
-msgid ""\r
-msgstr ""\r
-"Project-Id-Version: GPSBabel command line program\n"\r
-"POT-Creation-Date: 2005-11-19 01:14\n"\r
-"PO-Revision-Date: 2007-05-01 20:21+0100\n"\r
-"Last-Translator: Olaf Klein <o.b.klein@t-online.de>\n"\r
-"Language-Team: \n"\r
-"MIME-Version: 1.0\n"\r
-"Content-Type: text/plain; charset=utf-8\n"\r
-"Content-Transfer-Encoding: 8bit\n"\r
-"X-Generator: Midnight Commander\n"\r
-"X-Poedit-Language: French\n"\r
-\r
-msgid "(integer sec or 'auto') Barograph to GPS time diff"\r
-msgstr "(entier sec ou 'auto') Barograph de différence temporelle GPS"\r
-\r
-msgid "(USR input) Break segments into separate tracks"\r
-msgstr "(entrée USR) Séparer les segment en plusieurs traces"\r
-\r
-msgid "(USR output) Merge into one segmented track"\r
-msgstr "(sortie USR) Fusionner en une trace segmentée"\r
-\r
-msgid "Ad-hoc closed icon name"\r
-msgstr "Nom de l'icône pour Ad-hoc fermé"\r
-\r
-msgid "Ad-hoc open icon name"\r
-msgstr "Nom de l'icône pour Ad-hoc ouvert"\r
-\r
-msgid "Allow whitespace synth. shortnames"\r
-msgstr "Autoriser les espaces dans les noms courts"\r
-\r
-msgid "Altitudes are absolute and not clamped to ground"\r
-msgstr "Les altitudes sont absolue et idépendantes du sol"\r
-\r
-msgid "Append icon_descr to description"\r
-msgstr "Ajouter icon_descr à la description"\r
-\r
-msgid "Append realtime positioning data to the output file instead of truncating"\r
-msgstr ""\r
-\r
-msgid "Base URL for link tag in output"\r
-msgstr "URL de base pour l'étiquette de lien en sortie"\r
-\r
-msgid "Basename prepended to URL on output"\r
-msgstr "Nom de base à utiliser pour l'URL de sortie"\r
-\r
-msgid "Category name (Cache)"\r
-msgstr "Nom de la catégorie"\r
-\r
-msgid "Category number to use for written waypoints"\r
-msgstr ""\r
-\r
-msgid "Color for lines or mapnotes"\r
-msgstr "Couleur des lignes ou des notes"\r
-\r
-msgid "Command unit to power itself down"\r
-msgstr "Ordonner au GPS de s'éteindre"\r
-\r
-msgid "Complete date-free tracks with given date (YYYYMMDD)."\r
-msgstr "Ajouter une date donnée (AAAAMMJJ) à une trace sans horodatage"\r
-\r
-msgid "Create waypoints from geocache log entries"\r
-msgstr "Créer des waypoints à partir des entrés de log géocache"\r
-\r
-msgid "Database name"\r
-msgstr "Nom de la base de données"\r
-\r
-msgid "Database name (filename)"\r
-msgstr "Nom de la base de données (nom de fichier)"\r
-\r
-msgid "Datum (default=NAD27)"\r
-msgstr "Datum (défaut=NAD27)"\r
-\r
-msgid "Days after which points are considered old"\r
-msgstr "Nombre de jours après lesquels les points sont considérés comme anciens"\r
-\r
-msgid "Decimal seconds to pause between groups of strings"\r
-msgstr ""\r
-\r
-msgid "Default category on output (1..16)"\r
-msgstr "Catégorie par défaut en sortie (1..16)"\r
-\r
-msgid "Default icon name"\r
-msgstr "Nom d'icone par défaut"\r
-\r
-msgid "Default location"\r
-msgstr ""\r
-\r
-msgid "Default speed for waypoints (knots/hr)"\r
-msgstr ""\r
-\r
-msgid "Degrees output as 'ddd', 'dmm'(default) or 'dms'"\r
-msgstr ""\r
-\r
-msgid "Delete all waypoints"\r
-msgstr "Supprimer tous les waypoints"\r
-\r
-msgid "Display labels on track and routepoints  (default = 1)"\r
-msgstr ""\r
-\r
-msgid "Distance unit [m=metric, s=statute]"\r
-msgstr ""\r
-\r
-msgid "Do not add geocache data to description"\r
-msgstr "Ne pas ajouter d'inforamtion de geocache à la description"\r
-\r
-msgid "Draw extrusion line from trackpoint to ground"\r
-msgstr ""\r
-\r
-msgid "Drop route points that do not have an equivalent waypoint (hidden points)"\r
-msgstr "Eliminer les points de route qui n'ont pas de waypoint équivallent (points cachés)"\r
-\r
-msgid "Encrypt hints using ROT13"\r
-msgstr "Encrypter les signes en ROT13"\r
-\r
-msgid "Encrypt hints with ROT13"\r
-msgstr "Encrypter les signes avec ROT13"\r
-\r
-msgid "Erase device data after download"\r
-msgstr ""\r
-\r
-msgid "Export linestrings for tracks and routes"\r
-msgstr "Exporter les chaînes de caractères pour les traces et les routes"\r
-\r
-msgid "Export placemarks for tracks and routes"\r
-msgstr "Exporter les marqueurs pour les traces et les routes"\r
-\r
-msgid "Full path to XCSV style file"\r
-msgstr "Chemin complet du fichier de modèle de XCSV"\r
-\r
-msgid "Generate file with lat/lon for centering map"\r
-msgstr "Générer le fichier avec les infos de centrage de carte (lat/lon)"\r
-\r
-msgid "Give points (waypoints/route points) a default radius (proximity)"\r
-msgstr "Donner un rayon de proximité par défaut aux points (waypoints/points de route)"\r
-\r
-msgid "GPS datum (def. WGS 84)"\r
-msgstr ""\r
-\r
-msgid "Height in pixels of map"\r
-msgstr "Hauteur de la carte en pixels"\r
-\r
-msgid "Ignore event marker icons"\r
-msgstr "Ignorer les icones marqueurs d'événements"\r
-\r
-msgid "Include extended data for trackpoints (default = 1)"\r
-msgstr ""\r
-\r
-msgid "Include groundspeak logs if present"\r
-msgstr "Inclure les logs groundspeak si disponible"\r
-\r
-msgid "Include major turn points (with description) from calculated route"\r
-msgstr ""\r
-\r
-msgid "Include only via stations in route"\r
-msgstr "Inclure seulement les étapes dans la route"\r
-\r
-msgid "Include short name in bookmarks"\r
-msgstr "Inclure les noms courts dans les signets"\r
-\r
-msgid "Index of name field in .dbf"\r
-msgstr "Index du champ nom dans le .dbf"\r
-\r
-msgid "Index of route (if more the one in source)"\r
-msgstr ""\r
-\r
-msgid "Index of route to write (if more the one in source)"\r
-msgstr "Index des routes à écrire (si plusieurs sources)"\r
-\r
-msgid "Index of route/track to write (if more the one in source)"\r
-msgstr "Index des routes/traces à écrire (si plusieurs sources)"\r
-\r
-msgid "Index of track (if more the one in source)"\r
-msgstr ""\r
-\r
-msgid "Index of track to write (if more the one in source)"\r
-msgstr "Index des traces à écrire (si plusieurs sources)"\r
-\r
-msgid "Index of URL field in .dbf"\r
-msgstr "Index du champ URL dans le .dbf"\r
-\r
-msgid "Infrastructure closed icon name"\r
-msgstr "Nom de l'icône pour l'Infrastructure fermée"\r
-\r
-msgid "Infrastructure open icon name"\r
-msgstr "Nom de l'icône pour l'Infrastructure ouverte"\r
-\r
-msgid "Keep turns if simplify filter is used"\r
-msgstr "Garder les virages si le filtre simplifié est utilisé"\r
-\r
-msgid "Length of generated shortnames"\r
-msgstr "Longueur des nom courts générés"\r
-\r
-msgid "Length of generated shortnames (default 16)"\r
-msgstr "Longueur des nom courts générés (défaut : 16)"\r
-\r
-msgid "Line color, specified in hex AABBGGRR"\r
-msgstr "Couleur de la ligne, spécifié en hexadécimal AABBGGRR"\r
-\r
-msgid "Make synth. shortnames unique"\r
-msgstr "Les noms courts sont tous différents"\r
-\r
-msgid "MapSend version TRK file to generate (3,4)"\r
-msgstr ""\r
-\r
-msgid "Margin for map.  Degrees or percentage"\r
-msgstr "Marge de la carte. Degrés ou pourcentage"\r
-\r
-msgid "Marker type for new points"\r
-msgstr "Type de marqueur pour les nouveaux points"\r
-\r
-msgid "Marker type for old points"\r
-msgstr "Type de marqueur pour les anciens points"\r
-\r
-msgid "Marker type for unfound points"\r
-msgstr "Type de marqueur pour les points non trouvés"\r
-\r
-msgid "Max length of waypoint name to write"\r
-msgstr "Longueur maximum du nom du waypoint"\r
-\r
-msgid "Max number of comments to write (maxcmts=200)"\r
-msgstr "Nombre maximum de commentaires à écrire (maxcmts=200)"\r
-\r
-msgid "Max shortname length when used with -s"\r
-msgstr "Longueur maximum du nom court lorsque utilisé avec l'option -s"\r
-\r
-msgid "Max synthesized shortname length"\r
-msgstr "Longueur max. de noms courts générés"\r
-\r
-msgid "Merge output with existing file"\r
-msgstr "Fusionner la sortie avec un fichier existant"\r
-\r
-msgid "Name of the 'unassigned' category"\r
-msgstr "Nom de la catégorie 'non assignée'"\r
-\r
-msgid "New name for the route"\r
-msgstr "Nouveau nom pour la route"\r
-\r
-msgid "No separator lines between waypoints"\r
-msgstr "Supprimer les lignes de séparation en les waypoints"\r
-\r
-msgid "No whitespace in generated shortnames"\r
-msgstr "Supprimer les espaces dans les noms courts générés"\r
-\r
-msgid "Non-stealth encrypted icon name"\r
-msgstr "Ne pas récupérer les noms d'icones encryptés"\r
-\r
-msgid "Non-stealth non-encrypted icon name"\r
-msgstr "Ne pas récupérer les noms d'icones non encryptés"\r
-\r
-msgid "Numeric value of bitrate (baud=4800)"\r
-msgstr "Valeur numérique de la vitesse de transfert (4800 bauds)"\r
-\r
-msgid "Omit Placer name"\r
-msgstr "Omettre le nom du Placer"\r
-\r
-msgid "Only read turns; skip all other points"\r
-msgstr "Lire seulement les virages; ne pas tenire compte des autres points"\r
-\r
-msgid "Path to HTML style sheet"\r
-msgstr "Chemin vers une feuille de style HTML"\r
-\r
-msgid "Precision of coordinates"\r
-msgstr "Précision des coordonnées"\r
-\r
-msgid "Radius for circles"\r
-msgstr "Rayon des cercles"\r
-\r
-msgid "Radius of our big earth (default 6371000 meters)"\r
-msgstr "Rayon de la terre (défaut : 6371000 mètres)"\r
-\r
-msgid "Read control points as waypoint/route/none"\r
-msgstr "Lire les points de contrôle en temps au waypoint/route/rien"\r
-\r
-msgid "Read/Write date format (i.e. DDMMYYYY)"\r
-msgstr ""\r
-\r
-msgid "Read/Write date format (i.e. yyyy/mm/dd)"\r
-msgstr "Lire/Ecrire le format de date (i.e. YYYY/MM/DD)"\r
-\r
-msgid "Read/write GPGGA sentences"\r
-msgstr ""\r
-\r
-msgid "Read/write GPGSA sentences"\r
-msgstr ""\r
-\r
-msgid "Read/write GPRMC sentences"\r
-msgstr ""\r
-\r
-msgid "Read/write GPVTG sentences"\r
-msgstr ""\r
-\r
-msgid "Read/Write time format (i.e. HH:mm:ss xx)"\r
-msgstr "Lire/Ecrire le format horaire (i.e. HH:mm:ss xx)"\r
-\r
-msgid "Retain at most this number of position points  (0 = unlimited)"\r
-msgstr ""\r
-\r
-msgid "Return current position as a waypoint"\r
-msgstr "Renvoyer la position courante en tant que waypoint"\r
-\r
-msgid "Road type changes"\r
-msgstr ""\r
-\r
-msgid "Shortname is MAC address"\r
-msgstr "Le nom court est l'adresse MAC"\r
-\r
-msgid "Speed in bits per second of serial port (baud=4800)"\r
-msgstr ""\r
-\r
-msgid "Split input into separate files"\r
-msgstr ""\r
-\r
-msgid "Split into multiple routes at turns"\r
-msgstr "Séparer en plusieurs routes à chaque virage"\r
-\r
-msgid "Stealth encrypted icon name"\r
-msgstr "Récupérer les noms d'icones encryptés"\r
-\r
-msgid "Stealth non-encrypted icon name"\r
-msgstr "Récupérer les noms d'icones non encryptés"\r
-\r
-msgid "String to separate concatenated address fields (default=\", \")"\r
-msgstr "Chaine de caractère pour séparer les champs d'adresse (\", \" par défaut)"\r
-\r
-msgid "Suppress labels on generated pins"\r
-msgstr "Supprimer les labels des points créés"\r
-\r
-msgid "Suppress retired geocaches"\r
-msgstr "Suypprimer les géocaches désactivées"\r
-\r
-msgid "Suppress separator lines between waypoints"\r
-msgstr ""\r
-\r
-msgid "Suppress use of handshaking in name of speed"\r
-msgstr "Supprimer les controles pour améliorer les performances"\r
-\r
-msgid "Suppress whitespace in generated shortnames"\r
-msgstr ""\r
-\r
-msgid "Symbol to use for point data"\r
-msgstr "Symbole à utiliser pour les données de type point"\r
-\r
-msgid "Synthesize track times"\r
-msgstr "Simplifier l'horodatage des traces"\r
-\r
-msgid "Target GPX version for output"\r
-msgstr "Version du fichier GPX pour la sortie"\r
-\r
-msgid "Temperature unit [c=Celsius, f=Fahrenheit]"\r
-msgstr ""\r
-\r
-msgid "The icon description is already the marker"\r
-msgstr "Les description de l'icon est identique au marqueur"\r
-\r
-msgid "Type of .an1 file"\r
-msgstr ""\r
-\r
-msgid "Units for altitude (f)eet or (m)etres"\r
-msgstr ""\r
-\r
-msgid "Units used when writing comments ('s'tatute or 'm'etric)"\r
-msgstr ""\r
-\r
-msgid "UPPERCASE synth. shortnames"\r
-msgstr "Noms courts en MAJUSCULE"\r
-\r
-msgid "Use depth values on output (default is ignore)"\r
-msgstr "Utiliser les valeurs de profondeur sur la sortie (par défaut : ignorer)"\r
-\r
-msgid "Use proximity values on output (default is ignore)"\r
-msgstr "Utiliser les valeurs de proximité sur la sortie (par défaut : ignorer)"\r
-\r
-msgid "Use shortname instead of description"\r
-msgstr "Utiliser le nom court au lieu de la description"\r
-\r
-msgid "Version of gdb file to generate (1..3)"\r
-msgstr ""\r
-\r
-msgid "Version of mapsource file to generate (3,4,5)"\r
-msgstr "Version du fichier mapsource à créer (3,4,5)"\r
-\r
-msgid "Waypoint background color"\r
-msgstr "Couleur de fond du Waypoint"\r
-\r
-msgid "Waypoint foreground color"\r
-msgstr "Couleur du Waypoint"\r
-\r
-msgid "Waypoint type"\r
-msgstr ""\r
-\r
-msgid "Width in pixels of map"\r
-msgstr "Largeur de la carte en pixels"\r
-\r
-msgid "Width of lines, in pixels"\r
-msgstr "Largeur des lignes en pixels"\r
-\r
-msgid "Write position using this grid."\r
-msgstr ""\r
-\r
-msgid "Write timestamps with offset x to UTC time"\r
-msgstr "Ecrire l'horodatage avec un décalage de x par rapport à l'heure UTC"\r
-\r
-msgid "Write tracks compatible with Carto Exploreur"\r
-msgstr "Ecrire des traces compatibles avec CartoExploreur"\r
-\r
-msgid "Zoom level to reduce points"\r
-msgstr "Niveau de zoom pour réduire les points"\r
-\r
+msgid ""
+msgstr ""
+"Project-Id-Version: GPSBabel command line program\n"
+"POT-Creation-Date: 2005-11-19 01:14\n"
+"PO-Revision-Date: 2008-04-26 23:12+0100\n"
+"Last-Translator: Lilian <contact@utagawavtt.com>\n"
+"Language-Team: Lilian Morinon <lilian_morinon@yahoo.fr>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Midnight Commander\n"
+"X-Poedit-Language: French\n"
+"X-Poedit-Country: FRANCE\n"
+
+msgid "(integer sec or 'auto') Barograph to GPS time diff"
+msgstr "(entier sec ou 'auto') Barograph de différence temporelle GPS"
+
+msgid "(USR input) Break segments into separate tracks"
+msgstr "(entrée USR) Séparer les segment en plusieurs traces"
+
+msgid "(USR output) Merge into one segmented track"
+msgstr "(sortie USR) Fusionner en une trace segmentée"
+
+msgid "Ad-hoc closed icon name"
+msgstr "Nom de l'icône pour Ad-hoc fermé"
+
+msgid "Ad-hoc open icon name"
+msgstr "Nom de l'icône pour Ad-hoc ouvert"
+
+msgid "After output job done sleep n second(s)"
+msgstr "Faire une pause de n secondes lorsque l'éxécution est terminée"
+
+msgid "Allow whitespace synth. shortnames"
+msgstr "Autoriser les espaces dans les noms courts"
+
+msgid "Altitudes are absolute and not clamped to ground"
+msgstr "Les altitudes sont absolue et idépendantes du sol"
+
+msgid "Append icon_descr to description"
+msgstr "Ajouter icon_descr à la description"
+
+msgid "Append realtime positioning data to the output file instead of truncating"
+msgstr "Ajoute les données de position en temps réel au fichier de sortie plutôt que de le tronquer"
+
+msgid "Base URL for link tag in output"
+msgstr "URL de base pour l'étiquette de lien en sortie"
+
+msgid "Basename prepended to URL on output"
+msgstr "Nom de base à utiliser pour l'URL de sortie"
+
+msgid "Bitmap of categories"
+msgstr "Cartographie des catégories"
+
+msgid "Category name (Cache)"
+msgstr "Nom de la catégorie"
+
+msgid "Category number to use for written waypoints"
+msgstr "Numéro de catégorie pour les balises écrites"
+
+msgid "Color for lines or mapnotes"
+msgstr "Couleur des lignes ou des notes"
+
+msgid "Command unit to power itself down"
+msgstr "Ordonner au GPS de s'éteindre"
+
+msgid "Complete date-free tracks with given date (YYYYMMDD)."
+msgstr "Ajouter une date donnée (AAAAMMJJ) à une trace sans horodatage"
+
+msgid "Create unique waypoint names (default = yes)"
+msgstr "Créer des noms de balises uniques (oui par défaut)"
+
+msgid "Create waypoints from geocache log entries"
+msgstr "Créer des balises à partir des entrés de log géocache"
+
+msgid "Database name"
+msgstr "Nom de la base de données"
+
+msgid "Database name (filename)"
+msgstr "Nom de la base de données (nom de fichier)"
+
+msgid "Datum (default=NAD27)"
+msgstr "Datum (défaut=NAD27)"
+
+msgid "Days after which points are considered old"
+msgstr "Nombre de jours après lesquels les points sont considérés comme anciens"
+
+msgid "Decimal seconds to pause between groups of strings"
+msgstr "Dixième de seconde de pause entre les groups de chaines"
+
+msgid "Default category on output"
+msgstr "Catégorie par défaut en sortie"
+
+msgid "Default category on output (1..16)"
+msgstr "Catégorie par défaut en sortie (1..16)"
+
+msgid "Default icon name"
+msgstr "Nom d'icone par défaut"
+
+msgid "Default location"
+msgstr "Endroit par défaut"
+
+msgid "Default proximity"
+msgstr "Proximité par défaut"
+
+msgid "Default speed"
+msgstr "Vitesse par défaut"
+
+msgid "Default speed for waypoints (knots/hr)"
+msgstr "Vitesse par défaut pour les balises (noeuds par heures)"
+
+msgid "Degrees output as 'ddd', 'dmm'(default) or 'dms'"
+msgstr "Ecrire les dégrés en 'd°d°d°', 'd°m'm''(défaut) ou 'd°m's'''"
+
+msgid "Delete all routes"
+msgstr "Supprimer toutes les routes"
+
+msgid "Delete all track points"
+msgstr "Supprimer tous les points de traces"
+
+msgid "Delete all waypoints"
+msgstr "Supprimer toutes les balises"
+
+msgid "Display labels on track and routepoints  (default = 1)"
+msgstr "Afficher les labels sur les traces et les points de routes (défaut = 1)"
+
+msgid "Distance unit [m=metric, s=statute]"
+msgstr "Unité de distance [m = métrique, s=stature]"
+
+msgid "Do not add geocache data to description"
+msgstr "Ne pas ajouter d'inforamtion de geocache à la description"
+
+msgid "Do not add URLs to description"
+msgstr "Ne pas ajouter les URLs aux descriptions"
+
+msgid "Don't show gpi bitmap on device"
+msgstr "Ne pas afficher les images gpi sur le périphérique"
+
+msgid "Draw extrusion line from trackpoint to ground"
+msgstr "Générer une ligne d'extrusion entre le sol et le point de trace"
+
+msgid "Drop route points that do not have an equivalent waypoint (hidden points)"
+msgstr "Eliminer les points de route qui n'ont pas de balises équivallentes (points cachés)"
+
+msgid "Enable alerts on speed or proximity distance"
+msgstr "Activer les alertes de vitesse ou de proximité"
+
+msgid "Encrypt hints using ROT13"
+msgstr "Encrypter les signes en ROT13"
+
+msgid "Encrypt hints with ROT13"
+msgstr "Encrypter les signes avec ROT13"
+
+msgid "Erase device data after download"
+msgstr "Effacer les données du périphérique après téléchargement"
+
+msgid "Export linestrings for tracks and routes"
+msgstr "Exporter les chaînes de caractères pour les traces et les routes"
+
+msgid "Export placemarks for tracks and routes"
+msgstr "Exporter les marqueurs pour les traces et les routes"
+
+msgid "Full path to XCSV style file"
+msgstr "Chemin complet du fichier de modèle de XCSV"
+
+msgid "Generate # points"
+msgstr "Générer # points"
+
+msgid "Generate file with lat/lon for centering map"
+msgstr "Générer le fichier avec les infos de centrage de carte (lat/lon)"
+
+msgid "Give points (waypoints/route points) a default radius (proximity)"
+msgstr "Donner un rayon de proximité par défaut aux points (balises/points de route)"
+
+msgid "GPS datum (def. WGS 84)"
+msgstr ""
+
+msgid "Height in pixels of map"
+msgstr "Hauteur de la carte en pixels"
+
+msgid "Ignore event marker icons on read"
+msgstr "Ignorer les marqueurs d'événements lors de la lecture"
+
+msgid "Include extended data for trackpoints (default = 1)"
+msgstr "Inclure les données étendues pour les points de trace (défaut = 1)"
+
+msgid "Include groundspeak logs if present"
+msgstr "Inclure les logs groundspeak si disponible"
+
+msgid "Include major turn points (with description) from calculated route"
+msgstr "Inclure les points de virage (avec description) de la route calculée"
+
+msgid "Include only via stations in route"
+msgstr "Inclure seulement les étapes dans la route"
+
+msgid "Include short name in bookmarks"
+msgstr "Inclure les noms courts dans les signets"
+
+msgid "Index of name field in .dbf"
+msgstr "Index du champ nom dans le .dbf"
+
+msgid "Index of route (if more the one in source)"
+msgstr "Index des routes (si plus d'une dans la source)"
+
+msgid "Index of route to write (if more the one in source)"
+msgstr "Index des routes à écrire (si plusieurs sources)"
+
+msgid "Index of route/track to write (if more the one in source)"
+msgstr "Index des routes/traces à écrire (si plusieurs sources)"
+
+msgid "Index of track (if more the one in source)"
+msgstr "Index des traces (si plus d'une dans la source)"
+
+msgid "Index of track to write (if more the one in source)"
+msgstr "Index des traces à écrire (si plusieurs sources)"
+
+msgid "Index of URL field in .dbf"
+msgstr "Index du champ URL dans le .dbf"
+
+msgid "Indicate direction of travel in track icons (default = 0)"
+msgstr "Indiquer la direction de déplacement dans les icones de la trace (défaut = 0)"
+
+msgid "Infrastructure closed icon name"
+msgstr "Nom de l'icône pour l'Infrastructure fermée"
+
+msgid "Infrastructure open icon name"
+msgstr "Nom de l'icône pour l'Infrastructure ouverte"
+
+msgid "Keep turns if simplify filter is used"
+msgstr "Garder les virages si le filtre simplifié est utilisé"
+
+msgid "Length of generated shortnames"
+msgstr "Longueur des nom courts générés"
+
+msgid "Length of generated shortnames (default 16)"
+msgstr "Longueur des nom courts générés (défaut : 16)"
+
+msgid "Line color, specified in hex AABBGGRR"
+msgstr "Couleur de la ligne, spécifié en hexadécimal AABBGGRR"
+
+msgid "Make synth. shortnames unique"
+msgstr "Les noms courts sont tous différents"
+
+msgid "MapSend version TRK file to generate (3,4)"
+msgstr "Version des fichiers TRK Mapsend à générer (3,4)"
+
+msgid "Margin for map.  Degrees or percentage"
+msgstr "Marge de la carte. Degrés ou pourcentage"
+
+msgid "Marker type for new points"
+msgstr "Type de marqueur pour les nouveaux points"
+
+msgid "Marker type for old points"
+msgstr "Type de marqueur pour les anciens points"
+
+msgid "Marker type for unfound points"
+msgstr "Type de marqueur pour les points non trouvés"
+
+msgid "Max length of waypoint name to write"
+msgstr "Longueur maximum du nom de la balise"
+
+msgid "Max number of comments to write (maxcmts=200)"
+msgstr "Nombre maximum de commentaires à écrire (maxcmts=200)"
+
+msgid "Max shortname length when used with -s"
+msgstr "Longueur maximum du nom court lorsque utilisé avec l'option -s"
+
+msgid "Max synthesized shortname length"
+msgstr "Longueur max. de noms courts générés"
+
+msgid "Merge output with existing file"
+msgstr "Fusionner la sortie avec un fichier existant"
+
+msgid "MTK compatible CSV output file"
+msgstr "Fichier de sortie CSV compatible MTK"
+
+msgid "Name of the 'unassigned' category"
+msgstr "Nom de la catégorie 'non assignée'"
+
+msgid "New name for the route"
+msgstr "Nouveau nom pour la route"
+
+msgid "No separator lines between waypoints"
+msgstr "Supprimer les lignes de séparation entre les balises"
+
+msgid "No whitespace in generated shortnames"
+msgstr "Supprimer les espaces dans les noms courts générés"
+
+msgid "Non-stealth encrypted icon name"
+msgstr "Ne pas récupérer les noms d'icones encryptés"
+
+msgid "Non-stealth non-encrypted icon name"
+msgstr "Ne pas récupérer les noms d'icones non encryptés"
+
+msgid "Numeric value of bitrate (baud=4800)"
+msgstr "Valeur numérique de la vitesse de transfert (4800 bauds)"
+
+msgid "Omit Placer name"
+msgstr "Omettre le nom du Placer"
+
+msgid "Only read turns; skip all other points"
+msgstr "Lire seulement les virages; ne pas tenire compte des autres points"
+
+msgid "Path to HTML style sheet"
+msgstr "Chemin vers une feuille de style HTML"
+
+msgid "Precision of coordinates"
+msgstr "Précision des coordonnées"
+
+msgid "Proximity distance"
+msgstr "Distance de proximité"
+
+msgid "Radius for circles"
+msgstr "Rayon des cercles"
+
+msgid "Radius of our big earth (default 6371000 meters)"
+msgstr "Rayon de la terre (défaut : 6371000 mètres)"
+
+msgid "Read control points as waypoint/route/none"
+msgstr "Lire les points de contrôle en temps à la balise/route/rien"
+
+msgid "Read/Write date format (i.e. DDMMYYYY)"
+msgstr "Lire/Ecrire le format date (i.e. JJMMYYYY)"
+
+msgid "Read/Write date format (i.e. yyyy/mm/dd)"
+msgstr "Lire/Ecrire le format de date (i.e. YYYY/MM/DD)"
+
+msgid "Read/write GPGGA sentences"
+msgstr "Lire/Ecrire des séquences GPGGA"
+
+msgid "Read/write GPGSA sentences"
+msgstr "Lire/Ecrire des séquences GPGSA"
+
+msgid "Read/write GPRMC sentences"
+msgstr "Lire/Ecrire des séquences GPRMC "
+
+msgid "Read/write GPVTG sentences"
+msgstr "Lire/ECrire des séquences GPVTG"
+
+msgid "Read/Write time format (i.e. HH:mm:ss xx)"
+msgstr "Lire/Ecrire le format horaire (i.e. HH:mm:ss xx)"
+
+msgid "Retain at most this number of position points  (0 = unlimited)"
+msgstr "Retenir au maximum ce nombre de points de positions  (0 = illimité)"
+
+msgid "Return current position as a waypoint"
+msgstr "Renvoyer la position courante en tant que balise"
+
+msgid "Road type changes"
+msgstr "Changement de type de route"
+
+msgid "Set waypoint name to source filename."
+msgstr "Faire correspondre les nom de la balise au nom du fichier source."
+
+msgid "Shortname is MAC address"
+msgstr "Le nom court est l'adresse MAC"
+
+msgid "Speed in bits per second of serial port (baud=4800)"
+msgstr "Vitesse du port série en bits  par seconde (baud=4800)"
+
+msgid "Split input into separate files"
+msgstr "Découper l'entrée en fichiers séparés"
+
+msgid "Split into multiple routes at turns"
+msgstr "Séparer en plusieurs routes à chaque virage"
+
+msgid "Starting seed of the internal number generator"
+msgstr "Racine du générateur de nombres internes"
+
+msgid "Stealth encrypted icon name"
+msgstr "Récupérer les noms d'icones encryptés"
+
+msgid "Stealth non-encrypted icon name"
+msgstr "Récupérer les noms d'icones non encryptés"
+
+msgid "String to separate concatenated address fields (default=\", \")"
+msgstr "Chaine de caractère pour séparer les champs d'adresse (\", \" par défaut)"
+
+msgid "Suppress labels on generated pins"
+msgstr "Supprimer les labels des points créés"
+
+msgid "Suppress retired geocaches"
+msgstr "Suypprimer les géocaches désactivées"
+
+msgid "Suppress separator lines between waypoints"
+msgstr "Supprimer les lignes séparatrices entre les balises"
+
+msgid "Suppress use of handshaking in name of speed"
+msgstr "Supprimer les controles pour améliorer les performances"
+
+msgid "Suppress whitespace in generated shortnames"
+msgstr "Supprimer les espaces dans les noms courts générés"
+
+msgid "Symbol to use for point data"
+msgstr "Symbole à utiliser pour les données de type point"
+
+msgid "Sync GPS time to computer time"
+msgstr "Synchroniser l'heure du GPS avec l'heure du PC"
+
+msgid "Synthesize track times"
+msgstr "Simplifier l'horodatage des traces"
+
+msgid "Target GPX version for output"
+msgstr "Version du fichier GPX pour la sortie"
+
+msgid "Temperature unit [c=Celsius, f=Fahrenheit]"
+msgstr "Unité de température (c=Celsius, f=Farenheit)"
+
+msgid "The icon description is already the marker"
+msgstr "Les description de l'icon est identique au marqueur"
+
+msgid "Treat waypoints as icons on write"
+msgstr "Traiter les balises comme des icônes à l'écriture"
+
+msgid "Type of .an1 file"
+msgstr "Type de fichier .an1"
+
+msgid "Units for altitude (f)eet or (m)etres"
+msgstr "Unités d'altitude (p)ieds ou (m)ètres"
+
+msgid "Units used for names with @speed ('s'tatute or 'm'etric)"
+msgstr "Unités utilisées avec @vitess ('s'tatute ou 'm'étrique)"
+
+msgid "Units used when writing comments ('s'tatute or 'm'etric)"
+msgstr "Unités utilisée lors de l'écriture de commentiares ('s'tatute ou 'm'étrique)"
+
+msgid "UPPERCASE synth. shortnames"
+msgstr "Noms courts en MAJUSCULE"
+
+msgid "Use depth values on output (default is ignore)"
+msgstr "Utiliser les valeurs de profondeur sur la sortie (par défaut : ignorer)"
+
+msgid "Use proximity values on output (default is ignore)"
+msgstr "Utiliser les valeurs de proximité sur la sortie (par défaut : ignorer)"
+
+msgid "Use shortname instead of description"
+msgstr "Utiliser le nom court au lieu de la description"
+
+msgid "Use specified bitmap on output"
+msgstr "Utiliser l'images spécifiée en sortie"
+
+msgid "Version of gdb file to generate (1..3)"
+msgstr "Version du fichier gbd à générer (1..3)"
+
+msgid "Version of mapsource file to generate (3,4,5)"
+msgstr "Version du fichier mapsource à créer (3,4,5)"
+
+msgid "Waypoint background color"
+msgstr "Couleur de fond de la balise"
+
+msgid "Waypoint foreground color"
+msgstr "Couleur de la balise"
+
+msgid "Waypoint type"
+msgstr "Type de balise"
+
+msgid "Width in pixels of map"
+msgstr "Largeur de la carte en pixels"
+
+msgid "Width of lines, in pixels"
+msgstr "Largeur des lignes en pixels"
+
+msgid "Write additional node tag key/value pairs"
+msgstr "Ecrire des étiquettes de noeuds additionnelles clé/valeurs"
+
+msgid "Write additional way tag key/value pairs"
+msgstr "Ecrire des étiquettes de chemins additionnelles clé/valeurs"
+
+msgid "Write all tracks into one file"
+msgstr "Ecrire toutes les traces dans un fichier"
+
+msgid "Write description to address field"
+msgstr "Ecrire la description dans le champ d'adresse"
+
+msgid "Write each waypoint in a separate file"
+msgstr "Ecrire chaque balise dans un fichier séparé"
+
+msgid "Write notes to address field"
+msgstr "Ecrire les notes dans le champ d'adresse"
+
+msgid "Write position to address field"
+msgstr "Ecrire la position dans le champ d'adresse"
+
+msgid "Write position using this grid."
+msgstr "Ecrire la position en utilisant cette grille."
+
+msgid "Write timestamps with offset x to UTC time"
+msgstr "Ecrire l'horodatage avec un décalage de x par rapport à l'heure UTC"
+
+msgid "Write tracks compatible with Carto Exploreur"
+msgstr "Ecrire des traces compatibles avec CartoExploreur"
+
+msgid "Write tracks for Gisteq Phototracker"
+msgstr "Ecrire les traces pour Gisteq Phototracker"
+
+msgid "Zoom level to reduce points"
+msgstr "Niveau de zoom pour réduire les points"
+
index d5bb6e324df628c06aedc30b5cf7b3b32c8e18f3..c96fa987136297c42e6347653f135c3d7454b7a6 100644 (file)
@@ -1,13 +1,15 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: \n"
+"Project-Id-Version: GPSBabel command line program\n"
 "POT-Creation-Date: \n"
-"PO-Revision-Date: 2007-06-07 02:09+0100\n"
+"PO-Revision-Date: 2008-04-27 10:58+0100\n"
 "Last-Translator: Sprok Bence <sprok.bence@gmail.com>\n"
-"Language-Team: \n"
+"Language-Team: Sprok Bence <sprok.bence@gmail.com>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Hungarian\n"
+"X-Poedit-Country: HUNGARY\n"
 
 msgid "(integer sec or 'auto') Barograph to GPS time diff"
 msgstr "Barométer adatok GPS pozícióba (másodperc vagy 'auto')"
@@ -24,6 +26,9 @@ msgstr "Ad-hoc zárt hálózat ikonnév"
 msgid "Ad-hoc open icon name"
 msgstr "Ad-hoc nyílt hálózat ikonnév"
 
+msgid "After output job done sleep n second(s)"
+msgstr "Feltöltés után x másodperccel kikapcsolás"
+
 msgid "Allow whitespace synth. shortnames"
 msgstr "Szóközök engedélyezése rövidnevek készítésekor"
 
@@ -42,6 +47,9 @@ msgstr "Alapért. URL a hivatkozásokban"
 msgid "Basename prepended to URL on output"
 msgstr "URL előtag eléfűzése a kimenetben"
 
+msgid "Bitmap of categories"
+msgstr "Raszter kategória"
+
 msgid "Category name (Cache)"
 msgstr "Kategória név (Cache)"
 
@@ -57,6 +65,9 @@ msgstr "Zárásként a készülék kikapcsolása"
 msgid "Complete date-free tracks with given date (YYYYMMDD)."
 msgstr "Dátum nélküli nyomvonalak új időpontja (ÉÉÉÉHHNN)"
 
+msgid "Create unique waypoint names (default = yes)"
+msgstr "Egyedi útpont nevek (alapért. = igen)"
+
 msgid "Create waypoints from geocache log entries"
 msgstr "Útpontok készítése a geocaching bejegyzésekből"
 
@@ -75,6 +86,9 @@ msgstr "Ennyi nap után a pontok elévültnek számítanak"
 msgid "Decimal seconds to pause between groups of strings"
 msgstr "Ennyi másodpercnyi szünet az adatfolyamban"
 
+msgid "Default category on output"
+msgstr "Alapért. kimeneti kategória"
+
 msgid "Default category on output (1..16)"
 msgstr "Alapértelmezett kimeneti kategória (1.. 16)"
 
@@ -84,12 +98,24 @@ msgstr "Alapértelmezett ikonnév"
 msgid "Default location"
 msgstr "Alapértelmezett pozíció"
 
+msgid "Default proximity"
+msgstr "Alapért. távolság"
+
+msgid "Default speed"
+msgstr "Alapért. sebesség"
+
 msgid "Default speed for waypoints (knots/hr)"
 msgstr "Alapértelmezett sebesség a pontokhoz (csomó/ó)"
 
 msgid "Degrees output as 'ddd', 'dmm'(default) or 'dms'"
 msgstr "Pozíció formátum 'fff', 'fpp'(alapért.) vagy 'fpm'"
 
+msgid "Delete all routes"
+msgstr "Minden útvonal törlése"
+
+msgid "Delete all track points"
+msgstr "Minden nyomvonalpont törlése"
+
 msgid "Delete all waypoints"
 msgstr "Minden útpont törlése"
 
@@ -102,12 +128,21 @@ msgstr "Távolság mértékegysége [m=metrikus, s=angolszász]"
 msgid "Do not add geocache data to description"
 msgstr "Geocaching információk kihagyása a megjegyzésből"
 
+msgid "Do not add URLs to description"
+msgstr "URL mező kihagyása a megjegyzésből"
+
+msgid "Don't show gpi bitmap on device"
+msgstr "gpi raszter rejtése a készüléken"
+
 msgid "Draw extrusion line from trackpoint to ground"
 msgstr "Meghosszabított vonal rajzolása útponttól felszínig"
 
 msgid "Drop route points that do not have an equivalent waypoint (hidden points)"
 msgstr "Útvonalpont elhagyása, aminek nincs megegyező útpontja (rejtett pontok)"
 
+msgid "Enable alerts on speed or proximity distance"
+msgstr "Figyelmeztetés engedélyezése sebességnél vagy közeledéskor"
+
 msgid "Encrypt hints using ROT13"
 msgstr "Megjegyzések kódolása ROT13 használatával"
 
@@ -126,6 +161,9 @@ msgstr "Hely-jelölések exportálása nyomvonalakba és útvonalakba"
 msgid "Full path to XCSV style file"
 msgstr "Teljes elérési út a XCSV fájlban"
 
+msgid "Generate # points"
+msgstr "# pontok készítése"
+
 msgid "Generate file with lat/lon for centering map"
 msgstr "Szélesség/hosszúság használata térképi kalibráláshoz"
 
@@ -138,8 +176,8 @@ msgstr "GPS dátum (alapért. WGS 84)"
 msgid "Height in pixels of map"
 msgstr "Magasság a térképen (pixel)"
 
-msgid "Ignore event marker icons"
-msgstr "Esemény jelző ikonok kihagyása"
+msgid "Ignore event marker icons on read"
+msgstr "Esemény pontok kihagyása"
 
 msgid "Include extended data for trackpoints (default = 1)"
 msgstr "Bővített információk használata a nyomvonalakban (alapért.=1)"
@@ -177,6 +215,9 @@ msgstr "Nyomvonalak indexelése íráshoz (ha több mint egy van a forrásban)"
 msgid "Index of URL field in .dbf"
 msgstr "URL mező hivatkozása a .dbf fájlban"
 
+msgid "Indicate direction of travel in track icons (default = 0)"
+msgstr "Irány mutatása a nyomvonal ikonjánál"
+
 msgid "Infrastructure closed icon name"
 msgstr "Zárt HotSpot ikonnév"
 
@@ -228,6 +269,9 @@ msgstr "Előállított rövidnevek max. hosszúsága"
 msgid "Merge output with existing file"
 msgstr "A jelenleg és a kész fájl összefűzése"
 
+msgid "MTK compatible CSV output file"
+msgstr "MTK kompatibilis CSV készítés"
+
 msgid "Name of the 'unassigned' category"
 msgstr "Az 'unassigned' kategória neve"
 
@@ -261,6 +305,9 @@ msgstr "Hivatkozás HTML style sheet-be"
 msgid "Precision of coordinates"
 msgstr "Koordináták pontossága"
 
+msgid "Proximity distance"
+msgstr "Közelesédi riasztás értéke"
+
 msgid "Radius for circles"
 msgstr "Kör sugara"
 
@@ -300,6 +347,9 @@ msgstr "Visszatérés a jelenlegi pozícióba, mint útpont"
 msgid "Road type changes"
 msgstr "Út típus változások"
 
+msgid "Set waypoint name to source filename."
+msgstr "Útpont név szinkronizálása a forrással"
+
 msgid "Shortname is MAC address"
 msgstr "A rövidnév, mint MAC cím"
 
@@ -312,6 +362,9 @@ msgstr "Beviteli adatok darabolása külön fájlokba"
 msgid "Split into multiple routes at turns"
 msgstr "Összetett útvonalakba és fordulópontokba darabolás"
 
+msgid "Starting seed of the internal number generator"
+msgstr "Kezdőérték a belső indexhez"
+
 msgid "Stealth encrypted icon name"
 msgstr "Titkosan kódolt ikonnevek"
 
@@ -339,6 +392,9 @@ msgstr "Szóközök elhagyása a készülő rövidnevekben"
 msgid "Symbol to use for point data"
 msgstr "Útpontok szimbóluma"
 
+msgid "Sync GPS time to computer time"
+msgstr "GPS idő szinkronizálása a számítógéppel"
+
 msgid "Synthesize track times"
 msgstr "Nyomvonal idejének előállítása"
 
@@ -351,12 +407,18 @@ msgstr "Hőmérséklet mértékegysége [c=Celsius, f=Fahrenheit]"
 msgid "The icon description is already the marker"
 msgstr "Az ikon meghatározás már a pontjelzőben"
 
+msgid "Treat waypoints as icons on write"
+msgstr "Útpontok ikonként való kezelése íráskor"
+
 msgid "Type of .an1 file"
 msgstr "A .an1 fájl típusa"
 
 msgid "Units for altitude (f)eet or (m)etres"
 msgstr "Magasság mértékegysége (méter vagy láb)"
 
+msgid "Units used for names with @speed ('s'tatute or 'm'etric)"
+msgstr "Sebesség mértékegysége a neveknél ('s' angolszász vagy 'm' metrikus)"
+
 msgid "Units used when writing comments ('s'tatute or 'm'etric)"
 msgstr "Mértékegység használata a megjegyzésben ('s' angolszász vagy 'm' metrikus)"
 
@@ -372,6 +434,9 @@ msgstr "Pontossági érték használata a kimenetben (alapért. nincs)"
 msgid "Use shortname instead of description"
 msgstr "Rövid név használata a megyjegyzés helyett"
 
+msgid "Use specified bitmap on output"
+msgstr "Meghatározott raszter használata a kimenetben"
+
 msgid "Version of gdb file to generate (1..3)"
 msgstr "A készülő gdb fájl típusa (1..3)"
 
@@ -393,6 +458,27 @@ msgstr "Térképi szélesség (pixel)"
 msgid "Width of lines, in pixels"
 msgstr "Vonalvastagság (pixel)"
 
+msgid "Write additional node tag key/value pairs"
+msgstr "További kulcs/érték címkepár írása (pont)"
+
+msgid "Write additional way tag key/value pairs"
+msgstr "További kulcs/érték címkepár írása (út)"
+
+msgid "Write all tracks into one file"
+msgstr "Az összes nyomvonal összefűzése egy fájlba"
+
+msgid "Write description to address field"
+msgstr "Megjegyzést a cím mezőbe"
+
+msgid "Write each waypoint in a separate file"
+msgstr "Minden útpont külön fájlba"
+
+msgid "Write notes to address field"
+msgstr "Megjegyzés írása a cím megjegyzésbe"
+
+msgid "Write position to address field"
+msgstr "Pozíció írása a cím megjegyzésbe"
+
 msgid "Write position using this grid."
 msgstr "Pozíció készítése ezzel a ráccsal"
 
@@ -402,6 +488,9 @@ msgstr "Időértékek eltolása x értékkel UTC-hez képest"
 msgid "Write tracks compatible with Carto Exploreur"
 msgstr "Carto Exploreur kompatibilis nyomvonal készítése"
 
+msgid "Write tracks for Gisteq Phototracker"
+msgstr "Gisteq Phototracker kompatibilis nyomvonal készítése"
+
 msgid "Zoom level to reduce points"
 msgstr "Zoom-szint a pontok szelektálásához"
 
index 09f755c0d2ab3342e38a625f0c8c1da438cec170..6561c8ccab00fdb09d14b5cc55a5fb142f009bf3 100644 (file)
Binary files a/win32/gui-2/main.dfm and b/win32/gui-2/main.dfm differ
index 05d6d4d1b688359ffa6ded45a57d501a4ae53510..c90c8a77de23e1b8b89789ad9cc47b370af64437 100644 (file)
@@ -1,7 +1,9 @@
 unit main;\r
 \r
 {\r
-    Copyright (C) 2005,2006 Olaf Klein, o.b.klein@gpsbabel.org\r
+    GPSBabelGUI main unit/formular\r
+\r
+    Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org\r
 \r
     This program is free software; you can redistribute it and/or modify\r
     it under the terms of the GNU General Public License as published by\r
@@ -34,8 +36,8 @@ type
     cbRoutes: TCheckBox;\r
     cbTracks: TCheckBox;\r
     lbWhat: TLabel;\r
-    OpenDialog: TOpenDialog;\r
-    SaveDialog: TSaveDialog;\r
+    dlgFileOpen: TOpenDialog;\r
+    dlgFileSave: TSaveDialog;\r
     wptInputOK: TSpeedButton;\r
     ImageList1: TImageList;\r
     wptOutputOK: TSpeedButton;\r
@@ -44,13 +46,10 @@ type
     trkInputOK: TSpeedButton;\r
     trkOutputOK: TSpeedButton;\r
     ActionList1: TActionList;\r
-    acConvert: TAction;\r
-    btnFilter: TBitBtn;\r
+    acLetsGo: TAction;\r
     acFilterSelect: TAction;\r
-    btnProcess: TBitBtn;\r
-    memoOutput: TMemo;\r
     stbMain: TStatusBar;\r
-    MainMenu1: TMainMenu;\r
+    mnuMain: TMainMenu;\r
     mnuFile: TMenuItem;\r
     mnuExit: TMenuItem;\r
     acFileExit: TAction;\r
@@ -60,7 +59,7 @@ type
     Intro1: TMenuItem;\r
     About1: TMenuItem;\r
     mnuReadme: TMenuItem;\r
-    acHelpReadme: TAction;\r
+    acHelpDoc: TAction;\r
     N1: TMenuItem;\r
     mnuOptions: TMenuItem;\r
     mnuSynthesizeShortNames: TMenuItem;\r
@@ -110,13 +109,36 @@ type
     mnuDebug: TMenuItem;\r
     Createoptionspo1: TMenuItem;\r
     acFileChangeLanguage: TAction;\r
-    Changelanguage1: TMenuItem;\r
+    mnuChangeLanguage: TMenuItem;\r
     N5: TMenuItem;\r
     acFileExportCSV: TAction;\r
     Createoptionscsv1: TMenuItem;\r
     File1: TMenuItem;\r
     Createoptionscsv2: TMenuItem;\r
     sdOptional: TSaveDialog;\r
+    PopupMenu: TPopupMenu;\r
+    acSelectAll: TAction;\r
+    pmnuSelectAll: TMenuItem;\r
+    acCopySelected: TAction;\r
+    pmnuCopySelected: TMenuItem;\r
+    pmnuClearOutput: TMenuItem;\r
+    pmnuOutputtoscreen: TMenuItem;\r
+    acOptionsSynthesizeShortNames: TAction;\r
+    pmnuSynthesizeshortnames: TMenuItem;\r
+    pmnu6: TMenuItem;\r
+    pmnu7: TMenuItem;\r
+    pmnuForsourceformat: TMenuItem;\r
+    pmuFortargetformat: TMenuItem;\r
+    pmnu8: TMenuItem;\r
+    pmnuLetsgo: TMenuItem;\r
+    memoOutput: TMemo;\r
+    pmnuEnablecharactersettransformation: TMenuItem;\r
+    acOptionsNukeTypes: TAction;\r
+    pmnuForceselectedGPSdatatypesnuketypesfilter: TMenuItem;\r
+    pmnu9: TMenuItem;\r
+    pmnuFilter: TMenuItem;\r
+    btnFilter: TBitBtn;\r
+    btnProcess: TBitBtn;\r
     procedure FormShow(Sender: TObject);\r
     procedure FormCreate(Sender: TObject);\r
     procedure OpenButtonClick(Sender: TObject);\r
@@ -127,7 +149,7 @@ type
     procedure cbRoutesClick(Sender: TObject);\r
     procedure cbTracksClick(Sender: TObject);\r
     procedure sbSaveFileClick(Sender: TObject);\r
-    procedure acConvertExecute(Sender: TObject);\r
+    procedure acLetsGoExecute(Sender: TObject);\r
     procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);\r
     procedure acFilterSelectExecute(Sender: TObject);\r
     procedure acFileExitExecute(Sender: TObject);\r
@@ -135,8 +157,7 @@ type
     procedure chbInputDeviceClick(Sender: TObject);\r
     procedure FormClose(Sender: TObject; var Action: TCloseAction);\r
     procedure chbOutputDeviceClick(Sender: TObject);\r
-    procedure acHelpReadmeExecute(Sender: TObject);\r
-    procedure mnuSynthesizeShortNamesClick(Sender: TObject);\r
+    procedure acHelpDocExecute(Sender: TObject);\r
     procedure edOutputFileKeyPress(Sender: TObject; var Key: Char);\r
     procedure cbInputFormatDeviceChange(Sender: TObject);\r
     procedure cbOutputFormatDeviceChange(Sender: TObject);\r
@@ -147,7 +168,6 @@ type
     procedure btnInputOptsClick(Sender: TObject);\r
     procedure acFileClearMemoExecute(Sender: TObject);\r
     procedure acFinalizeDropDownsExecute(Sender: TObject);\r
-    procedure mnuOptionsForceDataTypeClick(Sender: TObject);\r
     procedure acOptionsEnableCharactersetTransformationExecute(\r
       Sender: TObject);\r
     procedure acFileOutputToScreenExecute(Sender: TObject);\r
@@ -156,6 +176,11 @@ type
     procedure acFileExportCSVExecute(Sender: TObject);\r
     procedure cbOutputDeviceChange(Sender: TObject);\r
     procedure cbInputDeviceChange(Sender: TObject);\r
+    procedure acSelectAllExecute(Sender: TObject);\r
+    procedure acCopySelectedExecute(Sender: TObject);\r
+    procedure PopupMenuPopup(Sender: TObject);\r
+    procedure acOptionsSynthesizeShortNamesExecute(Sender: TObject);\r
+    procedure acOptionsNukeTypesExecute(Sender: TObject);\r
   private\r
     { Private-Deklarationen }\r
     FCaps: TCapabilities;\r
@@ -192,7 +217,7 @@ var
 implementation\r
 \r
 uses\r
-  filter, about, readme, options, select;\r
+  filter, about, options, select;\r
 \r
 {$R *.DFM}\r
 \r
@@ -282,9 +307,10 @@ end;
 procedure TfrmMain.FormCreate(Sender: TObject);\r
 begin\r
   MakeFirstTranslation(Self);\r
-\r
   FFirstShow := True;\r
 \r
+  RestoreBounds('main_form', Self);\r
+\r
   TP_Ignore(mnuDebug, 'mnuDebug');\r
 {$IFOPT D-}\r
   mnuDebug.Visible := False;\r
@@ -296,8 +322,8 @@ begin
   FCaps := TCapabilities.Create;\r
   FOpts := TOptions.Create(FCaps);\r
 \r
-  OpenDialog.InitialDir := ReadProfile(OpenDialog.Tag);\r
-  SaveDialog.InitialDir := ReadProfile(SaveDialog.Tag);\r
+  dlgFileOpen.InitialDir := ReadProfile(dlgFileOpen.Tag);\r
+  dlgFileSave.InitialDir := ReadProfile(dlgFileSave.Tag);\r
 \r
   if not ComboBoxSelect(cbInputDevice, ReadProfile(cbInputDevice.Tag)) then\r
     cbInputDevice.ItemIndex := 0;\r
@@ -346,8 +372,8 @@ begin
 \r
     FCaps.List := l;\r
     FOpts.List := l;\r
-    InitCombo(cbInputFormatDevice, False, True);\r
-    InitCombo(cbOutputFormatDevice, True, True);\r
+    InitCombo(cbInputFormatDevice, True, True);\r
+    InitCombo(cbOutputFormatDevice, False, True);\r
     InitCombo(cbInputFormat, True, False);\r
     InitCombo(cbOutputFormat, False, False);\r
   finally\r
@@ -358,7 +384,15 @@ end;
 procedure TfrmMain.FormShow(Sender: TObject);\r
 begin\r
   if not(FFirstShow) then Exit;\r
-  \r
+\r
+{$IFDEF VER120}\r
+  // --------------------\r
+  // Bug (?) Delphi4-Std./Sp3\r
+  FixAlign(btnProcess, 8);\r
+  FixAlign(btnFilter, 16, btnProcess);\r
+  // --------------------\r
+{$ENDIF}\r
+\r
   FFirstShow := False;\r
   PostMessage(SELF.Handle, WM_STARTUP, 0, 0); // keep sure our window is visible\r
 end;\r
@@ -374,7 +408,7 @@ begin
 \r
   // ? valid README form\r
   s := ExtractFilePath(ParamStr(0)) + 'gpsbabel.html';\r
-  acHelpReadme.Enabled := FileExists(s) or (frmReadme.Memo.Lines.Count > 0);\r
+  acHelpDoc.Enabled := FileExists(s);\r
 \r
   InitializeSerialPorts;\r
 end;\r
@@ -407,18 +441,28 @@ end;
 procedure TfrmMain.OpenButtonClick(Sender: TObject);\r
 var\r
   s: string;\r
+  i: Integer;\r
 begin\r
-  OpenDialog.Filter := '';\r
-  OpenDialog.DefaultExt := '*.*';\r
+  dlgFileOpen.Filter := '';\r
+  dlgFileOpen.DefaultExt := '*.*';\r
 \r
   if (cbInputFormat.Text <> '') then\r
     s := cbInputFormat.Text + '|*.' + FCaps.GetExt(cbInputFormat.Text) + '|';\r
   s := s + _('All files|*.*');\r
 \r
-  OpenDialog.Filter := s;\r
-  if not SELF.OpenDialog.Execute then Exit;\r
+  dlgFileOpen.Filter := s;\r
+  if not SELF.dlgFileOpen.Execute then Exit;\r
+\r
+  edInputFile.Text := '';\r
+  for i := 0 to dlgFileOpen.Files.Count - 1 do\r
+  begin\r
+    s := dlgFileOpen.Files[i];\r
+    if (s[1] <> '"') or (s[Length(s)] <> '"') then\r
+      s := AnsiQuotedStr(s, '"');\r
+    if (edInputFile.Text <> '') then edInputFile.Text := edInputFile.Text + ', ';\r
+    edInputFile.Text := edInputFile.Text + s;\r
+  end;\r
 \r
-  edInputFile.Text := OpenDialog.FileName;\r
   CheckInput;\r
 end;\r
 \r
@@ -466,7 +510,6 @@ begin
     ac := acOptionsSourceFormat;\r
     acOptionsSourceFormat.Caption := _('Input') + ': ' + Format;\r
     btnInputOpts.Caption := '';\r
-//  ImageList1.GetBitmap(11, btnInputOpts.Glyph);\r
   end\r
   else begin\r
     edOutputOpts.Text := '';\r
@@ -475,7 +518,6 @@ begin
     ac := acOptionsTargetFormat;\r
     acOptionsTargetFormat.Caption := _('Output') + ': ' + Format;\r
     btnOutputOpts.Caption := '';\r
-//  ImageList1.GetBitmap(11, btnOutputOpts.Glyph);\r
   end;\r
 \r
   ac.Enabled := FOpts.HasFormatOpts(Format);\r
@@ -496,7 +538,7 @@ end;
 \r
 procedure TfrmMain.CheckInput;\r
 begin\r
-  acConvert.Enabled :=\r
+  acLetsGo.Enabled :=\r
   (cbWaypoints.Checked or cbRoutes.Checked or cbTracks.Checked)\r
   and\r
    (\r
@@ -542,33 +584,34 @@ procedure TfrmMain.sbSaveFileClick(Sender: TObject);
 var\r
   s: string;\r
 begin\r
-  SaveDialog.Filter := '';\r
-  SaveDialog.DefaultExt := '*.*';\r
+  dlgFileSave.Filter := '';\r
+  dlgFileSave.DefaultExt := '*.*';\r
 \r
   if (cbOutputFormat.Text <> '') then\r
     s := cbOutputFormat.Text + '|*.' + FCaps.GetExt(cbOutputFormat.Text) + '|';\r
   s := s + _('All files|*.*');\r
 \r
-  SaveDialog.Filter := s;\r
-  if not SELF.SaveDialog.Execute then Exit;\r
+  dlgFileSave.Filter := s;\r
+  if not SELF.dlgFileSave.Execute then Exit;\r
 \r
-  edOutputFile.Text := SaveDialog.FileName;\r
+  edOutputFile.Text := dlgFileSave.FileName;\r
   CheckInput;\r
 end;\r
 \r
-procedure TfrmMain.acConvertExecute(Sender: TObject);\r
+procedure TfrmMain.acLetsGoExecute(Sender: TObject);\r
 var\r
   cmdline: string;\r
-  list: TStrings;\r
+  list, files: TStrings;\r
   CSave: TCursor;\r
   str: TStream;\r
   s, tmp: string;\r
   i: Integer;\r
-  IFormat, OFormat: string;\r
+  IFormat, OFormat, IFiles: string;\r
   Fatal: Boolean;\r
+  sp: PChar;\r
 \r
 begin\r
-  btnProcess.Enabled := False;\r
+  acLetsGo.Enabled := False;\r
   try\r
     acFinalizeDropDownsExecute(nil);\r
 \r
@@ -588,20 +631,34 @@ begin
     if cbRoutes.Checked then cmdline := cmdline + ' -r';\r
     if cbTracks.Checked then cmdline := cmdline + ' -t';\r
 \r
-    if mnuSynthesizeShortNames.Checked then cmdline := cmdline + ' -s';\r
+    if acOptionsSynthesizeShortNames.Checked then cmdline := cmdline + ' -s';\r
 \r
     if chbInputDevice.Checked then\r
     begin\r
-      s := SysUtils.AnsiLowerCase(cbInputDevice.Text) + ':';\r
+      IFiles := '-f ' + SysUtils.AnsiLowerCase(cbInputDevice.Text) + ':';\r
 //    if (s = 'usb:') then\r
 //      s := s + '-1';\r
     end\r
       else\r
     begin\r
-      s := edInputFile.Text;\r
-      if not(FileExists(s)) then\r
-      raise eGPSBabelError.CreateFmt(_('File %s not found.'), [s]);\r
-      s := '"' + s + '"';\r
+     IFiles := '';\r
+     files := TStringList.Create;\r
+      try\r
+        if (edInputFile.Text[1] <> '"') then\r
+          files.CommaText := AnsiQuotedStr(edInputFile.Text, '"')\r
+        else\r
+          files.CommaText := edInputFile.Text;\r
+        for i := 0 to files.Count - 1 do\r
+        begin\r
+          s := files.Strings[i];\r
+          if not(FileExists(s)) then\r
+            raise eGPSBabelError.CreateFmt(_('File %s not found.'), [s]);\r
+          if (IFiles <> '') then IFiles := IFiles + ' ';\r
+          IFiles := IFiles + '-f ' + AnsiQuotedStr(s, '"');\r
+        end;\r
+      finally\r
+        files.Free;\r
+      end;\r
     end;\r
 \r
     // Input character set\r
@@ -612,17 +669,17 @@ begin
         [cmdline, cbInputLang.Text]);\r
 \r
     if (Trim(edInputOpts.Text) <> '') then\r
-      cmdline := Format('%s -i %s,%s -f %s',\r
-        [cmdline, IFormat, Trim(edInputOpts.Text), s])\r
+      cmdline := Format('%s -i %s,%s %s',\r
+        [cmdline, IFormat, Trim(edInputOpts.Text), IFiles])\r
     else\r
-      cmdline := Format('%s -i %s -f %s',\r
-        [cmdline, IFormat, s]);\r
+      cmdline := Format('%s -i %s %s',\r
+        [cmdline, IFormat, IFiles]);\r
 \r
     if mnuOptionsForceDataType.Checked then\r
     begin\r
       s := '';\r
       if not(cbWaypoints.Checked) then\r
-        s := s + ',waypoints'; \r
+        s := s + ',waypoints';\r
       if not(cbRoutes.Checked) then\r
         s := s + ',routes';\r
       if not(cbTracks.Checked) then\r
@@ -654,23 +711,30 @@ begin
       end;\r
     end\r
     else begin\r
-      s := edOutputFile.Text;\r
+      s := Trim(edOutputFile.Text);\r
+      if (s <> '') and (s[1] <> '"') then s := AnsiQuotedStr(s, '"');\r
+      if (CharCount(s, '"') mod 2 <> 0) then\r
+      begin\r
+        MessageDlg(_('Invalid usage of character ''"''!'), mtError, [mbOK], 0);\r
+        Exit;\r
+      end;\r
+      sp := PChar(s);\r
+      tmp := AnsiExtractQuotedStr(sp, '"');\r
+      if (tmp <> '') then s := tmp;\r
 \r
       if (s <> '-') then\r
       begin\r
         if FileExists(s) then\r
         begin\r
-          tmp := _('Warning');\r
-          if (Windows.MessageBox(SELF.Handle,\r
-            PChar(Format(_('File "%s" exists ! Overwrite ?'), [s])),\r
-            PChar(tmp), MB_YESNO) <> IDYES) then Exit;\r
+          if (MessageDlg(Format(_('File "%s" exists ! Overwrite ?'), [s]),\r
+            mtWarning, [mbYes, mbNO], 0) <> mrYes) then Exit;\r
         end\r
           else\r
         begin\r
           str := TFileStream.Create(s, fmCreate);\r
           str.Free;\r
         end;\r
-        s := '"' + s + '"';\r
+        s := AnsiQuotedStr(s, '"');\r
       end\r
       else\r
         s := '-';\r
@@ -691,8 +755,8 @@ begin
     CSave := Cursor;\r
     list := TStringList.Create;\r
     try\r
-      Cursor := crHourGlass;\r
-      Application.ProcessMessages;\r
+      Cursor := crHourGlass;       // doesn't work ???\r
+      Application.ProcessMessages; // doesn't work ???\r
       Sleep(50);\r
 \r
       if not gpsbabel(cmdline, list, @Fatal, False) then\r
@@ -718,7 +782,7 @@ begin
     end;\r
 \r
   finally\r
-    btnProcess.Enabled := True;\r
+    acLetsGo.Enabled := True;\r
   end;\r
 end;\r
 \r
@@ -875,16 +939,22 @@ procedure TfrmMain.StoreProfiles;
 var\r
   s: string;\r
 begin\r
-  s := SysUtils.ExtractFilePath(edInputFile.Text);\r
+  if (dlgFileOpen.Files.Count > 0) then\r
+    s := SysUtils.ExtractFilePath(dlgFileOpen.Files[0])\r
+  else\r
+    s := SysUtils.ExtractFilePath(dlgFileOpen.FileName);\r
   if (s <> '') then\r
-    StoreProfile(OpenDialog.Tag, s);\r
-  s := SysUtils.ExtractFilePath(edOutputFile.Text);\r
+    StoreProfile(dlgFileOpen.Tag, s);\r
+  if (edOutputFile.Text = '-') then\r
+    s := dlgFileSave.InitialDir\r
+  else\r
+    s := SysUtils.ExtractFilePath(edOutputFile.Text);\r
   if (s <> '') then\r
-    StoreProfile(SaveDialog.Tag, s);\r
+    StoreProfile(dlgFileSave.Tag, s);\r
   StoreProfile(cbInputFormat.Tag, cbInputFormat.Text);\r
   StoreProfile(cbOutputFormat.Tag, cbOutputFormat.Text);\r
   StoreProfile(cbInputDevice.Tag, cbInputDevice.Text);\r
-  StoreProfile(cbInputFormatDevice.Tag, cbInputFormatDevice.Text); \r
+  StoreProfile(cbInputFormatDevice.Tag, cbInputFormatDevice.Text);\r
   StoreProfile(cbOutputDevice.Tag, cbOutputDevice.Text);\r
   StoreProfile(cbOutputFormatDevice.Tag, cbOutputFormatDevice.Text);\r
   StoreProfile(edInputFile.Tag, edInputFile.Text);\r
@@ -894,6 +964,7 @@ end;
 procedure TfrmMain.FormClose(Sender: TObject; var Action: TCloseAction);\r
 begin\r
   StoreProfiles;\r
+  StoreBounds('main_form', Self);\r
 end;\r
 \r
 procedure TfrmMain.chbOutputDeviceClick(Sender: TObject);\r
@@ -925,23 +996,13 @@ begin
   CheckInput;\r
 end;\r
 \r
-procedure TfrmMain.acHelpReadmeExecute(Sender: TObject);\r
+procedure TfrmMain.acHelpDocExecute(Sender: TObject);\r
 var\r
   s: string;\r
 begin\r
   s := ExtractFilePath(ParamStr(0)) + 'gpsbabel.html';\r
   if FileExists(s) then\r
     WinOpenFile(s, '')   // new gpsbabel.html\r
-  else begin // show the old readme\r
-    if (frmReadme = nil) then\r
-      Application.CreateForm(TfrmReadme, frmReadme);\r
-    frmReadme.ShowModal;\r
-  end;\r
-end;\r
-\r
-procedure TfrmMain.mnuSynthesizeShortNamesClick(Sender: TObject);\r
-begin\r
-  mnuSynthesizeShortNames.Checked := not(mnuSynthesizeShortNames.Checked);\r
 end;\r
 \r
 procedure TfrmMain.edOutputFileKeyPress(Sender: TObject; var Key: Char);\r
@@ -1067,11 +1128,6 @@ begin
   acFinalizeDropDowns.Execute;\r
 end;\r
 \r
-procedure TfrmMain.mnuOptionsForceDataTypeClick(Sender: TObject);\r
-begin\r
-  mnuOptionsForceDataType.Checked := not(mnuOptionsForceDataType.Checked);\r
-end;\r
-\r
 procedure TfrmMain.acOptionsEnableCharactersetTransformationExecute(\r
   Sender: TObject);\r
 begin\r
@@ -1106,6 +1162,7 @@ begin
     edOutputFile.Color := edInputFile.Color;\r
     chbOutputDevice.Enabled := True;\r
     edOutputFile.Enabled := True;\r
+    edOutputFile.Text := '';\r
     HistoryChanged(edOutputFile, True);\r
     sbSaveFile.Enabled := True;\r
   end;\r
@@ -1211,9 +1268,6 @@ begin
     form := frmFilter;\r
     frmFilter := nil;\r
     if (Form <> nil) then Form.Release;\r
-    form := frmReadme;\r
-    frmReadme := nil;\r
-    if (Form <> nil) then Form.Release;\r
     form := frmAbout;\r
     frmAbout := nil;\r
     if (Form <> nil) then Form.Release;\r
@@ -1360,4 +1414,37 @@ begin
   end;\r
 end;\r
 \r
+procedure TfrmMain.acSelectAllExecute(Sender: TObject);\r
+begin\r
+  memoOutput.SetFocus;\r
+  memoOutput.SelectAll;\r
+end;\r
+\r
+procedure TfrmMain.acCopySelectedExecute(Sender: TObject);\r
+begin\r
+  memoOutput.SetFocus;\r
+  memoOutput.CopyToClipboard;\r
+end;\r
+\r
+procedure TfrmMain.PopupMenuPopup(Sender: TObject);\r
+begin\r
+  pmnuSelectAll.Caption := dgettext('delphi', pmnuSelectAll.Caption);\r
+  pmnuCopySelected.Caption := dgettext('delphi', pmnuCopySelected.Caption);\r
+  pmnuClearOutput.Caption := dgettext('delphi', pmnuClearOutput.Caption);\r
+  \r
+  pmnuSelectAll.Enabled := (memoOutput.Lines.Count > 0);\r
+  pmnuCopySelected.Enabled := (memoOutput.Lines.Count > 0);\r
+  pmnuClearOutput.Enabled := (memoOutput.Lines.Count > 0);\r
+end;\r
+\r
+procedure TfrmMain.acOptionsSynthesizeShortNamesExecute(Sender: TObject);\r
+begin\r
+  acOptionsSynthesizeShortNames.Checked := not(acOptionsSynthesizeShortNames.Checked);\r
+end;\r
+\r
+procedure TfrmMain.acOptionsNukeTypesExecute(Sender: TObject);\r
+begin\r
+  acOptionsNukeTypes.Checked := not(acOptionsNukeTypes.Checked);\r
+end;\r
+\r
 end.\r
index a30cc841c7182acccbfd3df2c37f37f20866ac77..e9114954d2f614314e10de207a88080ea1869eb8 100644 (file)
Binary files a/win32/gui-2/options.dfm and b/win32/gui-2/options.dfm differ
index 20beb518caeb97f1d1766e4d52fbd77889f11dcd..5979d16d3f2d251183b5ff008d6d13a731379baf 100644 (file)
@@ -1,7 +1,7 @@
 unit options;\r
 \r
 {\r
-    Copyright (C) 2005,2006 Olaf Klein, o.b.klein@gpsbabel.org\r
+    Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org\r
 \r
     This program is free software; you can redistribute it and/or modify\r
     it under the terms of the GNU General Public License as published by\r
@@ -40,6 +40,7 @@ type
     procedure FormKeyDown(Sender: TObject; var Key: Word;\r
       Shift: TShiftState);\r
     procedure btnOKClick(Sender: TObject);\r
+    procedure FormClose(Sender: TObject; var Action: TCloseAction);\r
   private\r
     { Private declarations }\r
     FOpts: TStringList;\r
@@ -158,9 +159,11 @@ var
   xy, _xy: TPoint;\r
   xmax: Integer;\r
   lb: TLabel;\r
+  us: string;\r
+\r
 begin\r
   if (AList = nil) then Exit;\r
-  \r
+\r
   FOpts := AList;\r
 \r
   xy.x := 0;\r
@@ -187,13 +190,16 @@ begin
       btnHelp.ShowHint := True;\r
     end;\r
 \r
-    if FIsInput and (\r
-       (AnsiPos('generate ', o.hint) <> 0) or\r
-       (AnsiPos(' generate', o.hint) <> 0) or\r
-       (AnsiPos('output ', o.hint) <> 0) or\r
-       (AnsiPos(' output', o.hint) <> 0) or\r
-       (AnsiPos('write', o.hint) <> 0) or\r
-       (AnsiPos(' write', o.hint) <> 0)) then Continue;\r
+    us := AnsiLowerCase(o.hint);\r
+    if FIsInput and (AnsiPos('read', us) = 0) and\r
+      (\r
+       (AnsiPos('generate ', us) <> 0) or\r
+       (AnsiPos(' generate', us) <> 0) or\r
+       (AnsiPos('output ', us) <> 0) or\r
+       (AnsiPos(' output', us) <> 0) or\r
+       (AnsiPos('write', us) <> 0) or\r
+       (AnsiPos(' write', us) <> 0)\r
+      ) then Continue;\r
 \r
     chb := TCheckBox.Create(nil);\r
     o.chb := chb;\r
@@ -486,6 +492,7 @@ end;
 procedure TfrmOptions.FormCreate(Sender: TObject);\r
 begin\r
   TranslateComponent(Self);\r
+  RestoreBounds('options_form', Self);\r
 end;\r
 \r
 procedure TfrmOptions.btnHelpClick(Sender: TObject);\r
@@ -847,4 +854,9 @@ begin
   StoreOptionsToRegistry();\r
 end;\r
 \r
+procedure TfrmOptions.FormClose(Sender: TObject; var Action: TCloseAction);\r
+begin\r
+  StoreBounds('options_form', Self);\r
+end;\r
+\r
 end.\r
index 97f734c3092a6e3c089c2015ac01dcc651fe8bc6..35a1ed0272b827a8e551566b60556eb20c81e21e 100644 (file)
@@ -1,7 +1,7 @@
 unit readme;\r
 \r
 {\r
-    Copyright (C) 2005,2006 Olaf Klein, o.b.klein@gpsbabel.org\r
+    Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org\r
 \r
     This program is free software; you can redistribute it and/or modify\r
     it under the terms of the GNU General Public License as published by\r
index d1dddea029d05a66b4ede63744adc6e04dba11de..eb8f27d372dc1dc418e4bd31ca6b099e8867c683 100644 (file)
@@ -1,5 +1,23 @@
 unit select;\r
 \r
+{\r
+    Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org\r
+\r
+    This program is free software; you can redistribute it and/or modify\r
+    it under the terms of the GNU General Public License as published by\r
+    the Free Software Foundation; either version 2 of the License, or\r
+    (at your option) any later version.\r
+\r
+    This program is distributed in the hope that it will be useful,\r
+    but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+    GNU General Public License for more details.\r
+\r
+    You should have received a copy of the GNU General Public License\r
+    along with this program; if not, write to the Free Software\r
+    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA\r
+}\r
+\r
 interface\r
 \r
 uses\r
index 8dbb57f7456113de9fd391c2eddd9df2a87aebf9..a6a54d11c1001d8199454217d0d4ccb89a43b5dc 100644 (file)
@@ -1,7 +1,7 @@
 unit utils;\r
 \r
 {\r
-    Copyright (C) 2005,2006 Olaf Klein, o.b.klein@gpsbabel.org\r
+    Copyright (C) 2005-2007 Olaf Klein, o.b.klein@gpsbabel.org\r
 \r
     This program is free software; you can redistribute it and/or modify\r
     it under the terms of the GNU General Public License as published by\r
@@ -27,7 +27,7 @@ interface
 uses\r
   gnugettext,\r
   Windows, SysUtils, Classes, StdCtrls, ComCtrls,\r
-  Registry, ShellAPI;\r
+  Registry, ShellAPI, Forms;\r
 \r
 type\r
   PBoolean = ^Boolean;\r
@@ -36,7 +36,10 @@ function gpsbabel(const CommandLine: string; Output: TStrings;
   Fatal: PBoolean = nil; OEMStrings: Boolean = True): Boolean;\r
 \r
 function GetShortName(const PathName: string): string;\r
-procedure StoreProfile(const Tag: Integer; const Value: string);\r
+\r
+procedure StoreProfile(const Tag: Integer; const Value: string); overload;\r
+procedure StoreProfile(const Tag, Value: string); overload;\r
+\r
 function ReadProfile(const Tag: Integer; const Default: string = ''): string; overload;\r
 function ReadProfile(const Name: string; const Default: string = ''): string; overload;\r
 \r
@@ -57,10 +60,14 @@ function readme_html_path: string;
 \r
 function HasUpDown(E: TEdit; var UpDown: TUpdown): Boolean;\r
 \r
+procedure StoreBounds(const Name: string; AForm: TForm);\r
+procedure RestoreBounds(const Name: string; AForm: TForm);\r
+\r
+function CharCount(const Str: string; const Ch: Char): Integer;\r
+\r
 implementation\r
 \r
 uses\r
-  Forms,\r
   common;\r
 \r
 function GetShortName(const PathName: string): string;\r
@@ -109,7 +116,7 @@ begin
   if (Copy(CommandLine, 1, 1) = '~') then\r
     sCmd := System.Copy(CommandLine, 2, Length(CommandLine) - 1)\r
   else\r
-    sCmd := SysUtils.Format('%s %s ', [gpsbabel_exe, CommandLine]);\r
+    sCmd := SysUtils.Format('"%s" %s ', [gpsbabel_exe, CommandLine]);\r
 \r
   SecurityAttr.nLength := sizeof(TSECURITYATTRIBUTES);\r
   SecurityAttr.bInheritHandle := true;\r
@@ -214,6 +221,22 @@ begin
   end;\r
 end;\r
 \r
+procedure StoreProfile(const Tag, Value: string);\r
+var\r
+  reg: TRegistry;\r
+begin\r
+  reg := TRegistry.Create;\r
+  try\r
+    reg.RootKey := HKEY_CURRENT_USER;\r
+    if reg.OpenKey('\SOFTWARE\GPSBabel', True) then\r
+    begin\r
+      reg.WriteString(Tag, Value);\r
+    end;\r
+  finally\r
+    reg.Free;\r
+  end;\r
+end;\r
+\r
 function ReadProfile(const Tag: Integer; const Default: string): string; // overload;\r
 var\r
   str: string;\r
@@ -425,10 +448,70 @@ begin
   end;\r
 end;\r
 \r
+procedure StoreBounds(const Name: string; AForm: TForm);\r
+var\r
+  str: string;\r
+begin\r
+  if (AForm = nil) then Exit;\r
+\r
+  if (AForm.WindowState = wsMaximized) then str := 'Y' else str := 'N';\r
+  str := Format('%s,%d,%d,%d,%d', [str,\r
+    AForm.Left, AForm.Top, AForm.Width, AForm.Height]);\r
+  StoreProfile(Name, str);\r
+end;\r
+\r
+procedure RestoreBounds(const Name: string; AForm: TForm);\r
+var\r
+  str: string;\r
+  idx: Integer;\r
+  lst: TStringList;\r
+  bds: TRect;\r
+begin\r
+  if (AForm = nil) then Exit;\r
+\r
+  str := ReadProfile(Name);\r
+  if (str = '') then Exit;\r
+\r
+  lst := TStringList.Create;\r
+  try\r
+    lst.Sorted := False;\r
+    lst.Duplicates := dupAccept;\r
+    lst.CommaText := str;\r
+    try\r
+      AForm.Position := poDesigned;\r
+\r
+      if (StrUpper(PChar(lst[0])) = 'Y') then AForm.WindowState := wsMaximized\r
+      else AForm.WindowState := wsNormal;\r
+\r
+      bds.Left := StrToInt(lst[1]);\r
+      bds.Top := StrToInt(lst[2]);\r
+      bds.Right := bds.Left + StrToInt(lst[3]);\r
+      bds.Bottom := bds.Top + StrToInt(lst[4]);\r
+\r
+      AForm.BoundsRect := bds;\r
+      \r
+    except\r
+      on E: Exception do;\r
+    end;\r
+  finally\r
+    lst.Free;\r
+  end;\r
+end;\r
+\r
+function CharCount(const Str: string; const Ch: Char): Integer;\r
+var\r
+  i, len: Integer;\r
+begin\r
+  Result := 0;\r
+  len := Length(Str);\r
+  for i := 1 to len do\r
+    if (Str[i] = Ch) then\r
+      Inc(Result);\r
+end;\r
 \r
 var\r
   hMutex: THandle;\r
-  \r
+\r
 initialization\r
 \r
   // Flag for InnoSetup\r
diff --git a/xcsv.c b/xcsv.c
index a9bfd3d106758b98e0432da9199db47a5e703741..4dbc437e19cf20ecc827b6b0079e52315a854e0f 100644 (file)
--- a/xcsv.c
+++ b/xcsv.c
@@ -333,7 +333,7 @@ xcsv_parse_style_line(const char *sbuff)
        } else
 
        if (ISSTOKEN(sbuff, "DATUM")) {
-           p = csv_stringtrim(&sbuff[8], "\"", 1);
+           p = csv_stringtrim(&sbuff[5], "\"", 1);
            xcsv_file.gps_datum = GPS_Lookup_Datum_Index(p);
            is_fatal(xcsv_file.gps_datum < 0, MYNAME ": datum \"%s\" is not supported.", p);
            xfree(p);
diff --git a/xcsv_tokens.gperf b/xcsv_tokens.gperf
new file mode 100644 (file)
index 0000000..728fdc8
--- /dev/null
@@ -0,0 +1,289 @@
+/* ANSI-C code produced by gperf version 3.0.2 */
+/* Command-line: gperf -L ANSI-C -D -t xcsv_tokens.in  */
+/* Computed positions: -k'2,4-5,12' */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646.  */
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
+#endif
+
+#line 1 "xcsv_tokens.in"
+struct xt_mapping {char *name; int xt_token; };
+
+#define TOTAL_KEYWORDS 69
+#define MIN_WORD_LENGTH 3
+#define MAX_WORD_LENGTH 21
+#define MIN_HASH_VALUE 7
+#define MAX_HASH_VALUE 148
+/* maximum key range = 142, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+hash (register const char *str, register unsigned int len)
+{
+  static unsigned char asso_values[] =
+    {
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149,   0, 149,   0,  10,   5,
+       55,  40,  20,   0, 149,  60,  30,  40,   0,  20,
+       70, 149,  50,  45,  30, 149,  30, 149,  40,  10,
+      149, 149, 149, 149, 149,   0, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+      149, 149, 149, 149, 149, 149
+    };
+  register int hval = len;
+
+  switch (hval)
+    {
+      default:
+        hval += asso_values[(unsigned char)str[11]];
+      /*FALLTHROUGH*/
+      case 11:
+      case 10:
+      case 9:
+      case 8:
+      case 7:
+      case 6:
+      case 5:
+        hval += asso_values[(unsigned char)str[4]];
+      /*FALLTHROUGH*/
+      case 4:
+        hval += asso_values[(unsigned char)str[3]];
+      /*FALLTHROUGH*/
+      case 3:
+      case 2:
+        hval += asso_values[(unsigned char)str[1]];
+        break;
+    }
+  return hval;
+}
+
+#ifdef __GNUC__
+__inline
+#endif
+struct xt_mapping *
+in_word_set (register const char *str, register unsigned int len)
+{
+  static struct xt_mapping wordlist[] =
+    {
+#line 5 "xcsv_tokens.in"
+      {"ANYNAME", XT_ANYNAME},
+#line 43 "xcsv_tokens.in"
+      {"LAT_NMEA", XT_LAT_NMEA},
+#line 31 "xcsv_tokens.in"
+      {"ICON_DESCR", XT_ICON_DESCR},
+#line 6 "xcsv_tokens.in"
+      {"CADENCE", XT_CADENCE},
+#line 7 "xcsv_tokens.in"
+      {"CITY", XT_CITY},
+#line 52 "xcsv_tokens.in"
+      {"MAP_EN_BNG", XT_MAP_EN_BNG},
+#line 39 "xcsv_tokens.in"
+      {"LAT_DIR", XT_LAT_DIR},
+#line 15 "xcsv_tokens.in"
+      {"GEOCACHE_HINT", XT_GEOCACHE_HINT},
+#line 19 "xcsv_tokens.in"
+      {"GEOCACHE_PLACER", XT_GEOCACHE_PLACER},
+#line 37 "xcsv_tokens.in"
+      {"LAT_DECIMAL", XT_LAT_DECIMAL},
+#line 13 "xcsv_tokens.in"
+      {"GEOCACHE_CONTAINER", XT_GEOCACHE_CONTAINER},
+#line 16 "xcsv_tokens.in"
+      {"GEOCACHE_ISARCHIVED", XT_GEOCACHE_ISARCHIVED},
+#line 17 "xcsv_tokens.in"
+      {"GEOCACHE_ISAVAILABLE", XT_GEOCACHE_ISAVAILABLE},
+#line 51 "xcsv_tokens.in"
+      {"LON_NMEA", XT_LON_NMEA},
+#line 60 "xcsv_tokens.in"
+      {"PATH_SPEED", XT_PATH_SPEED},
+#line 54 "xcsv_tokens.in"
+      {"PATH_COURSE", XT_PATH_COURSE},
+#line 61 "xcsv_tokens.in"
+      {"PHONE_NR", XT_PHONE_NR},
+#line 36 "xcsv_tokens.in"
+      {"LAT_DECIMALDIR", XT_LAT_DECIMALDIR},
+#line 55 "xcsv_tokens.in"
+      {"PATH_DISTANCE_KM", XT_PATH_DISTANCE_KM},
+#line 48 "xcsv_tokens.in"
+      {"LON_DIR", XT_LON_DIR},
+#line 12 "xcsv_tokens.in"
+      {"FACILITY", XT_FACILITY},
+#line 56 "xcsv_tokens.in"
+      {"PATH_DISTANCE_MILES", XT_PATH_DISTANCE_MILES},
+#line 46 "xcsv_tokens.in"
+      {"LON_DECIMAL", XT_LON_DECIMAL},
+#line 40 "xcsv_tokens.in"
+      {"LAT_HUMAN_READABLE", XT_LAT_HUMAN_READABLE},
+#line 67 "xcsv_tokens.in"
+      {"TIMET_TIME", XT_TIMET_TIME},
+#line 33 "xcsv_tokens.in"
+      {"INDEX", XT_INDEX},
+#line 66 "xcsv_tokens.in"
+      {"STREET_ADDR", XT_STREET_ADDR},
+#line 41 "xcsv_tokens.in"
+      {"LAT_INT32DEG", XT_LAT_INT32DEG},
+#line 70 "xcsv_tokens.in"
+      {"URL", XT_URL},
+#line 45 "xcsv_tokens.in"
+      {"LON_DECIMALDIR", XT_LON_DECIMALDIR},
+#line 9 "xcsv_tokens.in"
+      {"COUNTRY", XT_COUNTRY},
+#line 44 "xcsv_tokens.in"
+      {"LOCAL_TIME", XT_LOCAL_TIME},
+#line 62 "xcsv_tokens.in"
+      {"POSTAL_CODE", XT_POSTAL_CODE},
+#line 49 "xcsv_tokens.in"
+      {"LON_HUMAN_READABLE", XT_LON_HUMAN_READABLE},
+#line 38 "xcsv_tokens.in"
+      {"LAT_DIRDECIMAL", XT_LAT_DIRDECIMAL},
+#line 63 "xcsv_tokens.in"
+      {"ROUTE_NAME", XT_ROUTE_NAME},
+#line 10 "xcsv_tokens.in"
+      {"DESCRIPTION", XT_DESCRIPTION},
+#line 20 "xcsv_tokens.in"
+      {"GEOCACHE_TERR", XT_GEOCACHE_TERR},
+#line 18 "xcsv_tokens.in"
+      {"GEOCACHE_LAST_FOUND", XT_GEOCACHE_LAST_FOUND},
+#line 65 "xcsv_tokens.in"
+      {"STATE", XT_STATE},
+#line 42 "xcsv_tokens.in"
+      {"LATLON_HUMAN_READABLE", XT_LATLON_HUMAN_READABLE},
+#line 50 "xcsv_tokens.in"
+      {"LON_INT32DEG", XT_LON_INT32DEG},
+#line 14 "xcsv_tokens.in"
+      {"GEOCACHE_DIFF", XT_GEOCACHE_DIFF},
+#line 59 "xcsv_tokens.in"
+      {"PATH_SPEED_MPH", XT_PATH_SPEED_MPH},
+#line 53 "xcsv_tokens.in"
+      {"NOTES", XT_NOTES},
+#line 22 "xcsv_tokens.in"
+      {"GMT_TIME", XT_GMT_TIME},
+#line 30 "xcsv_tokens.in"
+      {"HMSL_TIME", XT_HMSL_TIME},
+#line 4 "xcsv_tokens.in"
+      {"ALT_METERS", XT_ALT_METERS},
+#line 35 "xcsv_tokens.in"
+      {"ISO_TIME", XT_ISO_TIME},
+#line 47 "xcsv_tokens.in"
+      {"LON_DIRDECIMAL", XT_LON_DIRDECIMAL},
+#line 11 "xcsv_tokens.in"
+      {"EXCEL_TIME", XT_EXCEL_TIME},
+#line 34 "xcsv_tokens.in"
+      {"ISO_TIME_MS", XT_ISO_TIME_MS},
+#line 21 "xcsv_tokens.in"
+      {"GEOCACHE_TYPE", XT_GEOCACHE_TYPE},
+#line 29 "xcsv_tokens.in"
+      {"HMSG_TIME", XT_HMSG_TIME},
+#line 3 "xcsv_tokens.in"
+      {"ALT_FEET", XT_ALT_FEET},
+#line 58 "xcsv_tokens.in"
+      {"PATH_SPEED_KPH", XT_PATH_SPEED_KPH},
+#line 28 "xcsv_tokens.in"
+      {"HEART_RATE", XT_HEART_RATE},
+#line 57 "xcsv_tokens.in"
+      {"PATH_SPEED_KNOTS", XT_PATH_SPEED_KNOTS},
+#line 24 "xcsv_tokens.in"
+      {"GPS_HDOP", XT_GPS_HDOP},
+#line 8 "xcsv_tokens.in"
+      {"CONSTANT", XT_CONSTANT},
+#line 27 "xcsv_tokens.in"
+      {"GPS_VDOP", XT_GPS_VDOP},
+#line 64 "xcsv_tokens.in"
+      {"SHORTNAME", XT_SHORTNAME},
+#line 71 "xcsv_tokens.in"
+      {"YYYYMMDD_TIME", XT_YYYYMMDD_TIME},
+#line 32 "xcsv_tokens.in"
+      {"IGNORE", XT_IGNORE},
+#line 68 "xcsv_tokens.in"
+      {"TRACK_NAME", XT_TRACK_NAME},
+#line 26 "xcsv_tokens.in"
+      {"GPS_SAT", XT_GPS_SAT},
+#line 23 "xcsv_tokens.in"
+      {"GPS_FIX", XT_GPS_FIX},
+#line 69 "xcsv_tokens.in"
+      {"URL_LINK_TEXT", XT_URL_LINK_TEXT},
+#line 25 "xcsv_tokens.in"
+      {"GPS_PDOP", XT_GPS_PDOP}
+    };
+
+  static signed char lookup[] =
+    {
+      -1, -1, -1, -1, -1, -1, -1,  0,  1, -1,  2, -1,  3, -1,
+       4,  5, -1,  6,  7, -1,  8,  9, -1, 10, 11, 12, -1, -1,
+      13, -1, 14, 15, -1, 16, 17, -1, 18, 19, 20, 21, -1, 22,
+      -1, 23, -1, 24, -1, -1, -1, -1, 25, 26, 27, 28, 29, -1,
+      -1, 30, -1, -1, 31, 32, -1, 33, 34, 35, 36, -1, 37, 38,
+      39, 40, 41, 42, 43, 44, -1, -1, 45, 46, 47, -1, -1, 48,
+      49, 50, 51, -1, 52, 53, -1, -1, -1, 54, 55, 56, 57, -1,
+      58, -1, -1, -1, -1, 59, -1, -1, -1, -1, 60, 61, -1, -1,
+      -1, 62, -1, -1, 63, -1, -1, -1, 64, -1, 65, -1, -1, -1,
+      -1, -1, -1, -1, -1, -1, 66, 67, -1, -1, -1, -1, -1, -1,
+      -1, -1, -1, -1, -1, -1, -1, -1, 68
+    };
+
+  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+    {
+      register int key = hash (str, len);
+
+      if (key <= MAX_HASH_VALUE && key >= 0)
+        {
+          register int index = lookup[key];
+
+          if (index >= 0)
+            {
+              register const char *s = wordlist[index].name;
+
+              if (*str == *s && !strcmp (str + 1, s + 1))
+                return &wordlist[index];
+            }
+        }
+    }
+  return 0;
+}
diff --git a/xcsv_tokens.in b/xcsv_tokens.in
new file mode 100644 (file)
index 0000000..460ed00
--- /dev/null
@@ -0,0 +1,71 @@
+struct xt_mapping {char *name; int xt_token; };
+%%
+ALT_FEET, XT_ALT_FEET
+ALT_METERS, XT_ALT_METERS
+ANYNAME, XT_ANYNAME
+CADENCE, XT_CADENCE
+CITY, XT_CITY
+CONSTANT, XT_CONSTANT
+COUNTRY, XT_COUNTRY
+DESCRIPTION, XT_DESCRIPTION
+EXCEL_TIME, XT_EXCEL_TIME
+FACILITY, XT_FACILITY
+GEOCACHE_CONTAINER, XT_GEOCACHE_CONTAINER
+GEOCACHE_DIFF, XT_GEOCACHE_DIFF
+GEOCACHE_HINT, XT_GEOCACHE_HINT
+GEOCACHE_ISARCHIVED, XT_GEOCACHE_ISARCHIVED
+GEOCACHE_ISAVAILABLE, XT_GEOCACHE_ISAVAILABLE
+GEOCACHE_LAST_FOUND, XT_GEOCACHE_LAST_FOUND
+GEOCACHE_PLACER, XT_GEOCACHE_PLACER
+GEOCACHE_TERR, XT_GEOCACHE_TERR
+GEOCACHE_TYPE, XT_GEOCACHE_TYPE
+GMT_TIME, XT_GMT_TIME
+GPS_FIX, XT_GPS_FIX
+GPS_HDOP, XT_GPS_HDOP
+GPS_PDOP, XT_GPS_PDOP
+GPS_SAT, XT_GPS_SAT
+GPS_VDOP, XT_GPS_VDOP
+HEART_RATE, XT_HEART_RATE
+HMSG_TIME, XT_HMSG_TIME
+HMSL_TIME, XT_HMSL_TIME
+ICON_DESCR, XT_ICON_DESCR
+IGNORE, XT_IGNORE
+INDEX, XT_INDEX
+ISO_TIME_MS, XT_ISO_TIME_MS
+ISO_TIME, XT_ISO_TIME
+LAT_DECIMALDIR, XT_LAT_DECIMALDIR
+LAT_DECIMAL, XT_LAT_DECIMAL
+LAT_DIRDECIMAL, XT_LAT_DIRDECIMAL
+LAT_DIR, XT_LAT_DIR
+LAT_HUMAN_READABLE, XT_LAT_HUMAN_READABLE
+LAT_INT32DEG, XT_LAT_INT32DEG
+LATLON_HUMAN_READABLE, XT_LATLON_HUMAN_READABLE
+LAT_NMEA, XT_LAT_NMEA
+LOCAL_TIME, XT_LOCAL_TIME
+LON_DECIMALDIR, XT_LON_DECIMALDIR
+LON_DECIMAL, XT_LON_DECIMAL
+LON_DIRDECIMAL, XT_LON_DIRDECIMAL
+LON_DIR, XT_LON_DIR
+LON_HUMAN_READABLE, XT_LON_HUMAN_READABLE
+LON_INT32DEG, XT_LON_INT32DEG
+LON_NMEA, XT_LON_NMEA
+MAP_EN_BNG, XT_MAP_EN_BNG
+NOTES, XT_NOTES
+PATH_COURSE, XT_PATH_COURSE
+PATH_DISTANCE_KM, XT_PATH_DISTANCE_KM
+PATH_DISTANCE_MILES, XT_PATH_DISTANCE_MILES
+PATH_SPEED_KNOTS, XT_PATH_SPEED_KNOTS
+PATH_SPEED_KPH, XT_PATH_SPEED_KPH
+PATH_SPEED_MPH, XT_PATH_SPEED_MPH
+PATH_SPEED, XT_PATH_SPEED
+PHONE_NR, XT_PHONE_NR
+POSTAL_CODE, XT_POSTAL_CODE
+ROUTE_NAME, XT_ROUTE_NAME
+SHORTNAME, XT_SHORTNAME
+STATE, XT_STATE
+STREET_ADDR, XT_STREET_ADDR
+TIMET_TIME, XT_TIMET_TIME
+TRACK_NAME, XT_TRACK_NAME
+URL_LINK_TEXT, XT_URL_LINK_TEXT
+URL, XT_URL
+YYYYMMDD_TIME, XT_YYYYMMDD_TIME
index 377f8f9dcb24fb2758f7616a972ef91263030c5b..eb4e4f92c891b9208aeeaa90d5a4e318c43d7062 100644 (file)
@@ -24,12 +24,12 @@ Linux, Solaris, and a variety of processors and compilers.
   <para><ulink url="http://expat.sourceforge.net">Expat</ulink> 
 is strongly recommended for source builds as it is
 required for reading all the XML formats such as GPX.  Fedora users
-may need to 'yum install expat-devel'.  Ubutnu users may need to 
+may need to 'yum install expat-devel'.  Ubuntu users may need to 
 'apt-get install expat libexpat-dev'.
 </para>
   <para><ulink url="http://libusb.sourceforge.net">libusb</ulink> 
 is recommended for OS/X and Linux if you want to use a USB Garmin.
-Fedora users may need to 'yum install expat-devel'.  Ubutnu users may
+Fedora users may need to 'yum install expat-devel'.  Ubuntu users may
 need to 'apt-get install libusb-dev'.
 </para>
 <para>There are additional flags that can be passed to configure to
@@ -37,7 +37,7 @@ need to 'apt-get install libusb-dev'.
 </para>
 <para><userinput>./configure --help</userinput></para> 
 <para>
-lists all the supported options, but additionally we have:</para><para>
+lists all the supported options, but of interest we have:</para><para>
  <option>--disable-shapefile</option> Excludes the shapefile support.
 </para>
 <para>
@@ -53,7 +53,7 @@ lists all the supported options, but additionally we have:</para><para>
   <option>--enable-efence</option> Activate debugging mode for gpsbabel-debug.
 </para>
 <para>
-  <option>--with-doc=dir</option> Specify that the doc should be created and installed in <option>dir</option>.
+  <option>--with-doc=</option><filename class="directory">dir</filename> Specifies that the doc should be created and installed in <filename class="directory">dir</filename>.
 </para>
 <para>
   <option>--without-libusb</option> Disables use of libusb, even it's it's available.
index 4ce0e356a1cb3b5ea8d95536c410572ac4f36541..eba95ebc094c7996e0a6d38004dbf2816bbdf509 100644 (file)
@@ -7,24 +7,24 @@ to hold waypoint, track, and route information in various programs
 used by computers and GPS receivers.  
 <ulink url="http://www.topografix.com/gpx.asp">GPX</ulink>  defines a
 standard in XML to contain all the data, but there are too many
-programs that don't understand it yet and too much data that are in an
+programs that don't understand it yet and too much data in 
 alternate formats.
 </para>
 <para>
-Perhaps you have an Explorist 600 and your friend has a StreetPilot 2720.
+Perhaps you have an <link linkend="fmt_magellanx">Explorist 600</link> and your friend has a <link linkend="fmt_garmin">StreetPilot 2720</link>.
 You've collected a a list of your favorite locations as waypoints and you'd
-like to be able to share them.  Unfortunately, his copy of Garmin Mapsource
-won't read data created by your copy of Magellan Directroute.  What you need
+like to be able to share them.  Unfortunately, his copy of <link linkend="fmt_gdb">Garmin Mapsource</link>
+won't read data created by your copy of <link linkend="fmt_mapsend">Magellan Mapsend DirectRoute</link>.  What you need
 is a program that converts data bewteen the two programs.
 </para>
 <para>
-But GPSBabel actually does much more...
+GPSBabel actually solves that problem for you and much more...
 </para>
       </section>
       <section id="The_Solution">
          <title>The Solution</title>
          <para> The original author of GPSBabel, <ulink url="/people/robertlipe.html">Robert Lipe</ulink>, needed to convert waypoints between a couple of formats, so he
-whipped up a converter and based it on an extensible foundation so
+whipped up a converter and designed it upon an extensible foundation so
 that it was easy to add new formats and made the program freely available. <ulink url="/people/index.html">Many others</ulink> have contributed to the program since then.</para>
        <para>  Most file formats added so far have taken under 200 
        lines of reasonable ISO C so they can be stamped
index 164a5f01f90c8db46af5a152bcb46987f21577b2..4223913a2b6e3e6356a7027ead8d3f2cd4811dd3 100644 (file)
@@ -986,6 +986,32 @@ example:
 </screen>
 </section>
 
+<section id="style_def_isavailable">
+<title>GEOCACHE_ISAVAILABLE</title>
+<para>
+   GEOCACHE_ISAVAILABLE is a string containing "True" or "False" 
+   indicating whether a geocache is currently available or not.  
+</para>
+<para>
+example:
+</para>
+<screen format="linespecific">   GEOCACHE_ISAVAILABLE,"","%s"
+</screen>
+</section>
+
+<section id="style_def_isarchived">
+<title>GEOCACHE_ISARCHIVED</title>
+<para>
+   GEOCACHE_ISARCHIVED is a string containing "True" or "False" 
+   indicating whether a geocache has been archived.   
+</para>
+<para>
+example:
+</para>
+<screen format="linespecific">   GEOCACHE_ISARCHIVED,"","%s"
+</screen>
+</section>
+
 <section id="style_def_geofound">
 <title>GEOCACHE_LAST_FOUND</title>
 <para>
@@ -1154,6 +1180,42 @@ example:
 <title>ROUTE_NAME</title>
 <para>The name of the route currently being operated on.  Needs string conversion.</para><para>example:<screen format="linespecific">ROUTE_NAME, "", "%s"</screen></para></section>
 
+<section id="style_street_addr">
+<title>STREET_NAME</title>
+<para>Street address including house number.  Notice that this is not used for any geocoding, it's merely textual description associated with a position.</para>
+<para>example:<screen format="linespecific">STREET_ADDR, "", "%s"</screen></para>
+</section>
+
+<section id="style_city">
+<title>CITY</title>
+<para>The name of a city. Sometimes part of "Points of Interest".   This is simple textual data associated with a position, no geocoding will be done..</para>
+<para>example:<screen format="linespecific">CITY, "", "%s"</screen></para>
+</section>
+
+<section id="style_country">
+<title>COUNTRY</title>
+<para>The name of a country associated with a position.</para>
+<para>example:<screen format="linespecific">COUNTRY, "", "%s"</screen></para>
+</section>
+
+<section id="style_facility">
+<title>FACILITY</title>
+<para>The name of a facility to associate with a position.</para>
+<para>example:<screen format="linespecific">FACILITY, "", "%s"</screen></para>
+</section>
+
+<section id="style_phone_nr">
+<title>PHONE_NR</title>
+<para>A phone number associated with a position.  This is just textual data attached for convenience.</para>
+<para>example:<screen format="linespecific">PHONE_NR, "", "%s"</screen></para>
+</section>
+
+<section id="style_postal_code">
+<title>POSTAL_CODE</title>
+<para>A postal code to associate with a position.  It is freeform text and is not used by GPSBabel for any geocoding or such.</para>
+<para>example:<screen format="linespecific">POSTAL_CODE, "", "%s"</screen></para>
+</section>
+
 </section> <!-- definitions -->
 
 <section id="style_examples">
index 1a93a0287fa88e625e247bdedefce316c8c8ebba..6c5a2970ba4d880d82df3fe6ffb1921a10c018b6 100644 (file)
@@ -25,9 +25,14 @@ options you need to know to do those things:
 </seglistitem>
 <seglistitem>
   <seg><option>-F</option> <parameter class="command">filename</parameter></seg>
-  <seg>Write output File</seg>
+  <seg>Write output file</seg>
 </seglistitem>
 </segmentedlist>
+<important>
+<para>
+Case matters.  Notably <option>-f</option> (lowercase) sets the <emphasis>input</emphasis> file.  <option> -F</option> (uppercase) sets the <emphasis>output</emphasis> file. 
+</para>
+</important>
 
 <para>
 The <parameter class="command">format</parameter> parameters in the above list
@@ -42,7 +47,11 @@ parentheses.
 <para>
 Options are <emphasis>always</emphasis> processed in order from left to right.
 In practical terms, this means that things you want to read should appear
-in the command before things you want to write.
+in the command before things you want to write.   This sometimes surprises
+new users as adding options to turn on debugging at the end, for example, 
+doesn't work as the debugging is turned on after all the interesting work is
+done.   The reason for this strict ordering becomes more apparent once you
+learn about mixing formats and filters.
 </para>
 <para>
 The <parameter class="command">filename</parameter> parameters specify the 
@@ -50,30 +59,38 @@ name of a file to be read or written.
 </para>
 
 <para>To use
-         this program, just tell it what you're reading, where to read
+         GPSBabel in its simplest form, just tell it what you're reading, where to read
          it from, what you're writing, and what to write it to.  For
          example:</para>
          <para><userinput>gpsbabel -i geo -f /tmp/geocaching.loc -o gpx -F /tmp/geocaching.gpx</userinput></para>
          <para>tells it to read the file <filename>/tmp/geocaching.loc</filename> in geocaching.com
-         format and create a new file <filename>/tmp/geocaching.gpx</filename> in GPX format.   It's important to note that the names have nothign to do with the formats actually used.</para>
+         format and create a new file <filename>/tmp/geocaching.gpx</filename> in GPX format.   It's important to note that the names have nothing to do with the formats actually used.</para>
          <para> This command will read from a Magellan unit attached
          to the first serial port on a Linux system (device names will
-         vary on other OSes) and write them as a geocaching loc file.</para>
+         vary on other OSes; typically COMx: on WIndows) and write them as a geocaching loc file.</para>
+<example>
+  <title>Command showing Linux download from Magellan serial and writing to .loc file</title>
          <para><userinput>gpsbabel -i magellan -f /dev/ttyS0 -o geo -F mag.loc</userinput></para>
+</example>
          <para>This second command does the same on Microsoft Windows.</para>
+<example>
+  <title>Command showing Windows download from Magellan serial and writing to .loc file</title>
          <para><userinput>gpsbabel -i magellan -f com1 -o geo -F mag.loc</userinput></para>
+</example>
          <para>Optionally, you may specify <parameter moreinfo="none">-s</parameter> in any command line.  This
          causes the program to ignore any "short" names that may be
          present in the source data format and synthesize one from the
          long name.  This is particularly useful if you're writing to
          a target format that isn't the lowest common denominator but
          the source data was written for the lowest common
-         denominator.  I use this for writing data from geocaching.com
-         to my Magellan so my waypoints have "real" names instead of
-         the 'GC1234' ones that are optimized for NMEA-only receivers.
-         A geocacher with a Magellan receiver may thus find commands
+         denominator.  This is useful for writing data from geocaching.com
+         to a GPS so my waypoints have "real" names instead of
+         the 'GC1234' ones that are optimized for receivers of the lowest 
+       common denominator.
+         A geocacher using Linux with a Magellan receiver may thus find commands
          like this useful.</para>
          <para><userinput>gpsbabel -s -i geo -f geocaching.loc -o magellan -F /dev/ttyS0  </userinput></para>
+       <para>His counterpart on Windows will find this equivalent</para>
        <para><userinput>gpsbabel -s -i geo -f geocaching.loc -o magellan -F com1</userinput></para>
       </sect1>
       <sect1 id="Suboptions">
@@ -117,19 +134,28 @@ through when executed. Normally one would: </para>
          </simplelist>
          <para> but GPSBabel is flexible enough to allow more complicated
 operations such as reading from several files (potentially of
-different types), applying a filter, reading more data, then write the
+different types), applying a filter, reading more data, then writing the
 merged data to multiple destinations.
 </para>
          <para>The input file type remains unchanged until a new
          <parameter moreinfo="none">-i</parameter> argument is seen.
          Files are read in the order they appear. So you could merge
          three input files into one output file with: </para>
-         <para><userinput>gpsbabel -i geo -f 1.loc -f 2.loc -f 3.loc -o geo -F big.loc</userinput></para>
+       <example>
+       <title>Merging multiple files into one</title>
+           <para><userinput>gpsbabel -i geo -f 1.loc -f 2.loc -f 3.loc -o geo -F big.loc</userinput></para>
+       </example>
          <para>You can merge files of different types:</para>
-         <para><userinput>gpsbabel  -i geo -f 1.loc -i gpx -f 2.gpx -i pcx 3.pcx  
--o gpsutil -F big.gps</userinput></para>
+       <example>
+       <title>Merging multiple files of differing types.</title>
+         <para><userinput>gpsbabel  -i geo -f 1.loc -i gpx -f 2.gpx -i pcx 3.pcx  -o gpsutil -F big.gps</userinput></para>
+       </example>
+       <example>
+        <title>Writing the same data in multiple output formats.</title>
          <para> You can write the same data in different output formats:</para>
+
          <para><userinput>gpsbabel -i geo -f 1.loc -o gpx -F 1.gpx -o pcx -F 1.wpt</userinput></para>
+       </example>
          <para>If you want to change the character set of input or/and
          output side you can do this with the option <option>-c
          &lt;character set&gt;</option>. You can get a complete list
@@ -216,13 +242,13 @@ merged data to multiple destinations.
        There are three optional sections.
        <itemizedlist>
        <listitem>
-       <para>"Common format settings"</para>
+       <para>Common format settings.</para>
        <para>  Any option from any of the formats listed here will be used by
                GPSBabel unless explictly provided on the command line.
        </para>
        </listitem>
        <listitem>
-       <para>"Common filter settings"</para>
+       <para>Common filter settings.</para>
        <para>As above, but for filters.</para>
        </listitem>
        <listitem>
@@ -266,7 +292,10 @@ merged data to multiple destinations.
          output.   Additional formats may be added by interested parties 
          later.
     </para>
+<example>
+  <title>Read realtime positioning from Garmin USB, write to Keyhole Markup</title>
     <para><userinput>gpsbabel -T -i garmin -f usb: -o kml -F xxx.kml</userinput></para>
+</example>
     <para>
          Will read the USB-connected Garmin and rewrite 'xxx.kml' atomically,
          suitable for a self-refreshing network link in Google Earth.
index 82bd9bf902ecf3abb3dcd954e91d82757ebda6e4..9b2a2ad267909b37a7a0be4ec6344bdcb1fa023b 100644 (file)
@@ -1,12 +1,26 @@
 <para>
 This filter is used to "fix" unreliable GPS data by discarding points
-with HDOP and/or VDOP above a specified limit.  HDOP and VDOP are 
-measures of the best possible horizontal or vertical precision 
-for a given configuration of GPS satellites.
+that are believed to be unreliable.  You may specify an 
+HDOP and/or VDOP above a specified limit, a minimum number of satellits
+that must have been in view for a fix to be considered, or both.
 </para>
+<para>
+HDOP and VDOP are measures of the best possible horizontal or vertical precision for a given configuration of GPS satellites.   Higher numbers indicate a higher dilution of precision and therefore mathematically less useful.
+</para>
+<para>
 <example id="example_discard_filter">
-<title>Using the discard filter</title>
+<title>Using the discard filter for HDOP and VDOP. </title>
 <para><userinput> gpsbabel -i gpx -f in.gpx -x discard,hdop=10,vdop=20,hdopandvdop -o gpx -F out.gpx</userinput></para>
 </example>
-<para> Contributed by Tobias Minich.</para>
+</para>
+<para>
+You may specify a minimmum number of  satellites.  
+</para>
+<para>
+<example id="example_discard_filter_sats">
+<title>Using the discard filter to require at least three satellites. </title>
+<para><userinput> gpsbabel -i gpx -f in.gpx -x discard,sat=3 -o gpx -F out.gpx</userinput></para>
+</example>
+</para>
+<para> Contributed by Tobias Minich and Serge Droz. </para>
       
diff --git a/xmldoc/filters/options/discard-sat.xml b/xmldoc/filters/options/discard-sat.xml
new file mode 100644 (file)
index 0000000..10d2c14
--- /dev/null
@@ -0,0 +1,4 @@
+<para>
+This option specifies the minimum required number of satelites.
+</para>
+
index 3b2e1112cad2852aac140154fcf1f9dc7df23c44..feb3caf9e1689aaab3297f25ea04b8345ada189a 100644 (file)
@@ -1,8 +1,7 @@
-
       
       
       <para> There are a billion variants of Comma Separated Value
-data.  This is the one that makes <ulink url="http://www.delorme.com">Delorme</ulink> <productname>S&amp;A Deluxe 9</productname> happy. It's
+data.  This is the one specifically that makes <ulink url="http://www.delorme.com">Delorme</ulink> <productname>S&amp;A Deluxe 9</productname> happy. It's
 also a very simple program and useful for many other programs like
 spreadsheets.</para>
       <para> CSV is also the correct format for 
@@ -18,3 +17,11 @@ on read it  will read anything supported by our <link linkend="style_def_lathuma
        For something-separated data that has headers identifying the various
        fields, see our <link linkend="fmt_unicsv">universal csv</link> format.
     </para>
+<example><title>Example 'csv' file</title>
+<programlisting>
+35.97203, -87.13470, Mountain Bike Heaven by susy1313
+36.09068, -86.67955, The Troll by a182pilot &amp; Family
+35.99627, -86.62012, Dive Bomber by JoGPS &amp; family
+36.03848, -86.64862, FOSTER by JoGPS &amp; Family
+</programlisting>
+</example>
diff --git a/xmldoc/formats/destinator_itn.xml b/xmldoc/formats/destinator_itn.xml
new file mode 100644 (file)
index 0000000..f39ff24
--- /dev/null
@@ -0,0 +1,18 @@
+<para>
+  Support for <productname>Destinator</productname> itinerary files.
+</para>
+<para>
+  These have (mostly) extension .dat and are binary files. The file structure is undocumented
+  and so this format was reverse engineered from some .dat files.
+  At this time we can read and write name, comment and the coordinates of the route points.
+</para>
+<para>
+  <productname>Destinator</productname> by
+  <ulink url="http://www.destinatortechnologies.net">Destinator Technologies</ulink>
+  is a software for PNDs, Smartphones and PDAs.
+</para>
+<para>
+  <userinput>
+      gpsbabel -i destinator_itn -f from_A_to_B.dat -o gpx -F from_A_to_B.gpx
+  </userinput>
+</para>
diff --git a/xmldoc/formats/destinator_poi.xml b/xmldoc/formats/destinator_poi.xml
new file mode 100644 (file)
index 0000000..9cd4396
--- /dev/null
@@ -0,0 +1,19 @@
+<para>
+  Support for <productname>Destinator</productname> binary POI files (.dat).
+</para>
+<para>
+  The basic information was found at <ulink url="http://mozoft.com/d3log.html">mozoft.com</ulink>.
+  GPSBabel can read and write all fields described at this document. Please note that 'house number' isn't
+  supported as a separate field. This field, if available in any source file, will be stored together with 'street'
+  into GSPBabel's internal 'address' field.
+</para>
+<para>
+  <productname>Destinator</productname> by
+  <ulink url="http://www.destinatortechnologies.net">Destinator Technologies</ulink>
+  is a software for PNDs, Smartphones and PDAs.
+</para>
+<para>
+  <userinput>
+      gpsbabel -i destinator_poi -f interesting_places.dat -o gpx -F interesting_places.gpx
+  </userinput>
+</para>
diff --git a/xmldoc/formats/destinator_trl.xml b/xmldoc/formats/destinator_trl.xml
new file mode 100644 (file)
index 0000000..5b33dd4
--- /dev/null
@@ -0,0 +1,18 @@
+<para>
+  Support for <productname>Destinator</productname> binary tracklogs (.dat).
+</para>
+<para>
+  The basic information was found at <ulink url="http://mozoft.com/d3log.html">mozoft.com</ulink>.
+  In addition to the standard GPS track data of coordinates and timestamp, this format also stores the 
+  position fix and the number of satelites seen during recording. 
+</para>
+<para>
+  <productname>Destinator</productname> by
+  <ulink url="http://www.destinatortechnologies.net">Destinator Technologies</ulink>
+  is a software for PNDs, Smartphones and PDAs.
+</para>
+<para>
+  <userinput>
+    gpsbabel -i destinator_trl -f last_trip.dat -o gpx -F last_trip.gpx
+  </userinput>
+</para>
diff --git a/xmldoc/formats/dg-100.xml b/xmldoc/formats/dg-100.xml
new file mode 100644 (file)
index 0000000..35b95bb
--- /dev/null
@@ -0,0 +1,19 @@
+<para>Serial download protocol for the <productname>GlobalSat DG-100</productname> GPS data logger. Although untested it is expected that this will also support the BT-335.</para>
+<para>While the DG-100 has a button to record waypoints, they seem to be indistinguishable from trackpoints. Therefore, all points will be presented as trackpoints, disregarding whether they were recorded automatically or manually.</para>
+<para>
+<ulink url="http://www.globalsat.com.tw/eng/product_detail_00000090.htm">GlobalSat DG-100</ulink>
+</para>
+<example id="dg-100-on-linux">
+  <title>Command showing DG-100 download and erase on Linux</title>
+  <para><userinput>gpsbabel -t -i dg-100,erase -o gpx /dev/ttyUSB0 outputfile.gpx</userinput></para>
+</example>
+
+<para>
+The DG-100 provides a physical USB interface to the host computer, but
+internally it uses a Prolific PL-2303 chip to do this.  So you must have
+drivers installed on your computer to recognize the PL-2303 and provide
+that data as a serial port to software like GPSBabel.   Such software
+comes with the unit for Windows.  Prolific provides software for Mac OS/X,
+but unfortunately their driver has a defect which makes it unusable with
+GPSBabel.
+</para>
diff --git a/xmldoc/formats/exif.xml b/xmldoc/formats/exif.xml
new file mode 100644 (file)
index 0000000..4d69586
--- /dev/null
@@ -0,0 +1,12 @@
+<para>
+  This format reads GPS information embedded in 
+   <ulink url="http://www.exif.org">EXIF </ulink>, 
+   the Exchangeable Image Format, data.  EXIF is a standardized method
+  of encoding data in pictures such as JPEG, TIFF, and WAV and is frequently
+  used by mobile phones with cameras, cameras with built-in GPS.
+</para>
+<para>
+  EXIF is frequently used for Geolocating photographs so their images can be
+  correlated with time and location.
+</para>
+
index e548a637558bf96d0a7f334f4a1d9e56a3f863fd..db734eb4c8354e61e52db6ecc6b18a9e10cf4a1e 100644 (file)
@@ -1,5 +1,5 @@
 <para>
-  Like GPSBabel <ulink url="http://www.gpsinformation.org/ronh/g7towin.htm">G7ToWin</ulink> is a program which allows uploading and
+  Like GPSBabel, <ulink url="http://www.gpsinformation.org/ronh/g7towin.htm">G7ToWin</ulink> is a program which allows uploading and
   downloading information from several GPS devices (Garmin, Lowrance/Eagle, Magellan).
   G7ToWin has its own data format, which is an enhanced format used in Gardown.
 </para>
index a41cedfbd7382e90646dd9b6adf000ce6cd59cf9..879dcdc7aea6e7992fab19cbd88d0a4a8b02aec4 100644 (file)
@@ -117,10 +117,20 @@ support Garmin communication protocol and don't work with the
 <option>garmin</option> option.  To use these receivers, read or write
 GPX files from the mass storage device as mounted on your computer.
 <simplelist columns="4">
+<member>Colorado 300<footnoteref linkend="gpx"/></member>
+<member>Colorado 400c<footnoteref linkend="gpx"/></member>
+<member>Colorado 400i<footnoteref linkend="gpx"/></member>
+<member>Colorado 400t<footnoteref linkend="gpx"/></member>
 <member>Nuvi 200<footnoteref linkend="gpx"/></member>
+<member>Nuvi 205<footnoteref linkend="gpx"/></member>
 <member>Nuvi 200W<footnoteref linkend="gpx"/></member>
+<member>Nuvi 205W<footnoteref linkend="gpx"/></member>
 <member>Nuvi 250<footnoteref linkend="gpx"/></member>
+<member>Nuvi 255<footnoteref linkend="gpx"/></member>
 <member>Nuvi 250W<footnoteref linkend="gpx"/></member>
+<member>Nuvi 255W<footnoteref linkend="gpx"/></member>
+<member>Nuvi 260<footnoteref linkend="gpx"/></member>
+<member>Nuvi 260W<footnoteref linkend="gpx"/></member>
 <member>Nuvi 270<footnoteref linkend="gpx"/></member>
 <member>Nuvi 300<footnote id="gpx"><para>This unit uses GPX format, not Garmin protocol.  Therefore one should communicate with it by reading and writing GPX files instead of using this format.  Members of this class of products do not support realtime positioning protocol.</para></footnote></member>
 <member>Nuvi 310<footnoteref linkend="gpx"/></member>
@@ -132,6 +142,11 @@ GPX files from the mass storage device as mounted on your computer.
 <member>Nuvi 660<footnoteref linkend="gpx"/></member>
 <member>Nuvi 670<footnoteref linkend="gpx"/></member>
 <member>Nuvi 680<footnoteref linkend="gpx"/></member>
+<member>Nuvi 750<footnoteref linkend="gpx"/></member>
+<member>Nuvi 760<footnoteref linkend="gpx"/></member>
+<member>Nuvi 770<footnoteref linkend="gpx"/></member>
+<member>Nuvi 780<footnoteref linkend="gpx"/></member>
+<member>Nuvi 880<footnoteref linkend="gpx"/></member>
 <member>StreetPilot c510<footnoteref linkend="gpx"/></member>
 <member>StreetPilot c530<footnoteref linkend="gpx"/></member>
 <member>StreetPilot c550<footnoteref linkend="gpx"/></member>
@@ -214,3 +229,37 @@ This module also supports <link linkend="tracking">realtime tracking</link>
 which allows realtime position reports from a Garmin GPS receiver over USB
 or serial.  
 </para>
+
+<important>
+<para>The following Garmin units do not follow the standard Garmin 
+communications protocol and are <emphasis>not supported</emphasis> 
+by GPSBabel.</para>
+<para>
+Marine plotters:
+<simplelist columns="4">
+<member>GPSMap 420</member>
+<member>GPSMap 430</member>
+<member>GPSMap 440</member>
+<member>GPSMap 450</member>
+<member>GPSMap 520</member>
+<member>GPSMap 525</member>
+<member>GPSMap 530</member>
+<member>GPSMap 535</member>
+<member>GPSMap 540</member>
+<member>GPSMap 545</member>
+<member>GPSMap 550</member>
+<member>GPSMap 555</member>
+</simplelist>
+</para>
+
+<para>The PDA products
+<simplelist>
+<member>iQue 3000</member>
+<member>iQue 3200</member>
+<member>iQue 3600</member>
+<member>iQue M3</member>
+<member>iQue M4</member>
+<member>iQue M5</member>
+</simplelist>
+</para>
+</important>
index 14d5f379d540ad25c053e1e88084cc6f4a895146..5472e78593758c3a4ace8aab3b27fe3db8030f46 100644 (file)
@@ -1,7 +1,7 @@
 <para>
-   The format garmin_gpi supports binary POI (.gpi) files useable
-   on newer Garmin GPS receivers (see also <link linkend="fmt_garmin_poi">garmin_poi</link> for some hints).
-   <ulink url="http://www.garmin.com/support/agree.jsp?id=927">Garmin POI-Loader</ulink> is the standard application that creates GPI's
+   The format garmin_gpi supports the binary POI (.gpi) files that are useable
+   on newer Garmin GPS receivers.  See <link linkend="fmt_garmin_poi">garmin_poi</link> for additional information about Garmin's own Poiloader program.
+   <ulink url="http://www.garmin.com/support/agree.jsp?id=927">Garmin POI-Loader</ulink> is the standard application that creates GPI files
    with all possible features.
 </para>
 <para>
    a GPI file, please provide that file (mailto:gpsbabel-misc@lists.sourceforge.net).
 </para>
 <para>
-   At this time we don't support special features as "Tour-Guide", alerts or links
+   At this time we don't support special features as "Tour-Guide" or links
    to sounds and pictures.
 </para>
+<important>
+<para>
+   Creation timestamp issue: See option <link linkend="fmt_garmin_gpi_o_sleep">sleep</link> !!!
+</para>
 <para>
        This module does not support direct transfer of .GPI files to
        receivers in Garmin protocol mode.  For units like Nuvi, Zumo, or 
        Streetpilot, just choose a file that's on the drive where your
-       GPS is mounted.   For units like the X series (GPSMap60, etc.) 
+       GPS is mounted.   For units like the X series (GPSMap 60CSx, GPSMap 60Cx, Legend Hcx, etc.) 
        you must explictly put the unit in mass storage mode or mount
        the memory chip in an external reader and transfer the file 
        directly.
 </para>
+</important>
 <example id="all_garmin_gpi_options">
   <title>Command showing garmin_gpi output example</title>
   <para>
index a3ab06f3db1fc6a37655dd7a84a6bc897730fc7a..9b76cc72588df10c30d0af89296ad9ec31d3b9d0 100644 (file)
@@ -7,6 +7,6 @@
 </para>
 <para>
    We can also read some GPS data (including coordinates) from version 2.5. But 
-   it seems, that this newer version doesn't more store time stamps. This can be 
+   it seems, that this newer version no longer stores time stamps. This can be 
    a problem when converting to other formats or if you want to use our track filter.
 </para>
index d458c7cb1ffb213be2a510d23600ca09843f4d8a..2145bc92219cccf27eff267b6e930b5145edab7c 100644 (file)
@@ -2,7 +2,7 @@
       
       
       <para> This format is designed to read the XML emitted when you
-tack "&amp;output=js" onto the end of a <ulink url="http://www.maps.google.com>Google Maps">Google Maps</ulink>route URL (use
+tack "&amp;output=js" onto the end of a <ulink url="http://maps.google.com>Google Maps">Google Maps</ulink> route URL (use
 the "link to this page" option to get a usable URL.)  This allows you
 to plan a route using Google Maps, then download it and use it in your
 own mapping program or GPS receiver.   To get a file suitable for use
index 5cb72f0afb5408b10916b33d8b1326a1105f2f7e..c69eb2c2a664083297392fb038e0df0085ff66d4 100644 (file)
@@ -2,6 +2,6 @@
       
       
       <para>GpsDrive way.txt file format. A space seperated format
-file. Tested against GpsDrive v 1.30 found at <ulink url="http://www.kraftvoll.at/software">kraftvoll.at</ulink>.
+file. Tested against GpsDrive v 1.30 found at <ulink url="http://www.gpsdrive.de">gpsdrive.de</ulink>.
 Contributed by Alan Curry.</para>
     
index 9f68c0ae2e7c9bd6bbaf10d6cc24aa12f87babfa..d70cb77af245a2acb95514159dbd44d57c1af2ab 100644 (file)
@@ -9,6 +9,6 @@ supported by EasyGPS, ExpertGPS, and many other programs described at
        <para>
        GPSBabel's reader of this module attempts to preserve tags it doesn't
        really understand.   It also tries to glean interesting data from
-       <ulink url="http://www.geocaching.com">pocket queries from Geocaching.com</ulink>.
+       <ulink url="http://www.geocaching.com">pocket queries from Geocaching.com</ulink> and Garmin's "gpxx" GPX extensions.
        </para>
     
diff --git a/xmldoc/formats/ik3d.xml b/xmldoc/formats/ik3d.xml
new file mode 100644 (file)
index 0000000..d23ed78
--- /dev/null
@@ -0,0 +1,11 @@
+<para>
+  This is the format for <ulink url="http://www.magicmaps.de">MagicMaps</ulink> project (.ikt) files.
+</para>
+<para>
+  <ulink url="http://www.magicmaps.de">MagicMaps</ulink> <productname>"Das interaktive Kartenwerk"</productname> is a Software from Germany. It's a
+  route-planning software with a 3-dimensional envirounment.
+</para>
+<para>
+  The project files are XML based and we can read the main GPS items (names and coordinates). 
+  For an output these files are too complex.
+</para>
index b35632ba021dca0178cc2f098bd15ca2b285c9f9..e51a425737874cb775dd23d630b71fbb9b1298a5 100644 (file)
@@ -1,10 +1,33 @@
 <para> 
 KML, the Keyhole Markup Language, is used by Keyhole and
-<ulink url="http://earth.google.com">Google Earth</ulink>.  There are features in this file format that GPSBabel
-doesn't support - such as camera views - but waypoints, tracks, and routes 
-work well.
+<ulink url="http://earth.google.com">Google Earth</ulink>.  
+</para>
+<para>There are concepts in KML that GPSBabel can't support very well on 
+read becuase they don't map well into other programs.  For example, KML has
+ideas of camera views and names and descriptions can have arbitrarily 
+complicated HTML in them.   KML files may have tiered "Styles" which
+can identify sizing info and URLs of associated icons.   Reading such
+files with GPSBabel - even if your goal it to out to KML - can often
+have suprising results.  Simple files with waypoints and paths (which
+GPSBabel represents internally as tracks) work fine.
 </para>
 <para>
 Google Earth also uses GPSBabel internally for receiver communications
 and several file format imports and exports.
 </para>
+<para>
+In general, GPSBabel's KML writer is relatively strong.  GPSBabel handles simple KML on read fairly well, but if you're dealing with handcrafted KML that uses extensive features that have no analog in other formats like nested folders, ringgeometry, camera angles, and such, don't expect GPSBabel to do well with them on read.
+</para>
+<para>
+  Google Earth 4.0 and later have a feature that can suprise users of this 
+  format.   Earth's "time slider" feature controls what timestamped data
+  gets displayed.  If you're using data that has timestampes (e.g. GPX 
+  points that contain time or almost any track data) this will be important
+  to you.  The time slider defaults to the far left position and fully closed.
+  This means that only the first data point will be displayed.  You can
+  tweak Earth's settings to "view-&gt;show time-&gt;never" or
+  you can widen the time slider to show the range of data of interest.
+</para>
+<para>
+  See <ulink url="http://earth.google.com/userguide/v4/ug_gps.com#timeline">Google Earth's documentation on timelines</ulink> for more info.
+</para>
index 2ace12f667917bf9a120e4d3a1e4507ea39cbeb6..31fd17dbf86d4ea28f9a7e5a302ab31f064f0816 100644 (file)
@@ -1,5 +1,3 @@
 
-      
-      
-      <para>Support for Kartex 5 trackfiles. For more info see kwf2.</para>
+      <para>Support for Kartex 5 trackfiles. For more info see <link linkend="fmt_kwf2">kwf2</link>.</para>
     
diff --git a/xmldoc/formats/lmx.xml b/xmldoc/formats/lmx.xml
new file mode 100644 (file)
index 0000000..8f512a8
--- /dev/null
@@ -0,0 +1,6 @@
+<para> 
+This format supports Nokia Landmark Exchange (LMX) files used by several
+Nokia phones.   GPSBabel supports only the traditional XML format and 
+not the compressed binary format.   
+</para>
+
index b86c1904b6c3dde7abb0537c334e7d5e3ab0164f..831285c8b7fa35bf782845a53649e55f3c7843e9 100644 (file)
@@ -44,3 +44,53 @@ The RoadMate family of products is not supported.
        format over this one.
 
 </para>
+<important>
+<para>
+This module does not support the units that do not follow Magellan's
+documented communications protocols including:</para>
+<simplelist columns="2">
+<member>Maestro 3100</member>
+<member>Maestro 3140</member>
+<member>Maestro 3200</member>
+<member>Maestro 3210</member>
+<member>Maestro 3220</member>
+<member>Maestro 3225</member>
+<member>Maestro 3250</member>
+<member>Maestro 4000</member>
+<member>Maestro 4040</member>
+<member>Maestro 4050</member>
+<member>Maestro 4200</member>
+<member>Maestro 4210</member>
+<member>Maestro 4220</member>
+<member>Maestro 4250</member>
+<member>Maestro 5310</member>
+
+<member> RoadMate 300 </member>
+<member> RoadMate 360 </member>
+<member> RoadMate 500</member>
+<member> RoadMate 700 </member>
+<member> RoadMate 760</member>
+<member> RoadMate 800</member>
+<member> RoadMate 860T</member>
+<member> RoadMate 1200 </member>
+<member> RoadMate 1400 </member>
+<member> RoadMate 1412 </member>
+<member> RoadMate 1430 </member>
+<member> RoadMate 2000 </member>
+<member> RoadMate 2000 </member>
+<member> RoadMate 2200T</member>
+<member> RoadMate 3000T</member>
+<member> RoadMate 3050T</member>
+<member> RoadMate 6000T</member>
+<member> RoadMate AAA </member>
+
+<member> Triton 200 </member>
+<member> Triton 300 </member>
+<member> Triton 400 </member>
+<member> Triton 500 </member>
+<member> Triton 1500 </member>
+<member> Triton 2000 </member>
+
+</simplelist>
+
+</important>
index 699384c5b1492a4e3a72c3e8b8b0d66259011aaf..d1d4d36b2c4fb971406a97fc638290b0772ee2bd 100644 (file)
@@ -2,7 +2,9 @@
       
       
       <para> Input support for Microsoft AutoRoute 2002-2006 .axe files
-and Microsoft Streets and Trips .est files.
+and Microsoft Streets and Trips .est files.  This is for reading routes
+created this program and is different than the <link linkend="fmt_s_and_t">
+s_and_t</link> format used for writing pushpins.</para><para>
 These files contains only routes. We can extract the coordinates and
 the names of the points within route. An export to this format will
 not be supported.</para>
index 699384c5b1492a4e3a72c3e8b8b0d66259011aaf..d1d4d36b2c4fb971406a97fc638290b0772ee2bd 100644 (file)
@@ -2,7 +2,9 @@
       
       
       <para> Input support for Microsoft AutoRoute 2002-2006 .axe files
-and Microsoft Streets and Trips .est files.
+and Microsoft Streets and Trips .est files.  This is for reading routes
+created this program and is different than the <link linkend="fmt_s_and_t">
+s_and_t</link> format used for writing pushpins.</para><para>
 These files contains only routes. We can extract the coordinates and
 the names of the points within route. An export to this format will
 not be supported.</para>
diff --git a/xmldoc/formats/mtk-bin.xml b/xmldoc/formats/mtk-bin.xml
new file mode 100644 (file)
index 0000000..6d5b057
--- /dev/null
@@ -0,0 +1,26 @@
+<para>Binary file protocol converter for MTK based GPS loggers.
+This format reads the raw binary format created by the MTK Windows application
+and outputs to other formats  supported by GPSBabel
+When using the csv option a MTK application compatible output file will also be created.</para>
+<para>
+It has been tested with <productname>Transystem i-Blue 747</productname> but other devices should
+work as well (Qstarz BT-Q1000, iTrek Z1, ...)
+</para><para>
+All position items (including button push) will be listed as trackpoints in the output. 
+Log items due to button push are presented as waypoints. 
+In theory we would not add waypoints to the list of trackpoints. But as the MTK logger restart the 
+log session from the button press we would loose a trackpoint unless we include/duplicate it.
+
+</para>
+<para>
+<ulink url="http://www.transystem.com.tw/p-gps-iblue747.htm">Transystem i-Blue 747</ulink>
+</para>
+<example id="mtk-bin-on-linux">
+  <title>Convert MTK binary trackpoints to GPX</title>
+  <para>
+  <userinput>gpsbabel -t -i mtk-bin,csv=extra.csv -f data.bin -o gpx -F out.gpx</userinput>
+   Additionally a CSV output file is created.
+  </para>
+
+</example>
+
diff --git a/xmldoc/formats/mtk.xml b/xmldoc/formats/mtk.xml
new file mode 100644 (file)
index 0000000..196b6a3
--- /dev/null
@@ -0,0 +1,21 @@
+<para>Serial download protocol for the <productname>i-Blue 747</productname> and other MTK based GPS data loggers. Observe that it is only possible to download data using USB cable, Bluetooth requires a hardware modification.</para>
+<para>
+<ulink url="http://www.transystem.com.tw/p-gps-iblue747.htm">Transystem i-Blue 747</ulink>
+Downloaded data will be stored in data.bin file in the current directory together with
+the choosen output format.
+</para>
+<para>It has been tested with Transystem i-Blue 747 but other devices should work as well (Qstarz BT-Q1000, iTrek Z1, ...)</para>
+
+<para>See <link linkend="fmt_mtk-bin">mtk-bin</link> on how trackpoints/waypoints are handled</para>
+<example id="mtk-on-linux">
+  <title>Command showing MTK download track and waypoints and erase on Linux</title>
+  <para><userinput>gpsbabel -t -w -i mtk,erase -f /dev/ttyUSB0 -o gpx -F out.gpx</userinput></para>
+</example>
+    
+<para>
+  For more info and tweaks on MTK based loggers: 
+   <ulink url="http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=81990">MTK Tips ans Tweaks</ulink>
+   <ulink url="http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=81315">iBlue 747 Logger</ulink>
+ For info about the used log format:
+  <ulink url="http://spreadsheets.google.com/pub?key=pyCLH-0TdNe-5N-5tBokuOA&amp;gid=5">MTK binary format</ulink>
+</para>
diff --git a/xmldoc/formats/navilink.xml b/xmldoc/formats/navilink.xml
new file mode 100644 (file)
index 0000000..aae5985
--- /dev/null
@@ -0,0 +1,32 @@
+<para>
+       GPSBabel supports the Navilink protocol used by the
+       <ulink url="http://www.locosystech.com/product.php?zln=en&amp;id=5">Locosys GT-11</ulink>
+       GPS receivers. These are sold under a variety of names including:
+<simplelist columns="3">
+       <member>NaviGPS</member>
+       <member>NaviGPS-BT</member>
+       <member>GT-11</member>
+       <member>BGT-11</member>
+       <member>Amaryllo</member>
+</simplelist>
+</para>
+<para>
+       This format is used for both the serial protocol used on
+       the USB link and for the files which can be copied from the
+       internal memory to the SD card using recent firmware versions.
+</para>
+<para>
+       If you specify a serial port for the file (.e.g. "COM1", "/dev/ttyUSB0")
+       to be read or written, GPSBabel will use the serial protocol. Specifying
+       a file, either on local filesystem or on a mounted flash card reader,
+       will results in the file-based format being used.
+</para>
+<para>
+       To access the device using the serial protocol over USB the
+       device needs to be in Navilink mode, which can be activated
+       from the main menu of the device.
+</para>
+<para>
+       Details of the Navilink serial protocol can be found
+       <ulink url="http://wiki.splitbrain.org/navilink">here</ulink>.
+</para>
diff --git a/xmldoc/formats/options/dg-100-erase.xml b/xmldoc/formats/options/dg-100-erase.xml
new file mode 100644 (file)
index 0000000..95424f0
--- /dev/null
@@ -0,0 +1 @@
+<para>This option erases the track log from the device after download.</para>
diff --git a/xmldoc/formats/options/exif-filename.xml b/xmldoc/formats/options/exif-filename.xml
new file mode 100644 (file)
index 0000000..58f90f2
--- /dev/null
@@ -0,0 +1,10 @@
+<para>
+  With this default option waypoint names are generated from source filename.
+</para>
+<para>
+  <userinput>
+     gpsbabel -i exif -f "C:\Pictures\IMG_1199.JPG",filename=Y -o gpx -F OUT.GPX
+  </userinput>
+  The resulting waypoint in OUT.GPX has name IMG_1199.
+</para>
+
diff --git a/xmldoc/formats/options/garmin-bitscategory.xml b/xmldoc/formats/options/garmin-bitscategory.xml
new file mode 100644 (file)
index 0000000..5b2c8d6
--- /dev/null
@@ -0,0 +1,19 @@
+<para>
+ This option is closely related to the 'category' option.  While category 
+ allows you to choose a single category that waypoints should appear in,
+ this options allows you to specify a bitmask to be used for the category.
+ Options may be specified in either decimal or hex.
+</para>
+<example id="garmin_bitcategory">
+  <title>Example for garmin bitcategory option to put all waypoints in categories 1 and 16.</title>
+<para>
+  The following two commands are equivalent.  They place a the point in both the first and last of the sixteen available categories.
+  <userinput>
+        gpsbabel -i gpx -f PocketQuery.gpx -o garmin,bitcategory=32769 -F usb:
+  </userinput>
+  <userinput>
+        gpsbabel -i gpx -f PocketQuery.gpx -o garmin,bitcategory=0x8001 -F usb:
+  </userinput>
+  
+</para>
+</example>
diff --git a/xmldoc/formats/options/garmin-resettime.xml b/xmldoc/formats/options/garmin-resettime.xml
new file mode 100644 (file)
index 0000000..151a43f
--- /dev/null
@@ -0,0 +1,10 @@
+<para>
+  This option is experimental and was added to solve a very specific problem.
+  Certain Garmin units (the original black and white Vista is known to have 
+  this) will sometimes scramble their clock crazy far into the future (like
+  2066).  When this happens, the GPS itself may or may not work and 
+  later conversations with GPSBabel may fail as the time overflows the
+  documented range.  The use of <option>resettime</option> brings the GPS's internal clock
+  back close enough to reality that the GPS itself can then "fix" it when
+  it has next a lock.
+</para>
diff --git a/xmldoc/formats/options/garmin_gpi-alerts.xml b/xmldoc/formats/options/garmin_gpi-alerts.xml
new file mode 100644 (file)
index 0000000..e02e13c
--- /dev/null
@@ -0,0 +1,15 @@
+<para>
+   Because speed isn't a real member of a normal waypoint, you can put the speed values into
+   the waypoint names. "Point@30" will result in a speed value of 30. By default we assume these
+   values are in kilometers per hour.
+</para>
+<para>
+   Proximity distance is also supported by <link linkend="fmt_gpx">GPX</link>, <link linkend="fmt_gdb">Garmin GDB</link>, <link linkend="fmt_ozi">OZI Explorer</link>, 
+   <link linkend="fmt_compegps">CompeGPS</link> and <link linkend="fmt_unicsv">Universal CSV</link>.
+</para>
+<para>
+  <userinput>
+    gpsbabel -i gpx -f "warnings.gpx" -o garmin_gpi,alerts=1 -F "warnings.gpi"
+  </userinput>
+</para>
+
diff --git a/xmldoc/formats/options/garmin_gpi-proximity.xml b/xmldoc/formats/options/garmin_gpi-proximity.xml
new file mode 100644 (file)
index 0000000..7b3d519
--- /dev/null
@@ -0,0 +1,64 @@
+<para>
+  When no proximity data is available in the source input, GPSBabel uses this as the default proximity value.
+  The parameter has to be in meters, or, when units=s specified, in miles.
+  <link linkend="fmt_garmin_gpi_o_alerts">alerts</link> are automatically enabled.
+</para>
+<example id="garmin_gpi_speedcams">
+<title>Read GPX file, create GPI to alert when you're 1/2 mile from a speed camera.</title>
+<para>
+  <userinput>
+    gpsbabel -i gpx -f "SpeedCameras.gpx" -o garmin_gpi,units=s,proximity=0.5 -F "SpeedCameras.gpi"
+  </userinput>
+</para>
+</example>
+<para>
+  Its also possible to append a specific distance unit to the parameter.
+</para>
+<para>
+  <userinput>
+    gpsbabel -i gpx -f "SpeedCameras.gpx" -o garmin_gpi,proximity=500m -F "SpeedCameras.gpi"
+  </userinput>
+</para>
+<para>
+  <table id="distance_units">
+  <title>Supported distance units</title>
+  <tgroup cols="2">
+  <thead>
+  <row>
+    <entry>Unit</entry> 
+    <entry>Description</entry> 
+  </row>
+  </thead>
+  <tbody>
+  <row>
+    <entry>fa</entry>
+    <entry>Fathoms</entry>
+  </row>
+  <row>
+    <entry>feet</entry>
+    <entry>Feet</entry>
+  </row>
+  <row>
+    <entry>ft</entry>
+    <entry>Feet</entry>
+  </row>
+  <row>
+    <entry>km</entry>
+    <entry>Kilometers</entry>
+  </row>
+  <row>
+    <entry>m</entry>
+    <entry>Meters</entry>
+  </row>
+  <row>
+    <entry>mi</entry>
+    <entry>Miles</entry>
+  </row>
+  <row>
+    <entry>nm</entry>
+    <entry>Nautical miles</entry>
+  </row>
+</tbody>
+</tgroup>
+</table>
+</para>
diff --git a/xmldoc/formats/options/garmin_gpi-sleep.xml b/xmldoc/formats/options/garmin_gpi-sleep.xml
new file mode 100644 (file)
index 0000000..094fb5f
--- /dev/null
@@ -0,0 +1,16 @@
+<para>
+  The Garmin units seem to use the creation timestamp of GPI files for internal purposes. 
+  In other words,  if you load GPI files with same creation timestamp on your device, 
+  strange things will happen,  such as having missing or repeated POIs. With the sleep option, GPSBabel waits a given
+  number of seconds after the GPI file was written.
+</para>
+<para>
+  In the normal case of using GPSBabel from the command line or from the GUI, the chance of creating files
+  with the same timestamp is in the nearly ZERO. In scripts or batch files where you are writing multiple files - even from different GPSBabel instances - the odds of this happening is rather good.
+  The sleep option forces GPSBabel to wait after creating a file to ensure the timestamps are unique. Values are specified in seconds and can be 1 or more.
+</para>
+<para>
+  <userinput>
+    gpsbabel -i gpx -f "SpeedCameras.gpx" -o garmin_gpi,sleep=1 -F "SpeedCameras.gpi"
+  </userinput>
+</para>
diff --git a/xmldoc/formats/options/garmin_gpi-speed.xml b/xmldoc/formats/options/garmin_gpi-speed.xml
new file mode 100644 (file)
index 0000000..61ca356
--- /dev/null
@@ -0,0 +1,66 @@
+<para>
+  When no speed data is available in the source input, GPSBabel uses this as the default speed value.
+  The parameter has to be in kilometers per hour, or, when units=s specified,
+  in miles per hour. <link linkend="fmt_garmin_gpi_o_alerts">alerts</link> are
+  automatically enabled.
+</para>
+<para>
+  <userinput>
+    gpsbabel -i gpx -f "SpeedCameras.gpx" -o garmin_gpi,units=s,speed=30 -F "SpeedCameras.gpi"
+  </userinput>
+</para>
+<para>
+  Its also possible to append a specific speed unit to the parameter.
+</para>
+<para>
+  <userinput>
+    gpsbabel -i gpx -f "SpeedCameras.gpx" -o garmin_gpi,speed=30mph -F "SpeedCameras.gpi"
+  </userinput>
+</para>
+<para>
+  <table id="speed_units">
+  <title>Supported speed units</title>
+  <tgroup cols="2">
+  <thead>
+  <row>
+    <entry>Unit</entry> 
+    <entry>Description</entry> 
+  </row>
+  </thead>
+  <tbody>
+  <row>
+    <entry>km/h</entry>
+    <entry>Kilometers per hour</entry>
+  </row>
+  <row>
+    <entry>kmh</entry>
+    <entry>Kilometers per hour</entry>
+  </row>
+  <row>
+    <entry>kph</entry>
+    <entry>Kilometers per hour</entry>
+  </row>
+  <row>
+    <entry>kt</entry>
+    <entry>Knots</entry>
+  </row>
+  <row>
+    <entry>knot</entry>
+    <entry>Knots</entry>
+  </row>
+  <row>
+    <entry>m/s</entry>
+    <entry>Meters per second</entry>
+  </row>
+  <row>
+    <entry>mps</entry>
+    <entry>Meters per second</entry>
+  </row>
+  <row>
+    <entry>mi/h</entry>
+    <entry>Miles per hour</entry>
+  </row>
+</tbody>
+</tgroup>
+</table>
+</para>
diff --git a/xmldoc/formats/options/garmin_gpi-unique.xml b/xmldoc/formats/options/garmin_gpi-unique.xml
new file mode 100644 (file)
index 0000000..3985fa9
--- /dev/null
@@ -0,0 +1,9 @@
+<para>
+   Don't create unique names sample:
+</para>
+<para>
+  <userinput>
+    gpsbabel -i gpx -f "My Points.gpx" -o garmin_gpi,unique=0 -F "My Points.gpi"
+  </userinput>
+</para>
+
diff --git a/xmldoc/formats/options/garmin_gpi-units.xml b/xmldoc/formats/options/garmin_gpi-units.xml
new file mode 100644 (file)
index 0000000..fc344b7
--- /dev/null
@@ -0,0 +1,7 @@
+<para>
+   Sample command tells GPSBabel to handle speed values in miles per hour:
+  <userinput>
+    gpsbabel -i gpx -f "My Points.gpx" -o garmin_gpi,units=s -F "My Points.gpi"
+  </userinput>
+</para>
+
index 924666cba32b451dafa2e8404b8a37209ecaa404..4db42f8869a5835c2bc2f98f413cb6dcd4ebbb68 100644 (file)
   <entry>Universal Transverse Mercator</entry>
   <entry>33 U 318293 5637154</entry>
 </row>
+<row>
+  <entry>5</entry>
+  <entry>swiss</entry>
+  <entry>Swiss grid</entry>
+  <entry>776519 167359</entry>
+</row>
 </tbody>
 </tgroup>
 </table>
diff --git a/xmldoc/formats/options/gdb-bitscategory.xml b/xmldoc/formats/options/gdb-bitscategory.xml
new file mode 100644 (file)
index 0000000..32f3815
--- /dev/null
@@ -0,0 +1,19 @@
+<para>
+ This option is closely related to the 'category' option.  While category 
+ allows you to choose a single category that waypoints should appear in,
+ this options allows you to specify a bitmask to be used for the category.
+ Options may be specified in either decimal or hex.
+</para>
+<example id="gdb_bitscategory">
+  <title>Example for gdb bitcategory option to put all waypoints in categories 1 and 16.</title>
+<para>
+  The following two commands are equivalent.  They place a the point in both the first and last of the sixteen available categories.
+  <userinput>
+        gpsbabel -i gpx -f PocketQuery.gpx -o gdb,bitscategory=32769 -F foo.gdb
+  </userinput>
+  <userinput>
+        gpsbabel -i gpx -f PocketQuery.gpx -o gdb,bitscategory=0x8001 -F foo.gdb
+  </userinput>
+  
+</para>
+</example>
index 76ac5ddf8f2dbd53dbaa866a5fe48580c9c29423..296d7b03f664f3f99ce7f7b1b04cbfe92252fa1b 100644 (file)
@@ -12,8 +12,8 @@
     </userinput>
   </para>
   <para>
-    Because gdb creates internal a route AND a waypoint list, you have to drop all
-    waypoints and transform the route into waypoints. So you'll get a well ordered
-    html output. We sugess these steps for all waypoint-only formats as html. 
+    Because gdb internally creates a route AND a waypoint list, you have to drop all
+    waypoints and transform the route into waypoints in order to get a well ordered
+    html output. We suggest these steps for all waypoint-only formats as html. 
   </para>
 </example>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..2739b48895212a102ac5fecc24de58fd3e369855 100644 (file)
@@ -1 +1,6 @@
-
+<para>
+       When reading <ulink url="http://www.geocaching.com"> Groundspeak Pocket Queries </ulink>, the <option>logpoint</option> option creates additional waypoints from the log entries.
+</para>
+<para>
+       A typical use for this is to get coordinates read from "corrected coordinates" logs.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..999bb258966488ea4d66d0016a5ca61ccfcb668b 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  When used with the <option> -s </option> to control shortnames, the snlen suboption to GPX controls how long the generated smartname will be.  This can be useful for cases like writing GPX files to a GPS that has a fixed waypoint name length.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..e5fc040633ee9c212c1ec74e120cd1d0c4709bec 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+When used with the <option>-s</option> to generate smart shortnames, this suboption controls whether whitespace is allowed in the generated shortnames.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..fefa663cfcf10dd76119d9542ff682c7f93aaac8 100644 (file)
@@ -1 +1,4 @@
+<para>
+  This is a fairly esoteric option.  If the GPX file you are reading has only base pathnames (e.g "foo.html") the value you specify to this argument will be prepended to that.  For example, "-o gpx,urlbase=c:\My Documents\Whatever" would result in the link to that waypoint being written to refer to <filename>c:\My Document\WHatever\foo.html</filename>
+</para>
 
diff --git a/xmldoc/formats/options/kml-trackdirection.xml b/xmldoc/formats/options/kml-trackdirection.xml
new file mode 100644 (file)
index 0000000..6449dd0
--- /dev/null
@@ -0,0 +1,4 @@
+<para>
+  If set, this options creates directional icons for trackpoints.   Arrows 
+  will show the direction of travel on drawn tracks and routes.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..5e05476af727edea832a641ba0074c385cb91e5d 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  The deficon option is used to control the icon output when writing to this format.   It overrides any icon informatino that might be present in the source data.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..5e05476af727edea832a641ba0074c385cb91e5d 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  The deficon option is used to control the icon output when writing to this format.   It overrides any icon informatino that might be present in the source data.
+</para>
diff --git a/xmldoc/formats/options/mtk-bin-csv.xml b/xmldoc/formats/options/mtk-bin-csv.xml
new file mode 100644 (file)
index 0000000..5426f27
--- /dev/null
@@ -0,0 +1,8 @@
+<para>
+  Specifies a filename into which  MTK-compatible CSV output will be written.
+</para>
+<para>
+  Note that this option is a bit of an oddity in the GPSBabel arsenal.  This
+  should probably be a "real" output type of its own instead of being bolted
+  onto an input type.
+</para>
diff --git a/xmldoc/formats/options/mtk-csv.xml b/xmldoc/formats/options/mtk-csv.xml
new file mode 100644 (file)
index 0000000..eed4a2f
--- /dev/null
@@ -0,0 +1,2 @@
+<para>This option will create an additional CSV output file.
+The CSV file is compatible with the original MTK logger application.</para>
diff --git a/xmldoc/formats/options/mtk-erase.xml b/xmldoc/formats/options/mtk-erase.xml
new file mode 100644 (file)
index 0000000..95424f0
--- /dev/null
@@ -0,0 +1 @@
+<para>This option erases the track log from the device after download.</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..e93b2e21c48e82c1ec1614f684e95a110ce79473 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  If this option is present, retired (archived) caches will be suppressed on write.
+</para>
diff --git a/xmldoc/formats/options/navilink-nukerte.xml b/xmldoc/formats/options/navilink-nukerte.xml
new file mode 100644 (file)
index 0000000..2a3bfed
--- /dev/null
@@ -0,0 +1,10 @@
+<para>
+This option erases all routes in the receiver before doing a transfer.
+</para>
+<para>
+This is a convenient option to use in automated processes where you want
+to ensure the units starts with a clean state before sending routes to
+it.   Using this option on transmit is a better idea than doing it on 
+receive since the latter would erase all the waypoints before asking the
+unit to send all the waypoints.
+</para>
diff --git a/xmldoc/formats/options/navilink-nuketrk.xml b/xmldoc/formats/options/navilink-nuketrk.xml
new file mode 100644 (file)
index 0000000..e9a5f4b
--- /dev/null
@@ -0,0 +1,10 @@
+<para>
+This option erases all track data in the receiver before doing a transfer.
+</para>
+<para>
+This is a convenient option to use in automated processes where you want
+to ensure the units starts with a clean state before sending track data to
+it.   Using this option on transmit is a better idea than doing it on 
+receive since the latter would erase all the waypoints before asking the
+unit to send all the waypoints.
+</para>
diff --git a/xmldoc/formats/options/navilink-nukewpt.xml b/xmldoc/formats/options/navilink-nukewpt.xml
new file mode 100644 (file)
index 0000000..5ca8916
--- /dev/null
@@ -0,0 +1,10 @@
+<para>
+This option erases all waypoints in the receiver before doing a transfer.
+</para>
+<para>
+This is a convenient option to use in automated processes where you want
+to ensure the units starts with a clean state before sending waypoints to
+it.   Using this option on transmit is a better idea than doing it on 
+receive since the latter would erase all the waypoints before asking the
+unit to send all the waypoints.
+</para>
diff --git a/xmldoc/formats/options/navilink-power_off.xml b/xmldoc/formats/options/navilink-power_off.xml
new file mode 100644 (file)
index 0000000..b679373
--- /dev/null
@@ -0,0 +1,4 @@
+<para>
+This options powers down the Navilink receiver once any transfers are
+complete.
+</para>
diff --git a/xmldoc/formats/options/nmea-gisteq.xml b/xmldoc/formats/options/nmea-gisteq.xml
new file mode 100644 (file)
index 0000000..2595294
--- /dev/null
@@ -0,0 +1,17 @@
+<para>
+  This option writes the Gisteq format - which has the extension of .GPS - 
+  to allow third-party GPS hardware with the Gisteq PhotoTrackr software.  
+</para>
+<para>
+  The Gisteq PhotoTrackr is a GPS data logger hardware and software package
+  that allows one to easily record the locations of where the user has taken
+  photos.  The PhotoTrackr software works by comparing EXIF timestamps in
+  digital photos with the timestamps in the tracking data.  In doing so, the
+  software plots the locations of the photos using Google Maps.  The logging
+  format used by the Gisteq hardware is very close to NMEA format, but with a
+  few small quirks.  
+</para>
+<para>
+More information can be found at the 
+<ulink url="http://www.gisteq.com/">Gisteq</ulink> site.
+</para>
diff --git a/xmldoc/formats/options/osm-tag.xml b/xmldoc/formats/options/osm-tag.xml
new file mode 100644 (file)
index 0000000..752fa55
--- /dev/null
@@ -0,0 +1,6 @@
+<para>
+  With this option you can preset OSM <ulink url="http://wiki.openstreetmap.org/index.php/Map_Features">features</ulink> (tags) on all exported ways.
+</para>
+<para>
+  <userinput>gpsbabel -i gdb -f ways.gdb -o osm,tag="highway:motorway" -F ways.osm</userinput>
+</para>
diff --git a/xmldoc/formats/options/osm-tagnd.xml b/xmldoc/formats/options/osm-tagnd.xml
new file mode 100644 (file)
index 0000000..f9b10ab
--- /dev/null
@@ -0,0 +1,6 @@
+<para>
+  With this option you can preset OSM <ulink url="http://wiki.openstreetmap.org/index.php/Map_Features">features</ulink> (tags) on every written nodes.
+</para>
+<para>
+  <userinput>gpsbabel -i gdb -f nodes.gdb -o osm,tagnd="amenity:pub;building:yes" -F nodes.osm</userinput>
+</para>
diff --git a/xmldoc/formats/options/ozi-proximity.xml b/xmldoc/formats/options/ozi-proximity.xml
new file mode 100644 (file)
index 0000000..650aad8
--- /dev/null
@@ -0,0 +1,4 @@
+<para>
+  This option, specified in meters, allows you to set the proximity of 
+written in waypoints.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..f7eb60b14ed740fef62ebc5cca751533c0dea20a 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  This option allows you to specify the length of waypoint names written to this format when used with the <option>-s</option> option.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..1e83a5d92172d5357ae0adfad090fd3262ba49a7 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  When specified, this option will force the generated waypoint names to be unique.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..608e6bb2f8a886828468d48fd06bee49cdab7507 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  When specified, this option will force generated shortnames to be in all uppercase letters.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..80b964efa6b5b381c8311d3117f83660bf260036 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  This option forces waypoint names generated with <option> -s </option> to allow whitespace in the names.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..0b5fa134a52ace9bda2f2a62e7659d318f6a8c20 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  This option allows you to specify a background color of a waypoint.  You can specify it as either a decimal number or one of the standard web colors.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..fbaa20a8cc2554c15d204751bef5c7510ca5b120 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  This option allows you to specify a foreground color of a waypoint.  You can specify it as either a decimal number or one of the standard web colors.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..5e05476af727edea832a641ba0074c385cb91e5d 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  The deficon option is used to control the icon output when writing to this format.   It overrides any icon informatino that might be present in the source data.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..f7eb60b14ed740fef62ebc5cca751533c0dea20a 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  This option allows you to specify the length of waypoint names written to this format when used with the <option>-s</option> option.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..17bc9721bf323e59446ae2b3a51ca04594aea6ca 100644 (file)
@@ -1 +1,4 @@
-
+<para>
+  Carto Exploreur requires a slightly incompatible variation of the PCX format
+when written.  Specifying this option on write tells us to create that strain of PCX.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..5e05476af727edea832a641ba0074c385cb91e5d 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  The deficon option is used to control the icon output when writing to this format.   It overrides any icon informatino that might be present in the source data.
+</para>
diff --git a/xmldoc/formats/options/unicsv-utc.xml b/xmldoc/formats/options/unicsv-utc.xml
new file mode 100644 (file)
index 0000000..4c2964e
--- /dev/null
@@ -0,0 +1,5 @@
+<para>
+This option specifies the local time zone to use when writing times.  It
+is specified as an offset from Universal Coordinated Time (UTC) in hours.  
+Valid values are from -23 to +23.
+</para>  
index 8b137891791fe96927ad78e64b0aad7bded08bdc..35d45508de7c45af292cc14f36e74cca9da249dc 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+This options lets you specify an icon for an Ad-hoc, closed, waypoint.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..5961bdc1003fa324e2b072495f411e2c833e9a8e 100644 (file)
@@ -1 +1,4 @@
 
+<para>
+This options lets you specify an icon for an Ad-hoc, open, waypoint.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..4fe063f52e1d6a57ae0d9e361bb2f21f7ef8ba90 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+This option lets you specify an icon for infrastructure closed points.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..9bba545940d6f7cb16fe44f59a59be8c57615a6b 100644 (file)
@@ -1 +1,4 @@
 
+<para>
+This option lets you specify an icon for infrastructure open points.
+</para>
index 8b137891791fe96927ad78e64b0aad7bded08bdc..d8ad46984ffa26732f1540ebfcb5b7e73f325cf7 100644 (file)
@@ -1 +1,3 @@
-
+<para>
+  This options lets you specify that the shortname of the waypoint is the MAC address.
+</para>
diff --git a/xmldoc/formats/osm.xml b/xmldoc/formats/osm.xml
new file mode 100644 (file)
index 0000000..9ebc8ed
--- /dev/null
@@ -0,0 +1,13 @@
+<para>
+  This format is used to exchange data with the <ulink url="http://www.openstreetmap.org">OpenStreetMap</ulink> project. 
+  The main goal of this collaborative project is to create free editable maps.
+</para>
+<para>
+  These data files are XML based. Every GPS element (way or node) described by the files has a unique
+  number as identifier. When we write OSM data files and don't know something about the id's,
+  negative numbers will be used as identifier. This has been tested with <ulink url="http://wiki.openstreetmap.org/index.php/JOSM">JOSM</ulink>.
+</para>
+<para>
+  Because the resulting timestamps of OSM ways differ from real GPS tracks, 
+  we read OSM ways into routes. On the output side we write all available routes and tracks into the osm target file.
+</para>
index 1b82e49c4c56e6c10782d411763f0b9d83ea0ce2..2eb0956e1a8eb985cf6d080993ba25b372dc1519 100644 (file)
@@ -1,10 +1,13 @@
 
       
       
-      <para> This is a format for importing into 
+      <para> This is a format for creating data to be read by
 <ulink url="http://www.microsoft.com/streets/default.mspx"> Microsoft Streets and
-Trips</ulink>.  It's been exercised on versions from 2003 through 2007. Detailed
+Trips</ulink>.  It's been exercised on versions from 2003 through 2008. Detailed
 instructions on how to use it, including preserving hyperlinks, are at
 <ulink url="http://www.gpsbabel.org/formats/s_and_t/Importing_into_Microsoft_Streets_and_Trips_2003.html">gpsbabel.org</ulink>
          </para>
+       <para>
+               This format has nothing to do with the <link linkend="fmt_msroute1"> .est/axe format</link> used by this program to store routes.
+       </para>
     
index 23d31b7f60ac92bff14a0de23b5366adfc9fdf28..d3162b52c3af3af4d499e609c269b0c8c2f926d7 100644 (file)
@@ -1,6 +1,7 @@
 <para>
    Unicsv examines the first line of a file to determine the field
-   order and field separator in that file.   It is thus read-only format.
+   order and field separator in that file.   On write, it tries to 
+   figure out what data it has and writes headers and all the data it can.
 </para>
 <para>
    If the first line contains any tabs, the data lines are assumed
@@ -10,7 +11,7 @@
 <para>
    The list of keywords include:
    <screen format="linespecific">
-      alt =      Altitude
+      alt =      Elevation (in meters) of the point
       bng_e =    British National Grid's easting
       bng =      full coordinate in BNG format (zone easting northing)
       bng_pos =  full coordinate in BNG format (zone easting northing)
       date =     Date (yyyy/mm/dd)
       depth =    Depth
       desc =     Description
-      ele =      Altitude (elevation)
+      ele =      Elevation (in meters) of the point
+      e/w =      'e' for eastern hemisphere, 'w' for western
       fix =      3d, 2d, etc.
       geschw =   Geschwindigkeit (speed)
-      hdop =     Horizontal precision
+      hdop =     Horizontal dilution of precision
       head =     Heading / Course true
       heart =    Heartrate
+      height =   Elevation (in meters) of the point
       icon =     Symbol (icon) name
       lat =      Latitude
       lon =      Longitude
       name =     Waypoint name ("Shortname")
+      n/s =      'n' for northern hemisphere, 's' for southern
       notes =    Notes
-      pdop =     Precision summary (horizontal &amp; vertical)
+      pdop =     Position dilution of precision
       prox =     Proximity
       sat =      Number of sats used for fix
       speed =    Speed
@@ -50,7 +54,7 @@
       utm_pos =  full coordinate in UTM format (zone zone-ch easting northing)
       utm_n =    UTM northing
       utm_z =    UTM zone
-      vdop =     Vertical precision
+      vdop =     Vertical dilution of precision
       x =        Longitude
       x_pos =    Longitude
       y =        Latitude
diff --git a/xmldoc/formats/vidaone.xml b/xmldoc/formats/vidaone.xml
new file mode 100644 (file)
index 0000000..8cf1447
--- /dev/null
@@ -0,0 +1,7 @@
+<para>
+  This format supports the <ulink url="http://www.vidaone.com">VidaOne</ulink> GPS for pocket PC GPB file type.
+</para>
+<para>
+  This is have a very simple binary format which stores only the coordinates 
+  in the tracklog (.gpb) files.
+</para>
index 94509a517e5cd2e64b5373e44e881daec8d0f1fd..86782266477f5436a8b3ccde85cde61e189e7fd2 100644 (file)
@@ -1,8 +1,8 @@
 <para>File protocol for the <productname>Wintec WBT-200</productname>
-GPS data logger. This format reads the binary file format created
+and <productname>Wintec WBT-201</productname> (sometimes called the <productname> G-Rays 2</productname>)GPS data loggers. This format reads the binary file format created
 by Wintec's Windows application.</para>
 <para>
-<ulink url="http://www.semsons.com/wi3mugpsrebt.html">Wintec WBT-200 </ulink>
+<ulink url="http://www.semsons.com/wiwbmu3gpsre2.html">Wintec WBT-201 </ulink>
 </para>
 <example id="wbt-bin-on-macos">
   <title>Command showing conversion of a Wintec binary file to GPX</title>
index fb6a9625629bb24dd3333cb056769bc7790d394c..8a18450775370f8192ae2f5f06da8de2bad98eae 100644 (file)
@@ -1,9 +1,26 @@
-<para>Serial download protocol for the <productname>Wintec WBT-200</productname> GPS data logger. Although untested it is expected that this will also support the WBT-100.</para>
+<para>Serial download protocol for the 
+<productname>Wintec WBT-200</productname>  and
+<productname>Wintec WBT-201</productname> 
+GPS data loggers. Although untested it is expected that this will also support the WBT-100.</para>
 <para>
-<ulink url="http://www.semsons.com/wi3mugpsrebt.html">Wintec WBT-200</ulink>
+<ulink url="http://www.semsons.com/wiwbmu3gpsre2.html">Wintec WBT-201</ulink>
 </para>
 <example id="wbt-on-macos">
   <title>Command showing WBT-200 download and erase over Bluetooth on Mac OS X</title>
   <para><userinput>gpsbabel -t -w -i wbt,erase -f /dev/cu.WBT200-SPPslave-1 -o gpx -F out.gpx</userinput></para>
 </example>
-    
+
+<para>
+Internally, this is actually a serial device that has a serial/USB adapter
+built into it.  It uses the CP210x chip by Silicon labs.   You will probably
+need a driver for this chip.  The product ships with one for Windows.  
+The Linux 210x driver seems to work fine.  Mac users will need to download 
+the <ulink url="http://www.silabs.com/tgwWebApp/public/web_content/products/Microcontrollers/USB/en/mcu_vcp.htm">Mac driver for CP210x</ulink>.
+</para>
+
+<para>
+GPSBabel does not try to offer an interface to configure these units. That
+is left to the Windows software that comes with it or tools like the 
+<ulink url="http://www.daria.co.uk/gps">WBT 201 Viewer</ulink> for Mac OS/X
+and Linux.
+</para>
index 5e808900eb8382476508ad4c2148708aaa1a953d..ac5ebaf1f11d22c147c0026c7387292a46de9905 100644 (file)
@@ -1,7 +1,7 @@
 
        
         
-       <para> WFFF is the export format for Aspecto Software's WiFiFoFum 2.0 for Windows Mobile PCs.</para>
+       <para> WFFF is the export format for <ulink url="http://www.aspecto-software.com/rw/applications/wififofum/index.html">Aspecto Software's WiFiFoFum</ulink> 2.0 for Windows Mobile PCs.</para>
        <para>It is a simple XML format that is read-only to GPSBabel and stores information about a WiFi stumbling session.</para>
        <para>All WiFi-specific elements are written in the description  field, similar to the netstumbler format.</para>
        
diff --git a/xmldoc/formats/xol.xml b/xmldoc/formats/xol.xml
new file mode 100644 (file)
index 0000000..9910e16
--- /dev/null
@@ -0,0 +1,7 @@
+<para>
+   This module reads and writes xml based (.xol) files used by
+   <ulink url="http://www.swisstopo.ch">Swiss Map</ulink> software.
+</para>
+<para>
+   These files uses the "Swiss national grid" (CS-1903) to store coordinates.
+</para>
diff --git a/xol.c b/xol.c
new file mode 100644 (file)
index 0000000..f0349a7
--- /dev/null
+++ b/xol.c
@@ -0,0 +1,354 @@
+/* 
+
+       Support for Swiss Map # (.xol) format
+
+       Copyright (C) 2007 Olaf Klein, o.b.klein@gpsbabel.org
+
+       This program is free software; you can redistribute it and/or modify
+       it under the terms of the GNU General Public License as published by
+       the Free Software Foundation; either version 2 of the License, or
+       (at your option) any later version.
+
+       This program is distributed in the hope that it will be useful,
+       but WITHOUT ANY WARRANTY; without even the implied warranty of
+       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       GNU General Public License for more details.
+
+       You should have received a copy of the GNU General Public License
+       along with this program; if not, write to the Free Software
+       Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
+
+*/
+
+#include "defs.h"
+#include "xmlgeneric.h"
+#include "jeeps/gpsmath.h"
+#include "garmin_tables.h"
+
+static waypoint *wpt;
+static route_head *trk;
+static gbfile *fout;
+static int space;
+static bounds all_bounds;
+static short_handle short_h;
+
+static arglist_t xol_args[] = 
+{
+       ARG_TERMINATOR
+};
+
+#define MYNAME "xol"
+
+#if ! HAVE_LIBEXPAT
+void
+xol_rd_init(const char *fname)
+{
+       fatal(MYNAME ": This build excluded \"" MYNAME "\" support because expat was not installed.\n");
+}
+
+void
+xol_read(void)
+{
+}
+
+#else
+
+static xg_callback     xol_shape, xol_shape_end;
+static xg_callback     xol_waypt, xol_overlay;
+
+#define XOL "/overlays/overlay"
+
+static
+xg_tag_mapping xol_map[] = {
+       { xol_overlay,          cb_start,       XOL },
+       { xol_shape,            cb_start,       XOL "/shapes/*shape" },
+       { xol_shape_end,        cb_end,         XOL "/shapes/*shape" },
+       { xol_waypt,            cb_start,       XOL "/shapes/shape/*points/point" },
+       { NULL,                 0,              NULL }
+};
+
+
+static void
+xol_overlay(const char *args, const char **attrv)
+{
+       const char **avp = &attrv[0];
+
+        while (*avp) {
+               if (strcmp(avp[0], "version") == 0) {
+                       if (strcmp(avp[1], "1.0") != 0)
+                               fatal(MYNAME ": Unsupported version %s.\n", avp[1]);
+               }
+
+               avp+=2;
+       }
+}
+
+static void
+xol_shape(const char *args, const char **attrv)
+{
+       const char **avp = &attrv[0];
+
+        while (*avp) {
+               if (strcmp(avp[0], "type") == 0) {
+                       if (strcmp(avp[1], "waypoint") == 0) {
+                               wpt = waypt_new();
+                       }
+                       else if (strcmp(avp[1], "polyline") == 0) {
+                               trk = route_head_alloc();
+                               track_add_head(trk);
+                       }
+               }
+               else if (strcmp(avp[0], "name") == 0) {
+                       if (wpt) wpt->shortname = xstrdup(avp[1]);
+                       else if (trk) trk->rte_name = xstrdup(avp[1]);
+               }
+               else if (strcmp(avp[0], "comment") == 0) {
+                       if (wpt) wpt->notes = xstrdup(avp[1]);
+               }
+               else if (strcmp(avp[0], "alt") == 0) {
+                       if (wpt) wpt->altitude = atof(avp[1]);
+               }
+               else if (strcmp(avp[0], "timestamp") == 0) {
+                       if (wpt) wpt->creation_time = xml_parse_time(avp[1], &wpt->microseconds);
+               }
+               else if (strcmp(avp[0], "icon") == 0) {
+                       if (wpt) {
+                               wpt->icon_descr = xstrdup(avp[1]);
+                               wpt->wpt_flags.icon_descr_is_dynamic = 1;
+                       }
+               }
+
+               avp+=2;
+       }
+}
+
+static void 
+xol_shape_end(const char *args, const char **unused)
+{
+       if (wpt) {
+               if (trk) track_add_wpt(trk, wpt);
+               else waypt_add(wpt);
+               wpt = NULL;
+       }
+       else if (trk) {
+               if (trk->rte_waypt_ct == 0) track_del_head(trk);
+               trk = NULL;
+       }
+}
+
+static void 
+xol_waypt(const char *args, const char **attrv) {
+       const char **avp = &attrv[0];
+       int x=0, y=0;
+
+       while (*avp) {
+               if (strcmp(avp[0], "y") == 0)
+                       y = atoi(avp[1]);
+               else if (strcmp(avp[0], "x") == 0)
+                       x = atoi(avp[1]);
+               avp+=2;
+       }
+
+       GPS_Math_CH1903_NGEN_To_WGS84((double)x, (double)y, &wpt->latitude, &wpt->longitude);
+}
+
+static void 
+xol_rd_init(const char *fname)
+{
+       trk = NULL;
+       wpt = NULL;
+
+       xml_init(fname, xol_map, NULL);
+}
+
+static void 
+xol_read(void)
+{
+       xml_read();
+}
+
+#endif
+
+static void 
+xol_rd_deinit(void)
+{
+       xml_deinit();
+}
+
+/* writer */
+
+static void
+xol_fatal_outside(const waypoint *wpt)
+{
+       gbfprintf(fout, "#####\n");
+       fatal(MYNAME ": %s (%s) is outside of convertable area \"%s\"!\n",
+               wpt->shortname ? wpt->shortname : "Waypoint",
+               pretty_deg_format(wpt->latitude, wpt->longitude, 'd', NULL, 0),
+               gt_get_mps_grid_longname(grid_swiss, MYNAME));
+}
+
+
+static void
+xol_write_time(const waypoint *wpt)
+{
+       char time_string[64];
+       
+       xml_fill_in_time(time_string, wpt->creation_time, wpt->microseconds, XML_LONG_TIME);
+       if (time_string[0]) {
+               gbfprintf(fout, " timestamp=\"%s\"", time_string);
+       }
+}
+
+static void
+xol_write_string(const char *name, const char *str)
+{
+       if (str && *str) {
+               char *temp = strenquote(str, '"');
+               gbfprintf(fout, " %s=%s", name, temp);
+               xfree(temp);
+       }
+}
+
+static void
+xol_waypt_bound_calc(const waypoint *wpt)
+{
+       waypt_add_to_bounds(&all_bounds, wpt);
+}
+
+static void
+xol_wr_init(const char *fname)
+{
+       fout = gbfopen(fname, "w", MYNAME);
+
+       space = 1;
+       waypt_init_bounds(&all_bounds);
+       short_h = mkshort_new_handle();
+
+       setshort_length(short_h, 1024);         /* ??? */
+       setshort_badchars(short_h, "\r\n\t");
+       setshort_mustupper(short_h, 0);
+       setshort_mustuniq(short_h, 1);
+       setshort_whitespace_ok(short_h, 1);
+       setshort_repeating_whitespace_ok(short_h, 1);
+       setshort_defname(short_h, "Waypoint");
+}
+
+static void
+xol_wr_deinit(void)
+{
+       mkshort_del_handle(&short_h);
+       gbfclose(fout);
+}
+
+static void
+xol_waypt_disp_cb(const waypoint *wpt)
+{
+       double x, y;
+       char *name;
+
+       name = wpt->shortname;
+       if ((name == NULL) || (*name == '\0') || global_opts.synthesize_shortnames)
+               name = mkshort_from_wpt(short_h, wpt);
+       else
+               name = mkshort(short_h, name);
+
+       if (! GPS_Math_WGS84_To_CH1903_NGEN(wpt->latitude, wpt->longitude, &x, &y))
+               xol_fatal_outside(wpt);
+
+       gbfprintf(fout, "%*s<shape type=\"waypoint\"", space++*2, "");
+       xol_write_string("name", name);
+       xol_write_string("comment", wpt->notes);
+       xol_write_string("icon", wpt->icon_descr);
+       if (wpt->creation_time) xol_write_time(wpt);
+       if (wpt->altitude != unknown_alt) gbfprintf(fout, " alt=\"%.f\"", wpt->altitude);
+       gbfprintf(fout, ">\n");
+
+        gbfprintf(fout, "%*s<points>\n", space++*2, "");
+       gbfprintf(fout, "%*s<point x=\"%.f\" y=\"%.f\"/>\n", space*2, "", x, y);
+        gbfprintf(fout, "%*s</points>\n", --space*2, "");
+       gbfprintf(fout, "%*s</shape>\n", --space*2, "");
+
+       xfree(name);
+}
+
+static void
+xol_track_hdr_disp_cb(const route_head *trk)
+{
+       gbfprintf(fout, "%*s<shape type=\"polyline\"", space++*2, "");
+       xol_write_string("name", trk->rte_name);
+       gbfprintf(fout, " lineSize=\"3\" lineColor=\"#e60000\" lineStyle=\"solid\">\n");
+       gbfprintf(fout, "%*s<waypoints>\n", space++*2, "");
+}
+
+static void
+xol_track_tlr_disp_cb(const route_head *trk)
+{
+       gbfprintf(fout, "%*s</waypoints>\n", --space*2, "");
+       gbfprintf(fout, "%*s</shape>\n", --space*2, "");
+}
+
+static void
+xol_trkpt_disp_cb(const waypoint *wpt)
+{
+       double x, y;
+
+       if (! GPS_Math_WGS84_To_CH1903_NGEN(wpt->latitude, wpt->longitude, &x, &y))
+               xol_fatal_outside(wpt);
+
+       gbfprintf(fout, "%*s<shape type=\"waypoint\"", space++*2, "");
+       if (wpt->creation_time) xol_write_time(wpt);
+       if (wpt->altitude != unknown_alt) gbfprintf(fout, " alt=\"%.f\"", wpt->altitude);
+       gbfprintf(fout, ">\n");
+        gbfprintf(fout, "%*s<points>\n", space++*2, "");
+       gbfprintf(fout, "%*s<point x=\"%.f\" y=\"%.f\"/>\n", space*2, "", x, y);
+        gbfprintf(fout, "%*s</points>\n", --space*2, "");
+       gbfprintf(fout, "%*s</shape>\n", --space*2, "");
+}
+
+static void
+xol_write(void)
+{
+       double x, y;
+       
+       waypt_disp_all(xol_waypt_bound_calc);
+       track_disp_all(NULL, NULL, xol_waypt_bound_calc);
+       
+       if (! waypt_bounds_valid(&all_bounds)) {
+               fatal(MYNAME ": No data available!\n");
+       }
+
+       if (! GPS_Math_WGS84_To_CH1903_NGEN(
+               (all_bounds.min_lat + all_bounds.max_lat) / 2,
+               (all_bounds.min_lon + all_bounds.max_lon) / 2, &x, &y)) {
+               gbfprintf(fout, "#####\n");
+               fatal(MYNAME ": At least one point is outside of convertable area \"%s\"!\n",
+                       gt_get_mps_grid_longname(grid_swiss, MYNAME));
+       }
+       
+       gbfprintf(fout, "<?xml version=\"1.0\" encoding=\"%s\"?>\n", global_opts.charset_name);
+       gbfprintf(fout, "<overlays>\n");
+       gbfprintf(fout, "%*s<overlay version=\"1.0\">\n", space++*2, "");
+       gbfprintf(fout, "%*s<center x=\"%.f\" y=\"%.f\"/>\n", space*2, "", x, y);
+       gbfprintf(fout, "%*s<shapes>\n", space++*2, "");
+       waypt_disp_all(xol_waypt_disp_cb);
+       track_disp_all(xol_track_hdr_disp_cb, xol_track_tlr_disp_cb, xol_trkpt_disp_cb);
+       gbfprintf(fout, "%*s</shapes>\n", --space*2, "");
+       gbfprintf(fout, "%*s</overlay>\n", --space*2, "");
+       gbfprintf(fout, "</overlays>\n");
+}
+
+ff_vecs_t xol_vecs = {
+       ff_type_file,
+       { ff_cap_read | ff_cap_write,   /* waypoints */
+         ff_cap_read | ff_cap_write,   /* tracks */
+         ff_cap_none },                /* routes */
+       xol_rd_init,    
+       xol_wr_init,    
+       xol_rd_deinit,
+       xol_wr_deinit,
+       xol_read,
+       xol_write,
+       NULL, 
+       xol_args,
+       CET_CHARSET_UTF8, 0
+};